This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
pr44258.c failing on targets with padded structs
- From: Joern Rennecke <joern dot rennecke at embecosm dot com>
- To: gcc-patches at gcc dot gnu dot org, mjambor at suse dot cz
- Date: Tue, 26 Oct 2010 18:16:20 -0400
- Subject: pr44258.c failing on targets with padded structs
gcc.dg/tree-ssa/pr44258.c fails on a target that adds extra alignment
to structs to improve efficiency.
AFAICT, the intent was that u.str.b1 and u.val.b2 overlap; this is
accomplished
with the attached patch.
2010-10-26 Joern Rennecke <joern.rennecke@embecosm.com>
* gcc.dg/tree-ssa/pr44258.c (struct val): Mark b2 as packed.
gcc/testsuite/gcc.dg/tree-ssa/pr44258.c
gcc/testsuite/gcc.dg/tree-ssa/pr44258.c (working copy)
@@ -15,7 +15,7 @@ struct str
struct val
{
char y;
- struct blah b2;
+ struct blah b2 __attribute__((packed));
};
union U