summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr51821.c
blob: 158172ff4bd50d38082eb869ee3f0d36ee11f940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do run } */
/* { dg-options "-std=c99 -O2" } */
/* { dg-options "-std=c99 -O2 -msse" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */

extern void abort (void);

unsigned int  __attribute__((noinline))
test (int shift_size)
{
  unsigned long long res = ~0;

  return res << shift_size;
}

int
main ()
{
  int dst = 32;

  if (test (dst) != 0)
    abort ();

  return 0;
}