re PR inline-asm/79552 (Wrong code generation due to -fschedule-insns, with __restric...
authorRichard Biener <rguenther@suse.de>
Fri, 17 Feb 2017 10:43:27 +0000 (10:43 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Feb 2017 10:43:27 +0000 (10:43 +0000)
2017-02-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79552
* tree-ssa-structalias.c (visit_loadstore): Properly verify
default defs.

From-SVN: r245528

gcc/ChangeLog
gcc/tree-ssa-structalias.c

index 96ae59a0a7e3cf197e27a37c17b47799f5c8d7c8..03f490fbf37d20061e8e44d2d609513a40693d0c 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-17  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79552
+       * tree-ssa-structalias.c (visit_loadstore): Properly verify
+       default defs.
+
 2017-02-17  Richard Biener  <rguenther@suse.de>
 
        PR bootstrap/79567
index 390d5bba2fd8e2acfe452275edf5212d9eeee04c..c043e5ec3a6bcb8b7d9128b7463353a9461834e9 100644 (file)
@@ -7296,9 +7296,15 @@ visit_loadstore (gimple *, tree base, tree ref, void *data)
       || TREE_CODE (base) == TARGET_MEM_REF)
     {
       tree ptr = TREE_OPERAND (base, 0);
-      if (TREE_CODE (ptr) == SSA_NAME
-         && ! SSA_NAME_IS_DEFAULT_DEF (ptr))
+      if (TREE_CODE (ptr) == SSA_NAME)
        {
+         /* For parameters, get at the points-to set for the actual parm
+            decl.  */
+         if (SSA_NAME_IS_DEFAULT_DEF (ptr)
+             && (TREE_CODE (SSA_NAME_VAR (ptr)) == PARM_DECL
+                 || TREE_CODE (SSA_NAME_VAR (ptr)) == RESULT_DECL))
+           ptr = SSA_NAME_VAR (ptr);
+
          /* We need to make sure 'ptr' doesn't include any of
             the restrict tags we added bases for in its points-to set.  */
          varinfo_t vi = lookup_vi_for_tree (ptr);