This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]