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]

[PATCH,testsuite] fix remaining struct-reorg test on bare metal targets


Hello!

This patch just fixes one remaining struct-reorg test on bare metal targets, see [1].

2009-02-15 Uros Bizjak <ubizjak@gmail.com>

* gcc.dg/struct/w_prof_single_str_global.c: Mask return value.

Patch was tested on x86_64-pc-linux-gnu.

Patch is committed to mainline. I will backport both patches to 4.3 branch.

[1] http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00611.html

Uros.
Index: gcc.dg/struct/w_prof_single_str_global.c
===================================================================
--- gcc.dg/struct/w_prof_single_str_global.c	(revision 144186)
+++ gcc.dg/struct/w_prof_single_str_global.c	(working copy)
@@ -22,7 +22,9 @@
   if (str.a != res)
     abort ();
 
-  return str.a;
+  /* POSIX ignores all but the 8 low-order bits, but other
+     environments may not.  */
+  return (str.a & 255);
 }
 
 /*--------------------------------------------------------------------------*/

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