https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65771
Bug ID: 65771 Summary: [5 Regression] ICE (in loc_list_from_tree, at dwarf2out.c:14964) on arm-linux-gnueabihf Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org seen with r222064 on arm-linux-gnueabihf, building the nauty package. $ cat traces.i typedef struct { int tolevel; int tgtsize; } TracesSpine; __thread TracesSpine a[]; b; fn1() { int c = a[b].tgtsize; } $ gcc -c -g -O2 traces.i traces.i:6:1: warning: data definition has no type or storage class b; ^ traces.i:6:1: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] traces.i:7:1: warning: return type defaults to 'int' [-Wimplicit-int] fn1() { int c = a[b].tgtsize; } ^ traces.i:5:22: warning: array 'a' assumed to have one element __thread TracesSpine a[]; ^ traces.i: In function 'fn1': traces.i:7:1: internal compiler error: in loc_list_from_tree, at dwarf2out.c:14964 fn1() { int c = a[b].tgtsize; } ^ 0x2cd239 loc_list_from_tree ../../src/gcc/dwarf2out.c:14964 0x2cc037 loc_list_from_tree ../../src/gcc/dwarf2out.c:14663 0x2cc54d loc_list_from_tree ../../src/gcc/dwarf2out.c:14870 0x2cbee7 loc_list_from_tree ../../src/gcc/dwarf2out.c:14700 0x2ce05f loc_descriptor_from_tree ../../src/gcc/dwarf2out.c:15033 0x2ce0e1 tls_mem_loc_descriptor ../../src/gcc/dwarf2out.c:11593 0x2ce7a3 loc_descriptor ../../src/gcc/dwarf2out.c:13576 0x2ce821 loc_descriptor ../../src/gcc/dwarf2out.c:13601 0x2ceb55 dw_loc_list_1 ../../src/gcc/dwarf2out.c:13878 0x2cbba7 dw_loc_list ../../src/gcc/dwarf2out.c:14148 0x2cbba7 loc_list_from_tree ../../src/gcc/dwarf2out.c:14584 0x2cfcaf add_location_or_const_value_attribute ../../src/gcc/dwarf2out.c:16092 0x2bc6ed gen_variable_die ../../src/gcc/dwarf2out.c:19281 0x2c298f gen_decl_die ../../src/gcc/dwarf2out.c:21025 0x2bdc23 process_scope_var ../../src/gcc/dwarf2out.c:20540 0x2bdd95 decls_for_scope ../../src/gcc/dwarf2out.c:20565 0x2be683 gen_subprogram_die ../../src/gcc/dwarf2out.c:18873 0x2c2d25 gen_decl_die ../../src/gcc/dwarf2out.c:20958 0x2c38bf dwarf2out_decl ../../src/gcc/dwarf2out.c:21391 0x2c3ef3 dwarf2out_function_decl ../../src/gcc/dwarf2out.c:21399 Please submit a full bug report, with preprocessed source if appropriate. $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.1~rc1-0ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=c++98 --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=yes --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 5.0.1 20150413 (prerelease) [gcc-5-branch revision 222064] (Ubuntu 5.1~rc1-0ubuntu11)