diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr15245.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr15245.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr15245.c b/gcc/testsuite/gcc.c-torture/compile/pr15245.c new file mode 100644 index 00000000000..d7d9051a1c1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr15245.c @@ -0,0 +1,21 @@ +/* Testcase from <marcus@jet.franken.de> + PR optimization/15245 + This used to ICE as convert was used + in tree-ssa-phiopt which created non gimple + code. */ + +char *f(char *x, int flag) +{ + char *ret = (char*)0; + + + if( x > (char*)1 ) { + if(x) + return (char*)0; + } else { + if( flag & 1 ) + ret = (char*)1; + flag |= 2; + } + return ret; +} |