gcc/testsuite/gcc.dg/ipa/ipa-sra-20.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1 -fipa-sra" } */ |
| 3 | |
| 4 | typedef struct { |
| 5 | int a; |
| 6 | } b; |
| 7 | typedef struct { |
| 8 | double c; |
| 9 | double a; |
| 10 | } d; |
| 11 | typedef struct { |
| 12 | d e; |
| 13 | d f; |
| 14 | } g; |
| 15 | g h; |
| 16 | b i, m; |
| 17 | int j, k, l, n, o; |
| 18 | static b q(d s) { |
| 19 | int r = s.c ?: 0; |
| 20 | if (r) |
| 21 | if (j) |
| 22 | l = j - 2; |
| 23 | o = k; |
| 24 | n = l; |
| 25 | i = m; |
| 26 | return m; |
| 27 | } |
| 28 | static void t(g s) { |
| 29 | { |
| 30 | d p = s.e; |
| 31 | int r = p.c ?: 0; |
| 32 | if (r) { |
| 33 | l = j - 2; |
| 34 | } |
| 35 | } |
| 36 | b f = q(s.f); |
| 37 | } |
| 38 | void main() { t(h); } |