summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 10:03:00 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 10:03:00 +0000
commitcc0c0682badbcd4377f3f80e9bb7429d0a132cee (patch)
tree08bae8855a426548ccb425008d01bcf366851c46 /gcc
parent71a2f35e5978e483790debb7a469f4c28dc5ca19 (diff)
downloadgcc-cc0c0682badbcd4377f3f80e9bb7429d0a132cee.tar.gz
PR tree-optimization/44885
* tree-sra.c (find_param_candidates): Skip pointer types to arrays with non-aliased component. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-sra.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 177c873987f..f13b647bdd5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR tree-optimization/44885
+ * tree-sra.c (find_param_candidates): Skip pointer types to arrays
+ with non-aliased component.
+
2010-07-28 Joseph Myers <joseph@codesourcery.com>
* config/darwin-driver.c (SWITCH_TAKES_ARG,
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 4893962b65e..0c1932e21bf 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3147,6 +3147,8 @@ find_param_candidates (void)
if (TREE_CODE (type) == FUNCTION_TYPE
|| TYPE_VOLATILE (type)
+ || (TREE_CODE (type) == ARRAY_TYPE
+ && TYPE_NONALIASED_COMPONENT (type))
|| !is_gimple_reg (parm)
|| is_va_list_type (type)
|| ptr_parm_has_direct_uses (parm))