re PR fortran/49103 (local variables exchange values / wrong code with -O3)
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Jun 2011 15:27:24 +0000 (17:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 Jun 2011 15:27:24 +0000 (17:27 +0200)
commit1ace6185d22d5e23cf3fae342b9b48d18caad644
treea038a08891c77147df8061be5e5979cdc97b4947
parent6b14c6d7ffc25b92aeea21f0c0c050582d3ed771
re PR fortran/49103 (local variables exchange values / wrong code with -O3)

PR fortran/49103
* tree.h (DECL_NONSHAREABLE): Define.
(struct tree_decl_common): Change decl_common_unused to
decl_nonshareable_flag.
* cfgexpand.c (expand_used_vars_for_block, clear_tree_used):
Ignore vars with DECL_NONSHAREABLE bit set.
* tree-cfg.c (gimple_duplicate_bb): Set DECL_NONSHAREABLE
on stores to automatic aggregate vars.

* gfortran.dg/pr49103.f90: New test.

From-SVN: r175028
gcc/ChangeLog
gcc/cfgexpand.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr49103.f90 [new file with mode: 0644]
gcc/tree-cfg.c
gcc/tree.h