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

            Bug ID: 97463
           Summary: [11 Regression] ICE in warn_parm_ptrarray_mismatch on
                    an incompatible function redeclaration
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The following invalid program triggers an ICE in the recently added 
warn_parm_ptrarray_mismatch function.

$ cat z.c && gcc -O2 -S -Wall -fdump-tree-optimized=/dev/stdout z.c
void f (void**);
void f (int n) {  }
z.c:2:1: internal compiler error: Segmentation fault
    2 | void f (int n) {  }
      | ^~~~
0x131e972 crash_signal
        /src/gcc/master/gcc/toplev.c:330
0xaea1f4 warn_parm_ptrarray_mismatch
        /src/gcc/master/gcc/c-family/c-warn.c:3182
0xaeae8b warn_parm_array_mismatch(unsigned int, tree_node*, tree_node*)
        /src/gcc/master/gcc/c-family/c-warn.c:3351
0x969c70 start_function(c_declspecs*, c_declarator*, tree_node*)
        /src/gcc/master/gcc/c/c-decl.c:9560
0x9d2682 c_parser_declaration_or_fndef
        /src/gcc/master/gcc/c/c-parser.c:2444
0x9d0e02 c_parser_external_declaration
        /src/gcc/master/gcc/c/c-parser.c:1777
0x9d0923 c_parser_translation_unit
        /src/gcc/master/gcc/c/c-parser.c:1650
0xa0ee9c c_parse_file()
        /src/gcc/master/gcc/c/c-parser.c:21821
0xaa27cd c_common_parse_file()
        /src/gcc/master/gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to