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

            Bug ID: 95088
           Summary: ICE in gfc_build_class_symbol, at fortran/class.c:653
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

The search for internal restrictions of names has brought to light 
a few critical cases, in the following case the change occurs between 
61 (ok) and 62 (ICE) :


$ cat z1_61.f90
module m234567890123456789012345678901234567890123456789012345678901
   type t234567890123456789012345678901234567890123456789012345678901 &
      (n234567890123456789012345678901234567890123456789012345678901)
      integer, kind ::
n234567890123456789012345678901234567890123456789012345678901
   end type
   type, extends
(t234567890123456789012345678901234567890123456789012345678901) :: &
      a234567890123456789012345678901234567890123456789012345678901
   end type
   interface
      module subroutine
s234567890123456789012345678901234567890123456789012345678901 &
         (x234567890123456789012345678901234567890123456789012345678901)
        
class(a234567890123456789012345678901234567890123456789012345678901(8)) :: &
            x234567890123456789012345678901234567890123456789012345678901
      end
   end interface
end


$ cat z1_62.f90
module m2345678901234567890123456789012345678901234567890123456789012
   type t2345678901234567890123456789012345678901234567890123456789012 &
      (n2345678901234567890123456789012345678901234567890123456789012)
      integer, kind ::
n2345678901234567890123456789012345678901234567890123456789012
   end type
   type, extends
(t2345678901234567890123456789012345678901234567890123456789012) :: &
      a2345678901234567890123456789012345678901234567890123456789012
   end type
   interface
      module subroutine
s2345678901234567890123456789012345678901234567890123456789012 &
         (x2345678901234567890123456789012345678901234567890123456789012)
        
class(a2345678901234567890123456789012345678901234567890123456789012(8)) :: &
            x2345678901234567890123456789012345678901234567890123456789012
      end
   end interface
end


$ cat z1_63.f90
module m23456789012345678901234567890123456789012345678901234567890123
   type t23456789012345678901234567890123456789012345678901234567890123 &
      (n23456789012345678901234567890123456789012345678901234567890123)
      integer, kind ::
n23456789012345678901234567890123456789012345678901234567890123
   end type
   type, extends
(t23456789012345678901234567890123456789012345678901234567890123) :: &
      a23456789012345678901234567890123456789012345678901234567890123
   end type
   interface
      module subroutine
s23456789012345678901234567890123456789012345678901234567890123 &
         (x23456789012345678901234567890123456789012345678901234567890123)
        
class(a23456789012345678901234567890123456789012345678901234567890123(8)) :: &
            x23456789012345678901234567890123456789012345678901234567890123
      end
   end interface
end


$ gfortran-11-20200510 -c z1_61.f90
$
$ gfortran-11-20200510 -c z1_62.f90
f951: internal compiler error: Segmentation fault
0xbb93cf crash_signal
        ../../gcc/toplev.c:328
0x62fcb8 gfc_build_class_symbol(gfc_typespec*, symbol_attribute*,
gfc_array_spec**)
        ../../gcc/fortran/class.c:653
0x6365ac build_sym
        ../../gcc/fortran/decl.c:1746
0x640e09 variable_decl
        ../../gcc/fortran/decl.c:2780
0x640e09 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:6170
0x6a4533 match_word
        ../../gcc/fortran/parse.c:65
0x6a4533 decode_statement
        ../../gcc/fortran/parse.c:376
0x6a5f7a next_free
        ../../gcc/fortran/parse.c:1279
0x6a5f7a next_statement
        ../../gcc/fortran/parse.c:1511
0x6a8324 parse_spec
        ../../gcc/fortran/parse.c:3738
0x6a7cce parse_interface
        ../../gcc/fortran/parse.c:3601
0x6a7cce parse_spec
        ../../gcc/fortran/parse.c:3875
0x6ab59e parse_module
        ../../gcc/fortran/parse.c:6115
0x6ab8e7 gfc_parse_file()
        ../../gcc/fortran/parse.c:6428
0x6f7a7f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to