Bug 57427 - [4.8 Regression] ICE in gimplify_init_constructor
Summary: [4.8 Regression] ICE in gimplify_init_constructor
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.1
: P3 normal
Target Milestone: 4.9.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-27 10:13 UTC by Hiromasa YOSHIMOTO
Modified: 2015-06-23 08:37 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.9.3, 5.0
Known to fail: 4.8.0, 4.8.5
Last reconfirmed: 2013-05-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiromasa YOSHIMOTO 2013-05-27 10:13:27 UTC
I found ICE with the following code;

$ cat test.cpp
struct A {
  A();
};
static const struct {
  A a;
} b[3] = {
};

$ g++-4.8 -c bug.cpp
bug.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’:
bug.cpp:7:1: internal compiler error: in gimplify_init_constructor, at gimplify.c:4269
 };
 ^

$ g++-4.8 -v 
Using built-in specs.
COLLECT_GCC=g++-4.8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.0-7' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.0 (Debian 4.8.0-7) 

It also ices with the following GCCs;
- gcc version 4.8.1 20130523
- gcc version 4.7.4 20130504
Comment 1 Marek Polacek 2013-05-29 09:00:54 UTC
Confirmed.
Comment 2 Jakub Jelinek 2013-10-16 09:48:22 UTC
GCC 4.8.2 has been released.
Comment 3 Marek Polacek 2014-12-09 14:23:53 UTC
4.6, 4.9, 5 work; 4.7, 4.8 ICE.
Comment 4 Richard Biener 2015-06-23 08:37:09 UTC
Fixed for 4.9.0.