OSDN Git Service

PR testsuite/21010
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20050111-1.c
1 /* PR middle-end/19084, rtl-optimization/19348 */
2 /* { dg-do compile } */
3 /* The following ensures that this test is compiled with -O2, unless
4    on i?86 or x86_64 with -m32 option.  */
5 /* { dg-options "-O2" } */
6 /* { dg-options "-O2 -march=i686" { target i?86-*-* x86_64-*-* } } */
7 /* { dg-options "-O2" { target lp64 } } */
8
9 unsigned int
10 foo (unsigned long long x)
11 {
12   unsigned int u;
13
14   if (x == 0)
15     return 0;
16   u = (unsigned int) (x >> 32);
17   return u;
18 }
19
20 unsigned long long
21 bar (unsigned short x)
22 {
23   return (unsigned long long) x << 32;
24 }