This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,testsuite] fix remaining struct-reorg test on bare metal targets
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 15 Feb 2009 09:08:50 +0100
- Subject: [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);
}
/*--------------------------------------------------------------------------*/