union U {
struct C
{
char c[4];
}cc;
int ii;
} u ;
void foo(int i)
{
u.cc.c[0] = 10; // Dead
u.cc.c[1] = 10; // Dead too
u.cc.c[i] = 10; // Dead too
u.ii = 20;
}
--
Summary: Missing DCE for union fields
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35291
