aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-4.c
blob: 178ebda47587ebf1efe5634971effbaf4f28a277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized-details-blocks" } */

/* Testcase extracted from PR15353.  */

extern void bar(void);

void foo (int x, int a)
{
  /* if ((x < a) || (x != a)) return; else bar (); */
  if (x < a)
    return;
  if (x != a)
    return;

  /* else */
  bar ();
}

/* { dg-final { scan-tree-dump "!=" "optimized" } } */
/* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */