This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR tree-optimization/35494: [4.4 Regression]: Revision 132991 breaks 483.xalancbmk
On Sat, Mar 8, 2008 at 4:12 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Mar 08, 2008 at 03:46:38PM -0800, H.J. Lu wrote:
> > On Sat, Mar 8, 2008 at 3:31 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>
> > > This is only true with elf semantics; mach-o semantics say that a
> > > variable in a shared library is not overwritable.
> > >
> > >
> >
> > Do we have a function which returns if a definition may be overridden
> > at run-time?
> >
>
> Here is a patch to modify default_binds_local_p_1 to handle
> read-only symbol with initializer.
>
>
>
> H.J.
> ---
> gcc/
>
> 2008-03-08 H.J. Lu <hongjiu.lu@intel.com>
>
> PR tree-optimization/35501
> * c-typeck.c (decl_constant_value): Check if value may be
> overriden at run time.
>
> * tree-ssa-sccvn.c: Include "target.h".
> (try_to_simplify):Check if value may be overriden at run time.
>
> * varasm.c (default_binds_local_p_1): Return false for
> DECL_EXTERNAL only if it isn't read-only with initializer.
>
>
> PR tree-optimization/35494
> PR tree-optimization/35501
> * tree-ssa-ccp.c (get_symbol_constant_value): Check if value
> may be overriden at link and run time.
>
> gcc/testsuite/
>
> 2008-03-07 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.
>
> PR tree-optimization/35501
> * gcc.dg/pr35501-1.c: New.
> * gcc.dg/pr35501-2.c: Likewise.
> * gcc.dg/pr35501-3.c: Likewise.
> * gcc.dg/pr35501-4.c: Likewise.
>
This patch passes all tests on Linux/ia32, Linux/Intel64 and 483.xalancbmk.
H.J.