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

            Bug ID: 93337
           Summary: [9/10 Regression] ICE in gfc_dt_upper_string, at
                    fortran/module.c:441
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

This has changed between 20180909 and 20180916 :
(class with missing attribute allocatable or pointer)


$ cat z1.f90
program p
   type t
      character(:), allocatable :: a
   end type
   class(t) :: x
   x = x
end


$ cat z2.f90
program p
   type t
      character(:), allocatable :: a
   end type
   class(t) :: x, y
   y = x
end


$ gfortran-9-20180909 -c z1.f90
z1.f90:5:16:

5 |    class(t) :: x
  |                1
Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer
z1.f90:6:3:

6 |    x = x
  |   1
Error: Nonallocatable variable must not be polymorphic in intrinsic assignment
at (1) - check that there is a matching specific subroutine for '=' operator


$ gfortran-10-20200119 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbaaaff crash_signal
        ../../gcc/toplev.c:328
0x6851f0 gfc_dt_upper_string(char const*)
        ../../gcc/fortran/module.c:441
0x625e6a get_unique_type_string
        ../../gcc/fortran/class.c:486
0x626888 get_unique_hashed_string
        ../../gcc/fortran/class.c:505
0x626daa gfc_find_derived_vtab(gfc_symbol*)
        ../../gcc/fortran/class.c:2266
0x62ab95 gfc_find_vtab(gfc_typespec*)
        ../../gcc/fortran/class.c:2868
0x67a802 gfc_match_assignment()
        ../../gcc/fortran/match.c:1375
0x69e140 match_word
        ../../gcc/fortran/parse.c:65
0x69e140 decode_statement
        ../../gcc/fortran/parse.c:361
0x69fc3a next_free
        ../../gcc/fortran/parse.c:1279
0x69fc3a next_statement
        ../../gcc/fortran/parse.c:1511
0x6a128b parse_spec
        ../../gcc/fortran/parse.c:3922
0x6a405c parse_progunit
        ../../gcc/fortran/parse.c:5848
0x6a5739 gfc_parse_file()
        ../../gcc/fortran/parse.c:6388
0x6f044f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to