This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19687] New: [4.0 Regression] ICE with union initializer
- From: "belyshev at depni dot sinp dot msu dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2005 07:21:48 -0000
- Subject: [Bug middle-end/19687] New: [4.0 Regression] ICE with union initializer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compile this with "-O0 -march=i386" to get segmenation fault:
------------------------------------------------------------------------------
typedef union
{
int i, j[4];
} foo;
void bar ()
{
foo t = {};
}
------------------------------------------------------------------------------
Caused by this patch:
2005-01-26 Richard Henderson <rth@redhat.com>
PR middle-end/19515
* expr.c (categorize_ctor_elements): New argument p_must_clear.
(categorize_ctor_elements_1): Likewise. Detect a union that isn't
fully initialized.
(mostly_zeros_p): Update for new categorize_ctor_elements argument.
* gimplify.c (gimplify_init_constructor): Likewise. Only shove
objects into static storage if they have more than one non-zero value.
* tree.h (categorize_ctor_elements): Update decl.
--
Summary: [4.0 Regression] ICE with union initializer
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: critical
Priority: P1
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at depni dot sinp dot msu dot ru
CC: gcc-bugs at gcc dot gnu dot org,rth at gcc dot gnu dot
org
GCC target triplet: i386-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19687