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

            Bug ID: 95183
           Summary: [11 Regression] ICE: Segmentation fault (in
                    _cpp_lex_direct)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:

% gcc-11.0.0 -c gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:8:8: error: unterminated argument
list invoking macro "f"
    8 | #if 2 f(/* { dg-error "-:unterminated" "unterminated macro in
directive" } */
      |        ^
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:8:7: error: missing binary operator
before token "f"
    8 | #if 2 f(/* { dg-error "-:unterminated" "unterminated macro in
directive" } */
      |       ^
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:12: error: unterminated argument list
invoking macro "f"
   12 | f( /* { dg-error "-:unterminated" "unterminated macro" } */
      | 
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:12:1: internal compiler error:
Segmentation fault
   12 | f( /* { dg-error "-:unterminated" "unterminated macro" } */
      | ^
0xd9b92f crash_signal
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/toplev.c:328
0x18578d3 _cpp_lex_direct
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/lex.c:2733
0x18592e8 _cpp_lex_token
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/lex.c:2611
0x1860877 cpp_get_token_1
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/macro.c:2808
0x8784d0 c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-lex.c:458
0x7f7a3a c_lex_one_token
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:270
0x7f8ac0 c_parser_peek_2nd_token(c_parser*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:491
0x7f8ac0 c_parser_peek_2nd_token(c_parser*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:484
0x820b9c c_parser_declaration_or_fndef
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1893
0x82a893 c_parser_external_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1745
0x82b3a9 c_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1618
0x82b3a9 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:21746
0x8830fb c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-opts.c:1190

It's likely caused by g:2a0225e47868fbfceaecaa5e2de96c1c5a2251ea.

Reply via email to