summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr15245.c
blob: d7d9051a1c1a5c3593ad66547467e6d8cdfd2024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}