summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr41643.c
blob: 7c0743da41a8fae17b9fe4a818bfcb5630097f5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR tree-optimization/41643 */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-dce" } */

struct S { int a; };

int
f (struct S *x)
{
  int a = x->a;
  if (a)
    return f (x) + a;
  else
    return f (x);
}