https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100783
Bug ID: 100783 Summary: ICE: at c/c-objc-common.c:188 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210526 (experimental) [master revision :21638bbbf:1fd76b24306ed4df4cf9e797d900699ed59ce7f7] (GCC) $ cat mutant.c __attribute__((nonnull(1))) foo(char[z]) {} $ gcc-trunk mutant.c mutant.c:1:38: error: āzā undeclared here (not in a function) 1 | __attribute__((nonnull(1))) foo(char[z]) {} | ^ ā in print_type, at c/c-objc-common.c:188 1 | __attribute__((nonnull(1))) foo(char[z]) {} | ^~~~~~~~~~~~~ 0x654caa print_type /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:188 0x91de6a c_tree_printer /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:310 0x91de6a c_tree_printer /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:254 0x1b358ec pp_format(pretty_printer*, text_info*) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/pretty-print.c:1475 0x1b19f6c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1244 0x1b1a4ae diagnostic_impl /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1406 0x1b1a9d9 warning(int, char const*, ...) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1527 0x9d04d4 positional_argument(tree_node const*, tree_node const*, tree_node*, tree_code, int, int) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-attribs.c:747 0x9d07c2 handle_nonnull_attribute /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-attribs.c:4358 0x8ce496 decl_attributes(tree_node**, tree_node*, int, tree_node*) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/attribs.c:723 0x8eb137 start_function(c_declspecs*, c_declarator*, tree_node*) /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-decl.c:9436 0x947cae c_parser_declaration_or_fndef /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:2440 0x94ff73 c_parser_external_declaration /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:1777 0x9509d9 c_parser_translation_unit /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:1650 0x9509d9 c_parse_file() /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:21994 0x9b1155 c_common_parse_file() /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-opts.c:1219 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.