Commit 3546ef58 by J"orn Rennecke Committed by Joern Rennecke

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
parent d8147b1e
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.
......
#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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment