OSDN Git Service

Formatting fixes.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ultrasp10.c
1 /* PR target/11965 */
2 /* Originator: <jk@tools.de> */
3 /* { dg-do run { target sparc*-*-* } } */
4 /* { dg-options "-O -mcpu=ultrasparc" } */
5
6 /* This used to fail on 32-bit Ultrasparc because GCC emitted
7    an invalid shift instruction.  */
8
9
10 static inline unsigned int shift(int n, unsigned int value)
11 {
12   return value << n;
13 }
14
15 unsigned int val = 1;
16
17 int main(void)
18 {
19   int i;
20
21   for (i = 0; i < 4; i++)
22     val = shift(32, val);
23
24   return 0;
25 }