diff options
author | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-07-18 16:35:15 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-07-18 16:35:15 -0700 |
commit | 00b6cf8be6ce683680e0a278c2d756f61402cd8b (patch) | |
tree | 876b7b1c29e16db6bdecb4b6d9e18846c8735d2b /gcc | |
parent | 7825308e2053d319f1fb2162968bbf84a86acae3 (diff) | |
download | gcc-00b6cf8be6ce683680e0a278c2d756f61402cd8b.zip gcc-00b6cf8be6ce683680e0a278c2d756f61402cd8b.tar.gz gcc-00b6cf8be6ce683680e0a278c2d756f61402cd8b.tar.bz2 |
alias-2.c: New test.
2005-07-18 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/tree-ssa/alias-2.c: New test.
From-SVN: r102143
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/alias-2.c | 27 |
2 files changed, 34 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8822852..b367759 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,11 +1,16 @@ +2005-07-18 Andrew Pinski <pinskia@physics.uc.edu> + + * gcc.dg/tree-ssa/alias-2.c: New test. + 2005-07-18 Mark Mitchell <mark@codesourcery.com> PR c++/22263 * g++.dg/template/explicit7.C: New test. 2005-07-17 Jerry DeLisle <jvdelisle@verizon.net> - * gfortran.fortran-torture/execute/nan_inf_fmt.f90: Change case of field - width of 8 to +Inf and -Inf. + + * gfortran.fortran-torture/execute/nan_inf_fmt.f90: Change case of field + width of 8 to +Inf and -Inf. 2005-07-17 Mark Mitchell <mark@codesourcery.com> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-2.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-2.c new file mode 100644 index 0000000..fde5c39 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-2.c @@ -0,0 +1,27 @@ +/* { dg-options "-O2 -fdump-tree-optimized" } */ +static int a; +int f; +void bar (void) __attribute__((noinline)); +void bar (void) +{ + f = 9; +} + +void link_error (); + +int foo() +{ + int b, c; + a = 5; + b = a; + bar (); + b = b + a; + if (b != 10) + link_error (); + return b; +} + +/* We should have removed the link_error on the tree level as GCC can tell that + a is not touched by the calling bar at all. */ +/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |