]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
wo_prof_single_str_global.c: Mask return value.
authorMark Mitchell <mark@codesourcery.com>
Mon, 12 Jan 2009 21:29:43 +0000 (21:29 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Mon, 12 Jan 2009 21:29:43 +0000 (21:29 +0000)
* gcc.dg/struct/wo_prof_single_str_global.c: Mask return value.
* gcc.dg/struct/wo_prof_single_str_local.c: Mask return value.
* gcc.dg/struct/wo_prof_single_str_pointer.c: Mask return value.

From-SVN: r143309

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c
gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c
gcc/testsuite/gcc.dg/struct/wo_prof_single_str_pointer.c

index 9ae7b395cb8f6831791a632be333cf5c2fc86bd6..53ad9ce495e349cf12a6caba17c9250695305e56 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-12  Mark Mitchell  <mark@codesourcery.com>
+
+       * gcc.dg/struct/wo_prof_single_str_global.c: Mask return value.
+       * gcc.dg/struct/wo_prof_single_str_local.c: Mask return value.
+       * gcc.dg/struct/wo_prof_single_str_pointer.c: Mask return value.
+
 2009-01-12  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/other/vararg-3.C: New test.
index 81c3edfa4135decd15d698e7ce493e4336ab7790..1312a35494bdb3802b6d94a6843c1aca50816525 100644 (file)
@@ -24,8 +24,10 @@ main ()
   
   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 f9cb7d58a5d62f0fc1c288e00513b4b93da4eddc..e17ca56ee8b5c830544fd6e8d8c75401537a4a96 100644 (file)
@@ -25,7 +25,9 @@ main ()
   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 fd562579b351cd55c0ff3647b0f4e787e5fc4795..bd70dfb63756ba9b216e65c4d8dd72e677b24346 100644 (file)
@@ -29,7 +29,9 @@ main ()
   if (p->a != res)
     abort ();
   
-  return p->a;
+  /* POSIX ignores all but the 8 low-order bits, but other
+     environments may not.  */
+  return (p->a & 255);
 }
 
 /*--------------------------------------------------------------------------*/