diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/pr26179.C')
-rw-r--r-- | gcc/testsuite/g++.dg/opt/pr26179.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/pr26179.C b/gcc/testsuite/g++.dg/opt/pr26179.C new file mode 100644 index 000000000..32cd7a00e --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr26179.C @@ -0,0 +1,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; +} |