[Bug fortran/77971] ICE at -O0 in make_decl_rtl, at varasm.c:1310

2016-10-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77971

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-13
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
Confirmed, started with GCC 4.6.0.

[Bug fortran/77971] ICE at -O0 in make_decl_rtl, at varasm.c:1310

2016-10-13 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77971

--- Comment #1 from Gerhard Steinmetz  
---


For completeness, compiles without variable "g" :

$ cat z3.f90
module m
contains
   function f()
  f = 1
   entry g()
  g = 2
   end
end

$ gfortran-7-20161009 -O0 -c z3.f90



Problem detected with variable named "f" :

$ cat z4.f90
module m
   real f
contains
   function f()
  f = 1
   entry g()
  g = 2
   end
end

$ gfortran-7-20161009 -O0 -c z4.f90
z4.f90:4:13:

z4.f90:2:9:

real f
 2
z4.f90:4:13:

function f()
 1
Error: Procedure 'f' at (1) has an explicit interface and must not have
attributes declared at (2)