https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71861

            Bug ID: 71861
           Summary: ICE in write_symbol(): bad module symbol
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

An interface with an alienated intrinsic name (or any other) :


$ cat z1.f90
module m
   intrinsic abs
   abstract interface
      function abs(x)
         real :: abs, x
      end
   end interface
end

$ cat z2.f90
module m
   abstract interface
      function abs(x)
         real :: abs, x
      end
   end interface
   intrinsic abs
end

$ cat z3.f90
module m
   abstract interface
      function f(x)
         real :: f, x
      end
   end interface
   intrinsic f
end


$ gfortran-6 z1.f90
f951: internal compiler error: write_symbol(): bad module symbol 'x'

#...

$ gfortran-7-20160710 z3.f90
f951: internal compiler error: write_symbol(): bad module symbol 'x'
0x6842f1 gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.c:1312
0x6bc312 write_symbol
        ../../gcc/fortran/module.c:5563
0x6bc35b write_symbol1_recursion
        ../../gcc/fortran/module.c:5790
0x6bf185 write_symbol1
        ../../gcc/fortran/module.c:5823
0x6bf185 write_module
        ../../gcc/fortran/module.c:5967
0x6bf185 dump_module
        ../../gcc/fortran/module.c:6094
0x6bf3f7 gfc_dump_module(char const*, int)
        ../../gcc/fortran/module.c:6137
0x6d6d06 gfc_parse_file()
        ../../gcc/fortran/parse.c:6068
0x718d12 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:198

Reply via email to