1 /* Test that LOOP will not be generated when body contains asm statement */
2
3 /* { dg-do compile } */
4 /* { dg-options "-O1 -mloop" } */
5
6 /* -O1 in the options is significant. Without it do-loop will not be
7 run. */
8
9 unsigned int
10 test_loop (unsigned int n)
11 {
12 unsigned i;
13 /* { dg-final { scan-assembler-not "loop\t.\+" } } */
14 for (i = 0; i < 10; i++) {
15 n <<= 2;
16 asm volatile ("nop" : : );
17 }
18 return n;
19 }