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

            Bug ID: 107002
           Summary: [13 Regression] ICE in column_range, at
                    diagnostic-show-locus.cc:2236
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started between 20220828 and 20220904 :
(derived from g++.dg/parse/expr3.C)


$ cat z1.c
#define test(lower, higher, a, b, c, d) \
  char test##line[ (a higher b lower c higher d) == 0 ? -1 : 1];
test (|, ^, 1, 2, 2, 1)


$ gcc-13-20220918 -c z1.c -ftrack-macro-expansion=0
z1.c:3:1: warning: result of '2^1' is 3; did you mean '1 << 1' (2)?
[-Wxor-used-as-pow]
    3 | test (|, ^, 1, 2, 2, 1)
      | ^~~~

z1.c:3:1: internal compiler error: in column_range, at
diagnostic-show-locus.cc:2236
0x79d3b3 column_range
        ../../gcc/diagnostic-show-locus.cc:2236
0x1ecb213 column_range
        ../../gcc/input.h:96
0x1ecb213 add_hint
        ../../gcc/diagnostic-show-locus.cc:2482
0x1ecb76c print_trailing_fixits
        ../../gcc/diagnostic-show-locus.cc:2551
0x1ecb76c print_line
        ../../gcc/diagnostic-show-locus.cc:2790
0x1ecf60f diagnostic_show_locus(diagnostic_context*, rich_location*,
diagnostic_t)
        ../../gcc/diagnostic-show-locus.cc:2874
0x8bc715 c_diagnostic_finalizer
        ../../gcc/c-family/c-opts.cc:172
0x1ebf8ea diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.cc:1557
0x1ebffea diagnostic_impl
        ../../gcc/diagnostic.cc:1712
0x1ec2512 warning_at(rich_location*, int, char const*, ...)
        ../../gcc/diagnostic.cc:1864
0x8f6119 check_for_xor_used_as_pow(unsigned int, tree_node*, unsigned int,
tree_node*)
        ../../gcc/c-family/c-warn.cc:3855
0x7ff0ed parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr)
        ../../gcc/c/c-typeck.cc:3994
0x824dfe c_parser_binary_expression
        ../../gcc/c/c-parser.cc:8085
0x825ccb c_parser_conditional_expression
        ../../gcc/c/c-parser.cc:7653
0x826674 c_parser_expr_no_commas
        ../../gcc/c/c-parser.cc:7567
0x826922 c_parser_expression
        ../../gcc/c/c-parser.cc:10782
0x8166bb c_parser_postfix_expression
        ../../gcc/c/c-parser.cc:9183
0x822fca c_parser_unary_expression
        ../../gcc/c/c-parser.cc:8311
0x8242ef c_parser_cast_expression
        ../../gcc/c/c-parser.cc:8152
0x8245bb c_parser_binary_expression
        ../../gcc/c/c-parser.cc:7955

Reply via email to