This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/26227] accepts invalid fortran, different dummy types/number



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-04-04 01:37 -------
Here is another testcase (which ICEs currently but for a different reason):
program main
  character (5) :: a = 'hello'
  call test ((/a/))
end program main

subroutine test (a)
  character (5) :: a
  if (a .ne. 'hello') call abort
end subroutine test


The corrected form of this testcase is:
program main
  character (5) :: a = 'hello'
  call test ((/a/))
end program main

subroutine test (a)
  character (5) :: a(1)
  if (a(1) ne. 'hello') call abort
end subroutine test

-----
This testcase comes from HJL not even thinking about types of arguments to
subroutines (IFort accepts the code too though Lahey's rejects it).  I know
just about as much Fortran as HJL does (maybe I can guess about how stuff like
this is just wrong).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-04 01:37:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26227


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]