[PATCH] Re: 3 new fails with builtin patch
Roger Sayle
roger@eyesopen.com
Sat Mar 30 07:04:00 GMT 2002
> This is Ok! As is the first one if compiled -O. Therefore, it looks
> like the problem mentioned in
> http://gcc.gnu.org/ml/libstdc++/2002-03/msg00460.html about inline
> declarations is still there.
It looks like there was a simple mistake (typo) in Mark's change to
use COPY_DECL_RTL instead of the SET_DECL_RTL that I originally had,
see http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01890.html
The old declaration's RTL needs to be set from the new DECL_RTL.
The obvious fix below should cure the problem. This patch is
completelty untested. Mark?
2002-03-30 Roger Sayle <roger@eyesopen.com>
* decl.c (duplicate_decls): Correct direction of assignment.
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 14:53:19 -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);
! COPY_DECL_RTL (olddecl, 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
More information about the Gcc-patches
mailing list