From 987c9fc581ffb04d5ab7a782bb7aee6205c45663 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 29 May 2019 21:51:24 +0200 Subject: [PATCH] * tree-ssa/alias-access-spath-1.c: new testcase. From-SVN: r271750 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.dg/tree-ssa/alias-access-path-1.c | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-1.c 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"} } */ -- 2.30.2