gcc/testsuite/gcc.target/s390/section-anchors2.c
raw| 1 | /* Test corner case when LG from literal pool could be preferred to LARL. */ |
| 2 | |
| 3 | /* { dg-do compile { target { lp64 } } } */ |
| 4 | /* { dg-options "-O3 -march=z13" } */ |
| 5 | |
| 6 | int e = 42; |
| 7 | int *c = &e; |
| 8 | |
| 9 | void |
| 10 | h (int *i) |
| 11 | { |
| 12 | c = i; |
| 13 | } |
| 14 | |
| 15 | void |
| 16 | j () |
| 17 | { |
| 18 | h (&e); |
| 19 | /* { dg-final { scan-assembler {(?n)\n\tlarl\t.+\n\tstgrl\t.+\n\tbr\t%r14\n} } } */ |
| 20 | } |
| 21 | |
| 22 | void |
| 23 | f () |
| 24 | { |
| 25 | h (c); |
| 26 | } |