https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97206
Bug ID: 97206
Summary: [11-regression] internal compiler error: in
composite_type, at c/c-typeck.c:447
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
Target Milestone: ---
Originally observed on freetype-2.10.2 package.
Here is the minimal reproducer:
// x86_64-pc-linux-gnu-gcc -m32 -c -O2 bug.c -o a.o
void a(char *__restrict, const long *, unsigned)
__attribute__((__access__(__write_only__, 1)));
void a(char *, const long *, unsigned);
const char b[];
const char b[] = {};
$ ./xgcc -B. -c bug.c -o a.o
bug.c:6:1: internal compiler error: in composite_type, at c/c-typeck.c:447
6 | const char b[] = {};
| ^~~~~
0x44f412 composite_type(tree_node*, tree_node*)
../../gcc/gcc/c/c-typeck.c:447
0x426a0c finish_decl(tree_node*, unsigned int, tree_node*, tree_node*,
tree_node*)
../../gcc/gcc/c/c-decl.c:5356
0x4a04f0 c_parser_declaration_or_fndef
../../gcc/gcc/c/c-parser.c:2289
0x49f01b c_parser_external_declaration
../../gcc/gcc/c/c-parser.c:1777
0x49eb6a c_parser_translation_unit
../../gcc/gcc/c/c-parser.c:1650
0x4df8f5 c_parse_file()
../../gcc/gcc/c/c-parser.c:21821
0x5727e0 c_common_parse_file()
../../gcc/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.
$ ./xgcc -B. -v
Reading specs from /home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/specs
COLLECT_GCC=/home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/slyfox/dev/git/gcc-native-quick-ggdb3/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-languages=c,c++ --disable-bootstrap --with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick-ggdb3/../gcc-native-quick-installed-ggdb3
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O0 -ggdb3 ' CXXFLAGS='-O0 -ggdb3 ' --enable-valgrind-annotations
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200925 (experimental) (GCC)