diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-04-15 18:22:51 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-04-15 18:22:51 +0000 |
commit | bd1f29d927823c063ef88658743c274034fa801a (patch) | |
tree | 49ecfa881aa4a0f0a8fb837b144c464b196367d0 /gcc/tree-ssa-structalias.c | |
parent | 3bb3bb2d6e6690c10b502ac21189ae739672d7c4 (diff) | |
download | gcc-bd1f29d927823c063ef88658743c274034fa801a.zip gcc-bd1f29d927823c063ef88658743c274034fa801a.tar.gz gcc-bd1f29d927823c063ef88658743c274034fa801a.tar.bz2 |
tree-ssa-structalias.c (get_constraint_for_component_ref): Do not punt for STRING_CST.
* tree-ssa-structalias.c (get_constraint_for_component_ref): Do not
punt for STRING_CST.
(get_constraint_for): Deal with STRING_CST here instead.
From-SVN: r134325
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index cecafca..6f6eff4 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2657,11 +2657,6 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results) t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize); - /* String constants are readonly, so there is nothing to really do - here. */ - if (TREE_CODE (t) == STRING_CST) - return; - get_constraint_for (t, results); result = VEC_last (ce_s, *results); result->offset = bitpos; @@ -2779,6 +2774,16 @@ get_constraint_for (tree t, VEC (ce_s, heap) **results) return; } + /* String constants are read-only. */ + if (TREE_CODE (t) == STRING_CST) + { + temp.var = readonly_id; + temp.type = SCALAR; + temp.offset = 0; + VEC_safe_push (ce_s, heap, *results, &temp); + return; + } + switch (TREE_CODE_CLASS (TREE_CODE (t))) { case tcc_expression: |