comp-goto-1.c (uint32, sint32): Use long types if __INT_MAX__ is 32767.

* 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
This commit is contained in:
J"orn Rennecke 2000-12-21 22:50:12 +00:00 committed by Joern Rennecke
parent d8147b1eb1
commit 3546ef587f
2 changed files with 12 additions and 1 deletions

View 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.

View 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;