This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79739] [7 Regression] ICE with some interesting code
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Feb 2017 18:57:04 +0000
- Subject: [Bug fortran/79739] [7 Regression] ICE with some interesting code
- Auto-submitted: auto-generated
- References: <bug-79739-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79739
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #4)
> As the guilty party, I had better take it on!
>
> Cheers
>
> Paul
The problem is that there is a type mismatch between the declarations for
'cafun'. Since the type is not declared in the interface, it defaults to type
real. Change the interface to:
interface
module function cafrun (cafapp)
integer cafrun
procedure(), pointer :: cafapp
end function
end interface
and it now compiles OK.
The reason for the ICE is that the offending patch allowed the module
procedures to appear in the module so that 'submodule_name' is NULL and the
call to gfc_error at resolve.c:12343 bombs out.
The fix is trivial and I will commit it right away.
Cheers
Paul