]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/44885 (miscompilation of gnat.dg/aliasing3.adb after mem...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 28 Jul 2010 10:03:00 +0000 (10:03 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 28 Jul 2010 10:03:00 +0000 (10:03 +0000)
PR tree-optimization/44885
* tree-sra.c (find_param_candidates): Skip pointer types to arrays
with non-aliased component.

From-SVN: r162621

gcc/ChangeLog
gcc/tree-sra.c

index 177c873987fe992dd2de608ba2ccef1bd5c1b69d..f13b647bdd50c051eb34681e6d2eb25376eba006 100644 (file)
@@ -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,
index 4893962b65e8f41b95c4999cdb480cdbc6404f3a..0c1932e21bfa820677e37bad1e783544a7302efe 100644 (file)
@@ -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))