Syntax check for IMPLICIT statement
- From: "James Van Buskirk" <not_valid@xxxxxxxxxxx>
- Date: Sun, 27 Apr 2008 17:22:05 -0600
In attempting to create a digestible version of a program that gives
gfortran an ICE and causes incorrect output for ifort, the critical
factor for both seems to be a line such as:
implicit character(len=*,kind=kind('A')) (Q)
In the sense that if the LEN is changed to 3 both ifort and gfortran
get happy with the code. Is this syntactically incorrect or simply
obscure enough that it didn't get sufficient testing on either
compiler?
C:\gfortran\clf\startest>type startest.f90
module mod
implicit character(len=*,kind=kind('A')) (Q)
parameter(Q1 = 'Test Me!')
parameter(Q2 = 'Test Me Too!')
contains
subroutine sub(Q3)
write(*,*) '#'//Q3//'#'
end subroutine sub
end module mod
program startest
use mod
implicit none
write(*,*) '#'//Q1//'#'
write(*,*) '#'//Q2//'#'
call sub('Test Me More!')
end program startest
C:\gfortran\clf\startest>gfortran startest.f90 -o startest
C:\gfortran\clf\startest>startest
#Test Me!#
#Test Me Too!#
#Test Me More!#
C:\gfortran\clf\startest>ifort startest.f90 -o startest
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications, Version 9.1
Build 20061104
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
Microsoft (R) Incremental Linker Version 8.00.40310.39
Copyright (C) Microsoft Corporation. All rights reserved.
-out:startest.exe
-subsystem:console
startest.obj
C:\gfortran\clf\startest>startest
#Test Me!#
#Test Me Too!#
##
As you can see, this program is capable of reproducing the ifort
error but I haven't been able to make a small program that
reproduces the gfortran ICE.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
.
- Follow-Ups:
- Re: Syntax check for IMPLICIT statement
- From: Steve Lionel
- Re: Syntax check for IMPLICIT statement
- From: Herman D . Knoble
- Re: Syntax check for IMPLICIT statement
- From: James Van Buskirk
- Re: Syntax check for IMPLICIT statement
- From: glen herrmannsfeldt
- Re: Syntax check for IMPLICIT statement
- From: Michael Metcalf
- Re: Syntax check for IMPLICIT statement
- Prev by Date: Re: Using external subroutines in OpenMP?
- Next by Date: Re: Syntax check for IMPLICIT statement
- Previous by thread: Pointers to derived type objects in COMMON
- Next by thread: Re: Syntax check for IMPLICIT statement
- Index(es):
Relevant Pages
|
|