[Bug target/42448] New: Wrong code with _Complex char in structure
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 21 13:18:00 GMT 2009
Following testcase:
--cut here--
struct S2180
{
char t;
_Complex char u[2];
};
struct S2180 s2180;
int
main (void)
{
volatile struct S2180 x;
s2180.u[1] = 3 + 4i;
x.u[1] = s2180.u[1];
if (x.u[1] != s2180.u[1])
abort ();
return 0;
}
--cut here--
aborts for all optimization levels.
This bug shows in the testsuite of 4.4 branch [1]:
Running target unix
FAIL: tmpdir-gcc.dg-struct-layout-1/t024 c_compat_x_tst.o-c_compat_y_tst.o
execute
FAIL: tmpdir-gcc.dg-struct-layout-1/t027 c_compat_x_tst.o-c_compat_y_tst.o
execute
The bug is also present on 4.3 and 4.5.
[1] http://gcc.gnu.org/ml/gcc-testresults/2009-12/msg01241.html
--
Summary: Wrong code with _Complex char in structure
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ubizjak at gmail dot com
GCC build triplet: alpha-linux-gnu
GCC host triplet: alpha-linux-gnu
GCC target triplet: alpha-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42448
More information about the Gcc-bugs
mailing list