Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Syntax check fo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 14 Topic 8187 of 8471
Post > Topic >>

Syntax check for IMPLICIT statement

by "James Van Buskirk" <not_valid@[EMAIL PROTECTED] > Apr 27, 2008 at 05:22 PM

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 Cor****ation.  All rights reserved.

Microsoft (R) Incremental Linker Version 8.00.40310.39
Copyright (C) Microsoft Cor****ation.  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
 




 14 Posts in Topic:
Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 17:22:05 
Re: Syntax check for IMPLICIT statement
glen herrmannsfeldt <g  2008-04-27 15:46:23 
Re: Syntax check for IMPLICIT statement
"Michael Metcalf&quo  2008-04-27 23:42:29 
Re: Syntax check for IMPLICIT statement
glen herrmannsfeldt <g  2008-04-27 17:45:16 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 21:15:11 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 23:11:09 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-28 00:32:40 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-28 01:10:52 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:55:29 
Re: Syntax check for IMPLICIT statement
Janne Blomqvist <foo@[  2008-04-28 10:28:49 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:52:59 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:57:06 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:44:21 
Re: Syntax check for IMPLICIT statement
Steve Lionel <Steve.Li  2008-04-28 12:01:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 6:06:55 CDT 2008.