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/35971] ICE on valid code



------- Comment #2 from janus at gcc dot gnu dot org  2008-06-29 08:58 -------
The test case in comment #1 does compile for me without any ICE. The test case
in comment #0 is actually invalid, triggering the following error message:

      procedure(abstract_fun) fun
              1
Error: PROCEDURE at (1) must be in a generic interface

One simply has to remove the interface statement from the main program:

program fptr
   use funcs
   use other_fun
   implicit none
   procedure(abstract_fun) fun
   pointer(p,fun)
   type(C_FUNPTR) fp

   fp = get_proc('Hello, world'//achar(0))
   p = transfer(fp,p)
   write(*,'(a)') fun([1,2,3])
end program fptr

With this I also get an ICE.


-- 


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


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