comp-goto-1.c (uint32, sint32): Use long types if __INT_MAX__ is 32767.
authorJ"orn Rennecke <amylaar@redhat.com>
Thu, 21 Dec 2000 22:50:12 +0000 (22:50 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 21 Dec 2000 22:50:12 +0000 (22:50 +0000)
* gcc.c-torture/execute/comp-goto-1.c (uint32, sint32):
Use long types if __INT_MAX__ is 32767.
(main): Use cast to (sint32 *) when poking 88 into a_page.

From-SVN: r38431

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c

index fee539ef276a36136f3d9e93f059385a7a1090f1..7c096cd0ef31b5cbfb75b178a2d48d3c8794b4d2 100644 (file)
@@ -1,3 +1,9 @@
+Thu Dec 21 22:43:03 2000  J"orn Rennecke <amylaar@redhat.com>
+
+       * gcc.c-torture/execute/comp-goto-1.c (uint32, sint32):
+       Use long types if __INT_MAX__ is 32767.
+       (main): Use cast to (sint32 *) when poking 88 into a_page.
+
 2000-12-21  Bernd Schmidt  <bernds@redhat.com>
 
        * gcc.c-torture/compile/20001221-1.c: New test.
index f9f6c126df308a8d271f4d0299ea51e30bfe8ec1..729b1f59876a92146d447f81e7af67e9684b1b08 100644 (file)
@@ -1,8 +1,13 @@
 #include <stdlib.h>
 
 #ifndef NO_LABEL_VALUES
+#if __INT_MAX__ == 32767
+typedef unsigned long uint32;
+typedef signed long sint32;
+#else
 typedef unsigned int uint32;
 typedef signed int sint32;
+#endif
 
 typedef uint32 reg_t;
 
@@ -139,7 +144,7 @@ main ()
   insn.f1.offset = LOAD32_RR;
   env.registers[0] = 0;
   env.registers[2] = a_vaddr;
-  *(int *) (a_page + a_vaddr % 4096) = 88;
+  *(sint32 *) (a_page + a_vaddr % 4096) = 88;
   insn.f1.s1 = 0;
   insn.f1.s2 = 2;