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

            Bug ID: 117225
           Summary: ICE with -funsigned in gfc_match_sym_complex_part
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

The test case

program main
  unsigned, parameter :: u = 7u
  print *,mod(-(u+1u),u)
end program main

ICEs:

 gfortran -funsigned unsigned_38.f90 
f951: interner Compiler-Fehler: gfc_match_sym_complex_part(): Bad type
0xa35eff diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../trunk/gcc/diagnostic.h:1062
0xa35eff gfc_report_diagnostic
        ../../trunk/gcc/fortran/error.cc:248
0xa35eff gfc_internal_error(char const*, ...)
        ../../trunk/gcc/fortran/error.cc:882
0xab1f17 match_sym_complex_part
        ../../trunk/gcc/fortran/primary.cc:1475
0xab344b match_complex_part
        ../../trunk/gcc/fortran/primary.cc:1494
0xab344b match_complex_constant
        ../../trunk/gcc/fortran/primary.cc:1527
0xab36f9 gfc_match_literal_constant(gfc_expr**, int)
        ../../trunk/gcc/fortran/primary.cc:1635
0xa74b25 match_primary
        ../../trunk/gcc/fortran/matchexp.cc:150
0xa74b25 match_level_1
        ../../trunk/gcc/fortran/matchexp.cc:212
0xa74b25 match_mult_operand
        ../../trunk/gcc/fortran/matchexp.cc:268
0xa74f18 match_add_operand
        ../../trunk/gcc/fortran/matchexp.cc:357
0xa7532c match_level_2
        ../../trunk/gcc/fortran/matchexp.cc:473
0xa753b6 match_level_3
        ../../trunk/gcc/fortran/matchexp.cc:552
0xa754ef match_level_4
        ../../trunk/gcc/fortran/matchexp.cc:600
0xa754ef match_and_operand
        ../../trunk/gcc/fortran/matchexp.cc:694
0xa756c6 match_or_operand
        ../../trunk/gcc/fortran/matchexp.cc:723
0xa757d6 match_equiv_operand
        ../../trunk/gcc/fortran/matchexp.cc:766
0xa758e8 match_level_5
        ../../trunk/gcc/fortran/matchexp.cc:812
0xa74a04 gfc_match_expr(gfc_expr**)
        ../../trunk/gcc/fortran/matchexp.cc:871
0xab2807 match_actual_arg
        ../../trunk/gcc/fortran/primary.cc:1798

Reply via email to