From c2cf2f4a617f9fe6e69daca04b37e91b99bad0fe Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 28 Jul 2010 10:03:00 +0000 Subject: [PATCH] re PR tree-optimization/44885 (miscompilation of gnat.dg/aliasing3.adb after mem-ref2) PR tree-optimization/44885 * tree-sra.c (find_param_candidates): Skip pointer types to arrays with non-aliased component. From-SVN: r162621 --- gcc/ChangeLog | 6 ++++++ gcc/tree-sra.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 177c873987fe..f13b647bdd50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-07-28 Eric Botcazou + + PR tree-optimization/44885 + * tree-sra.c (find_param_candidates): Skip pointer types to arrays + with non-aliased component. + 2010-07-28 Joseph Myers * config/darwin-driver.c (SWITCH_TAKES_ARG, diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 4893962b65e8..0c1932e21bfa 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)) -- 2.47.2