This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35971] ICE on valid code
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2008 08:58:07 -0000
- Subject: [Bug fortran/35971] ICE on valid code
- References: <bug-35971-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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