This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Builtins and C++ and such (take 3)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Mark Mitchell <mark at codesourcery dot com>, Paolo Carlini <pcarlini at unitus dot it>, Benjamin Kosnik <bkoz at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Sat, 30 Mar 2002 13:42:11 -0700 (MST)
- Subject: Re: [PATCH] Builtins and C++ and such (take 3)
On Thu, 28 Mar 2002, Mark Mitchell wrote:
> > The one line fix is the "SET_DECL_RTL (olddecl, DECL_RTL (newdecl))"
> You want COPY_DECL_RTL, I think. Right?
>
> I'm going to apply your patch with that change, test it, and then
> check it in.
I've just confirmed that it was changing this line to use COPY_DECL_RTL
that introduced the three new regressions in the libstdc++-v3 test suite.
g++'s tree inliner must require the "make_decl_rtl(NODE,NULL)" call
in the expansion of DECL_RTL. The following patch, reverts Mark's change
to my original patch (take 3), and should cure these regressions.
Tested with "make bootstrap" and "make -k check" on i686-pc-linux-gnu.
Ok for mainline and branch?
2002-03-30 Roger Sayle <roger@eyesopen.com>
* decl.c (duplicate_decls): Don't use COPY_DECL_RTL to reuse
the olddecl, but use the same SET_DECL_RTL idiom used earlier
in the same function. Fixes libstdc++-v3 testsuite regressions.
Index: decl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.885
diff -c -3 -p -r1.885 decl.c
*** decl.c 29 Mar 2002 21:46:21 -0000 1.885
--- decl.c 30 Mar 2002 17:18:29 -0000
*************** duplicate_decls (newdecl, olddecl)
*** 3623,3629 ****
TREE_READONLY (olddecl) = TREE_READONLY (newdecl);
TREE_THIS_VOLATILE (olddecl) = TREE_THIS_VOLATILE (newdecl);
TREE_SIDE_EFFECTS (olddecl) = TREE_SIDE_EFFECTS (newdecl);
! COPY_DECL_RTL (newdecl, olddecl);
}
/* Merge the storage class information. */
--- 3623,3629 ----
TREE_READONLY (olddecl) = TREE_READONLY (newdecl);
TREE_THIS_VOLATILE (olddecl) = TREE_THIS_VOLATILE (newdecl);
TREE_SIDE_EFFECTS (olddecl) = TREE_SIDE_EFFECTS (newdecl);
! SET_DECL_RTL (olddecl, DECL_RTL (newdecl));
}
/* Merge the storage class information. */
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833