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

            Bug ID: 79588
           Summary: [7 Regression] ICE in warn_for_restrict with
                    -Wrestrict
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: prathamesh3492 at gcc dot gnu.org
  Target Milestone: ---

Starting from revision where -Wrestrict was introduced (r242366), we ICE:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/opt/expect2.C
-Wrestrict
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/opt/expect2.C: In function
‘void bar()’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/opt/expect2.C:10:26: internal
compiler error: Segmentation fault
   __builtin_expect (foo () && true, 1) ? 0 : (abort (), 0);
                          ^
0xb8b2af crash_signal
        ../../gcc/toplev.c:337
0x7f7008 warn_for_restrict(unsigned int, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/c-family/c-warn.c:2176
0x6ef18a cp_parser_postfix_expression
        ../../gcc/cp/parser.c:6952
0x6ed1fa cp_parser_unary_expression
        ../../gcc/cp/parser.c:8124
0x6f5497 cp_parser_cast_expression
        ../../gcc/cp/parser.c:8801
0x6f5a2d cp_parser_binary_expression
        ../../gcc/cp/parser.c:8902
0x6f6120 cp_parser_assignment_expression
        ../../gcc/cp/parser.c:9189
0x6f7906 cp_parser_parenthesized_expression_list
        ../../gcc/cp/parser.c:7595
0x6eea2e cp_parser_postfix_expression
        ../../gcc/cp/parser.c:6850
0x6ed1fa cp_parser_unary_expression
        ../../gcc/cp/parser.c:8124
0x6f5497 cp_parser_cast_expression
        ../../gcc/cp/parser.c:8801
0x6f5a2d cp_parser_binary_expression
        ../../gcc/cp/parser.c:8902
0x6f6120 cp_parser_assignment_expression
        ../../gcc/cp/parser.c:9189
0x6f848a cp_parser_expression
        ../../gcc/cp/parser.c:9358
0x6f89f8 cp_parser_expression_statement
        ../../gcc/cp/parser.c:10906
0x707667 cp_parser_statement
        ../../gcc/cp/parser.c:10722
0x7081e4 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:11048
0x7082bf cp_parser_compound_statement
        ../../gcc/cp/parser.c:11002
0x7039c3 cp_parser_function_body
        ../../gcc/cp/parser.c:21445
0x7039c3 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.c:21481

Reply via email to