gcc/testsuite/g++.dg/opt/store-merging-4.C
raw| 1 | // PR tree-optimization/94717 |
| 2 | // Reported by Zdenek Sojka <[email protected]> |
| 3 | |
| 4 | // { dg-do compile } |
| 5 | // { dg-options "-O2 -fnon-call-exceptions -ftracer" } |
| 6 | |
| 7 | int abs (int); |
| 8 | |
| 9 | static inline void |
| 10 | bar (int d) |
| 11 | { |
| 12 | d && abs (d); |
| 13 | } |
| 14 | |
| 15 | struct S |
| 16 | { |
| 17 | int a; |
| 18 | int b; |
| 19 | int c; |
| 20 | S (unsigned a, unsigned b) : a (a), b (b) { } |
| 21 | }; |
| 22 | |
| 23 | void |
| 24 | foo (S *x) |
| 25 | { |
| 26 | bar (x->c); |
| 27 | new S (x->a, x->b); |
| 28 | bar (0); |
| 29 | } |