Bug 16475 - [3.4/4.0 Regression] FAIL: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE:
Summary: [3.4/4.0 Regression] FAIL: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplat...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: 3.4.2
Assignee: Andrew Pinski
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2004-07-11 17:57 UTC by John David Anglin
Modified: 2004-09-13 14:15 UTC (History)
2 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.00
Target: hppa2.0w-hp-hpux11.00
Build: hppa2.0w-hp-hpux11.00
Known to work:
Known to fail:
Last reconfirmed: 2004-07-12 05:55:49


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2004-07-11 17:57:34 UTC
Executing on host: /xxx/gnu/gcc-3.4/objdir/gcc/testsuite/../g++ -B/xxx/gnu/gcc-3
.4/objdir/gcc/testsuite/../ /xxx/gnu/gcc-3.4/gcc/gcc/testsuite/g++.dg/rtti/tinfo
1.C  -nostdinc++ -I/xxx/gnu/gcc-3.4/objdir/hppa2.0w-hp-hpux11.00/libstdc++-v3/in
clude/hppa2.0w-hp-hpux11.00 -I/xxx/gnu/gcc-3.4/objdir/hppa2.0w-hp-hpux11.00/libs
tdc++-v3/include -I/xxx/gnu/gcc-3.4/gcc/libstdc++-v3/libsupc++ -I/xxx/gnu/gcc-3.
4/gcc/libstdc++-v3/libsupc++ -I/xxx/gnu/gcc-3.4/gcc/libstdc++-v3/include/backwar
d -I/xxx/gnu/gcc-3.4/gcc/libstdc++-v3/testsuite -fmessage-length=0   -ansi -peda
ntic-errors -Wno-long-long  -S  -o tinfo1.s    (timeout = 300)
PASS: g++.dg/rtti/tinfo1.C (test for excess errors)
FAIL: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE:
PASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE
PASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*
_ZTIP9CTemplateIhE[^\n\r]*

Looking at tinfo1.s, I see:

       .IMPORT _ZTIP9CTemplateIhE,DATA

        ldil LR'_ZTIP9CTemplateIhE,%r19
        ldo RR'_ZTIP9CTemplateIhE(%r19),%r26
        .CALL ARGW0=GR
        bl _ZNKSt9type_info4nameEv,%r2

        ldil LR'_ZTIP9CTemplateIhE,%r19
        ldo RR'_ZTIP9CTemplateIhE(%r19),%r26
        .CALL ARGW0=GR
        bl _ZNKSt9type_info4nameEv,%r2

        .align 4
_ZTIP9CTemplateIhE
        .IMPORT _ZTVN10__cxxabiv119__pointer_type_infoE,DATA
        .word   _ZTVN10__cxxabiv119__pointer_type_infoE+8
        .word   _ZTSP9CTemplateIhE
        .word   8
        .word   _ZTI9CTemplateIhE
        .weak   _ZTSP9CTemplateIhE
        .EXPORT _ZTSP9CTemplateIhE,DATA

This problem was introduced by the fix for PR c++/16276.
Comment 1 Andrew Pinski 2004-07-12 05:55:49 UTC
I have a semi fix for it, as it also wrong on powerpc-apple-darwin, the rest of the fix is for other 
targets which define MAKE_DECL_ONE_ONLY also define MAKE_DECL_NON_ONE_ONLY with right 
definition. 
Comment 2 Andrew Pinski 2004-07-12 06:41:11 UTC
Here is the first part of the patch which fixes the darwin issue: <http://gcc.gnu.org/ml/gcc-patches/
2004-07/msg00878.html>, fixing the other target issues is easier and HJL suggested one approach 
but I think it is wrong and each target which defines its own MAKE_DECL_ONE_ONLY should also define 
its own MAKE_DECL_NON_ONE_ONLY.
Comment 3 Andrew Pinski 2004-07-12 06:41:49 UTC
Mine, I will do the second part tommorrow (Monday).
Comment 4 Andrew Pinski 2004-07-12 20:53:31 UTC
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01275.html>.
Comment 5 Andrew Pinski 2004-07-12 22:15:10 UTC
I am just reverting the patch per Mark's request.
Comment 6 GCC Commits 2004-07-12 22:26:42 UTC
Subject: Bug 16475

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	pinskia@gcc.gnu.org	2004-07-12 22:26:39

Modified files:
	gcc/cp         : ChangeLog rtti.c 

Log message:
	2004-07-12  Andrew Pinski  <apinski@apple.com>
	
	PR c++/16475
	Revert:
	2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
	PR c++/16276
	* rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
	is not public.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.131&r2=1.3892.2.132
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.176.4.4&r2=1.176.4.5

Comment 7 GCC Commits 2004-07-12 22:28:57 UTC
Subject: Bug 16475

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2004-07-12 22:28:54

Modified files:
	gcc/cp         : ChangeLog rtti.c 

Log message:
	2004-07-12  Andrew Pinski  <apinski@apple.com>
	
	PR c++/16475
	Revert:
	2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
	PR c++/16276
	* rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
	is not public.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4193&r2=1.4194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&r1=1.187&r2=1.188

Comment 8 Andrew Pinski 2004-07-12 22:29:42 UTC
Fixed.