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
This commit is contained in:
parent
4df8acd3c8
commit
41e0c1a3ad
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
16
gcc/testsuite/gcc.c-torture/execute/20060110-1.c
Normal file
16
gcc/testsuite/gcc.c-torture/execute/20060110-1.c
Normal file
@ -0,0 +1,16 @@
|
||||
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;
|
||||
}
|
19
gcc/testsuite/gcc.c-torture/execute/20060110-2.c
Normal file
19
gcc/testsuite/gcc.c-torture/execute/20060110-2.c
Normal file
@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user