diff options
author | Easwaran Raman <eraman@google.com> | 2011-04-20 18:34:59 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@gcc.gnu.org> | 2011-04-20 18:34:59 +0000 |
commit | 4a25752bbd26c53f9c1c821afcfaf4b92ccb0527 (patch) | |
tree | 82b888cb47014836fd0f723d4bff154d61225312 /gcc/cfgexpand.c | |
parent | 1809ba94d466b185e0f468999138796cf0da54c7 (diff) | |
download | gcc-4a25752bbd26c53f9c1c821afcfaf4b92ccb0527.zip gcc-4a25752bbd26c53f9c1c821afcfaf4b92ccb0527.tar.gz gcc-4a25752bbd26c53f9c1c821afcfaf4b92ccb0527.tar.bz2 |
cfgexpand.c (add_alias_set_conflicts): Add conflicts with a variable containing union type only with -fstrict-aliasing.
2011-04-20 Easwaran Raman <eraman@google.com>
* cfgexpand.c (add_alias_set_conflicts): Add conflicts with a variable
containing union type only with -fstrict-aliasing.
2011-04-20 Easwaran Raman <eraman@google.com>
* gcc.dg/stack-layout-1.c: New test.
From-SVN: r172788
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index a3abc84..e88bec1 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -373,8 +373,9 @@ add_alias_set_conflicts (void) to elements will conflict. In case of unions we have to be careful as type based aliasing rules may say access to the same memory does not conflict. So play - safe and add a conflict in this case. */ - || contains_union) + safe and add a conflict in this case when + -fstrict-aliasing is used. */ + || (contains_union && flag_strict_aliasing)) add_stack_var_conflict (i, j); } } |