diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-10 18:20:23 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-10 18:20:23 +0000 |
commit | ff949d479ea31a9ef1aaabba55a42a967febf6d7 (patch) | |
tree | 21d2365cfdaddec31b9d1307cf28d9ef6a64d907 /gcc/tree-ssa-ccp.c | |
parent | 466e11c3c0c21f33c90217f63c2be062186bbc77 (diff) | |
download | gcc-ff949d479ea31a9ef1aaabba55a42a967febf6d7.tar.gz |
gcc/
2008-03-10 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/35494
* tree-ssa-ccp.c (get_symbol_constant_value): Check if value
may be overriden at link and run time.
gcc/testsuite/
2008-03-10 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/35494
* g++.dg/tree-ssa/ssa-store-ccp-1.C: New.
* gcc.dg/tree-ssa/ssa-store-ccp-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-store-ccp-4.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index b9211a5df9c..7cefbf83893 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -300,7 +300,10 @@ get_symbol_constant_value (tree sym) { if (TREE_STATIC (sym) && TREE_READONLY (sym) - && !MTAG_P (sym)) + && !MTAG_P (sym) + /* Check if a read-only definition may be overridden at + link and run time. */ + && targetm.binds_local_p (sym)) { tree val = DECL_INITIAL (sym); if (val |