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/79739] [7 Regression] ICE with some interesting code


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

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