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/32047] ICE (segfault) for pure function without argument



------- Comment #1 from burnus at gcc dot gnu dot org  2007-05-22 19:28 -------
Same error, but now for a valid program. Compiles and runs with NAG f95, g95
and ifort.

module test1
  implicit none
contains
  character(f()) function test2() result(r)
    interface
      pure function f()
        integer f
      end function f
    end interface
    r = '1'
  end function test2
end module test1

pure function f()
  integer :: f
  f = 1
end function f

program test
  use test1
  implicit none
  if(test2() /= '1') stop 'Error'
end program test


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |ice-on-valid-code


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


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