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

            Bug ID: 107397
           Summary: [10/11/12/13 Regression] ICE in gfc_arith_plus, at
                    fortran/arith.cc:654
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to r10, r9 gives an error.
Started between 20190630 and 20190728.


$ cat z1.f90
program p
   type t
      real :: a = 1.0
   end type
   type(t), parameter :: x = z'1'
   x%a = x%a + 2
   x%a = x%a - 2
   x%a = x%a * 2
   x%a = x%a / 2
   x%a = x%a ** 2
end


$ gfortran-13-20221023 -c z1.f90
f951: internal compiler error: Segmentation fault
0xf43b3f crash_signal
        ../../gcc/toplev.cc:314
0x7c25fb gfc_arith_plus
        ../../gcc/fortran/arith.cc:654
0x7c0ee3 reduce_binary
        ../../gcc/fortran/arith.cc:1514
0x7c1352 eval_intrinsic
        ../../gcc/fortran/arith.cc:1701
0x83418c match_level_2
        ../../gcc/fortran/matchexp.cc:524
0x8342c2 match_level_3
        ../../gcc/fortran/matchexp.cc:551
0x8343b4 match_level_4
        ../../gcc/fortran/matchexp.cc:599
0x8343b4 match_and_operand
        ../../gcc/fortran/matchexp.cc:693
0x8345a2 match_or_operand
        ../../gcc/fortran/matchexp.cc:722
0x834672 match_equiv_operand
        ../../gcc/fortran/matchexp.cc:765
0x834744 match_level_5
        ../../gcc/fortran/matchexp.cc:811
0x833b11 gfc_match_expr(gfc_expr**)
        ../../gcc/fortran/matchexp.cc:870
0x82b0f0 gfc_match(char const*, ...)
        ../../gcc/fortran/match.cc:1131
0x82ceb9 gfc_match_assignment()
        ../../gcc/fortran/match.cc:1330
0x858310 match_word
        ../../gcc/fortran/parse.cc:67
0x858310 decode_statement
        ../../gcc/fortran/parse.cc:363
0x859e0a next_free
        ../../gcc/fortran/parse.cc:1402
0x859e0a next_statement
        ../../gcc/fortran/parse.cc:1634
0x85b84b parse_spec
        ../../gcc/fortran/parse.cc:4190
0x85ea5c parse_progunit
        ../../gcc/fortran/parse.cc:6237

Reply via email to