Commit 41e0c1a3 by Adam Nemet Committed by Adam Nemet

20060110-1.c: New test.

	* gcc.c-torture/execute/20060110-1.c: New test.
	* gcc.c-torture/execute/20060110-2.c: New test.

From-SVN: r109680
parent 4df8acd3
2006-01-13 Adam Nemet <anemet@caviumnetworks.com>
* gcc.c-torture/execute/20060110-1.c: New test.
* gcc.c-torture/execute/20060110-2.c: New test.
2006-01-13 Ulrich Weigand <uweigand@de.ibm.com>
* gcc.c-torture/compile/pr25310.c: Disable test on 16-bit targets.
extern void abort (void);
long long
f (long long a)
{
return (a << 32) >> 32;
}
long long a = 0x1234567876543210LL;
long long b = (0x1234567876543210LL << 32) >> 32;
int
main ()
{
if (f (a) != b)
abort ();
return 0;
}
extern void abort (void);
long long
f (long long a, long long b)
{
return ((a + b) << 32) >> 32;
}
long long a = 0x1234567876543210LL;
long long b = 0x2345678765432101LL;
long long c = ((0x1234567876543210LL + 0x2345678765432101LL) << 32) >> 32;
int
main ()
{
if (f (a, b) != c)
abort ();
return 0;
}
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