]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-structalias.c (get_constraint_for_1): Constants only point to nonlocal,...
authorRichard Guenther <rguenther@suse.de>
Tue, 12 Oct 2010 12:56:32 +0000 (12:56 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 12 Oct 2010 12:56:32 +0000 (12:56 +0000)
2010-10-12  Richard Guenther  <rguenther@suse.de>

* tree-ssa-structalias.c (get_constraint_for_1): Constants
only point to nonlocal, not anything.

From-SVN: r165372

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

index cf4ca0f4b1f7feed99edfd189c41ea324ce4ef0a..9ce3832a99e1ac868e202c38dbc9062b56726c4c 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-12  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-structalias.c (get_constraint_for_1): Constants
+       only point to nonlocal, not anything.
+
 2010-10-11  Hariharan Sandanagobalane  <hariharan@picochip.com>
 
        * config/picochip/picochip.c (TARGET_EXCEPT_UNWIND_INFO): Use sjlj
index 83cc95352f33e517addd7d31c95ca0ae5698da69..c2a82efa27cddf0de2c9020b54c046af714ad8a7 100644 (file)
@@ -3335,7 +3335,7 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
       if (flag_delete_null_pointer_checks)
        temp.var = nothing_id;
       else
-       temp.var = anything_id;
+       temp.var = nonlocal_id;
       temp.type = ADDRESSOF;
       temp.offset = 0;
       VEC_safe_push (ce_s, heap, *results, &temp);
@@ -3428,6 +3428,15 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
        get_constraint_for_ssa_var (t, results, address_p);
        return;
       }
+    case tcc_constant:
+      {
+       /* We cannot refer to automatic variables through constants.  */ 
+       temp.type = ADDRESSOF;
+       temp.var = nonlocal_id;
+       temp.offset = 0;
+       VEC_safe_push (ce_s, heap, *results, &temp);
+       return;
+      }
     default:;
     }