summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr26179.C
blob: 32cd7a00ea9dca7575cf59049e8033072c211761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* The problem here is that Load PRE on the tree level
   forgot to handle RETURN_DECL which causes us to ICE. */

// { dg-do compile }
// { dg-options "-O2" }

struct a
{
  int i;
};
void h(struct a&);
void l(void);

struct a g(void)
{
  struct a fl;
  h(fl);
  if (fl.i)
    l();
  fl.i+=2;
  return fl;
}