gcc/testsuite/gcc.target/sparc/sparc-loop-1.c
raw| 1 | /* PR optimization/10157 */ |
| 2 | /* Originator: Peter van Hoof <[email protected]> */ |
| 3 | |
| 4 | /* { dg-do compile } */ |
| 5 | /* { dg-options "-O2 -ffast-math" } */ |
| 6 | |
| 7 | /* Verify that the loop optimizer doesn't |
| 8 | emit invalid reg-to-reg copy insns. */ |
| 9 | |
| 10 | void g() { |
| 11 | while(1) { |
| 12 | int i,n; |
| 13 | double p,r; |
| 14 | for( i=0; i < n; i++ ) |
| 15 | if( p > 1. ) |
| 16 | for( i=0; i < n; i++ ) |
| 17 | r += 2.; |
| 18 | } |
| 19 | } |