diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr115143-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr115143-1.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c b/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c new file mode 100644 index 0000000..5cb119e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c @@ -0,0 +1,21 @@ +/* PR tree-optimization/115143 */ +/* This used to ICE. + minmax part of phiopt would transform, + would transform `a!=0?min(a, b) : 0` into `min(a,b)` + which was correct except b was defined by a phi in the inner + bb which was not handled. */ +short a, d; +char b; +long c; +unsigned long e, f; +void g(unsigned long h) { + if (c ? e : b) + if (e) + if (d) { + a = f ? ({ + unsigned long i = d ? f : 0, j = e ? h : 0; + i < j ? i : j; + }) : 0; + } +} + |