From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22277 invoked by alias); 18 Jun 2003 23:44:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22239 invoked by uid 48); 18 Jun 2003 23:44:35 -0000 Date: Wed, 18 Jun 2003 23:44:00 -0000 From: "bgreen at nas dot nasa dot gov" To: gcc-bugs@gcc.gnu.org Message-ID: <20030618234434.11247.bgreen@nas.nasa.gov> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11247] New: -frepo fails to instantiate typeinfo X-Bugzilla-Reason: CC X-SW-Source: 2003-06/txt/msg02053.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11247 Summary: -frepo fails to instantiate typeinfo Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: bgreen@nas.nasa.gov CC: gcc-bugs@gcc.gnu.org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu The code presented does not link successfully when using the -frepo option. The compiler fails to instantiate a typeinfo object in order to perform a dynamic cast operation. Failure of the code to link successfully inhibits library design. The code builds successfully when not using '-frepo'. [bgreen@ece06 ~/test]$ g++ -v Reading specs from /home/bgreen/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs Configured with: ../gcc/configure --prefix=/home/bgreen/local/gcc --enable-__cxa_atexit --enable-languages=c,c++,f77 Thread model: posix gcc version 3.3.1 20030616 (prerelease) [bgreen@ece06 ~/test]$ make g++ -g -Wall -frepo -c -o test.o test.C g++ -g -Wall -frepo -o test test.o test.o(.text+0x28): In function `main': /home/bgreen/test/test.C:18: undefined reference to `typeinfo for IType' collect2: ld returned 1 exit status make: *** [test] Error 1 [bgreen@ece06 ~/test]$ cat test.C class IBase { public: virtual ~IBase() {} }; template class IType : public IBase { public: IType() {} }; int main() { IBase *p = 0; dynamic_cast*>(p); }