From: Jan Hubicka Date: Wed, 29 May 2019 19:51:24 +0000 (+0200) Subject: * tree-ssa/alias-access-spath-1.c: new testcase. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=987c9fc581ffb04d5ab7a782bb7aee6205c45663;p=gcc.git * tree-ssa/alias-access-spath-1.c: new testcase. From-SVN: r271750 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19971c9a1ba..bb500f07e8c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-05-29 Jan Hubicka + + * tree-ssa/alias-access-spath-1.c: new testcase. + 2019-05-29 Paolo Carlini PR c++/89875 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-1.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-1.c new file mode 100644 index 00000000000..264f72aff0a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-1.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-fre3 -fno-tree-sra" } */ +struct foo +{ + int val; +} *fooptr; +struct bar +{ + struct foo foo; + int val2; +} *barptr; +int +test () +{ + struct foo foo = { 0 }; + barptr->val2 = 123; + *fooptr = foo; + return barptr->val2; +} + +/* { dg-final { scan-tree-dump-times "return 123" 1 "fre3"} } */