gcc/testsuite/g++.dg/opt/pr100852.C
raw| 1 | // PR debug/100852 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop -fcompare-debug" } |
| 4 | |
| 5 | static inline int |
| 6 | min (unsigned a, int b) |
| 7 | { |
| 8 | return a < b ? a : b; |
| 9 | } |
| 10 | |
| 11 | struct S { S (char); }; |
| 12 | |
| 13 | static inline S |
| 14 | foo (unsigned x) |
| 15 | { |
| 16 | int h; |
| 17 | h += min (x * 4, h); |
| 18 | return h; |
| 19 | } |
| 20 | |
| 21 | void |
| 22 | bar () |
| 23 | { |
| 24 | foo (0); |
| 25 | } |