public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11247] New: -frepo fails to instantiate typeinfo
@ 2003-06-18 23:44 bgreen at nas dot nasa dot gov
  2003-06-19 13:47 ` [Bug c++/11247] " bangerth at dealii dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bgreen at nas dot nasa dot gov @ 2003-06-18 23:44 UTC (permalink / raw)
  To: gcc-bugs

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<int>'
collect2: ld returned 1 exit status
make: *** [test] Error 1

[bgreen@ece06 ~/test]$ cat test.C
 
class IBase
{
public:
    virtual ~IBase() {}
};
 
template <typename T>
class IType : public IBase
{
public:
    IType() {}
};
 
int main()
{
    IBase *p = 0;
    dynamic_cast<IType<int>*>(p);
}


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-31  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-18 23:44 [Bug c++/11247] New: -frepo fails to instantiate typeinfo bgreen at nas dot nasa dot gov
2003-06-19 13:47 ` [Bug c++/11247] " bangerth at dealii dot org
2003-07-29 16:33 ` pinskia at physics dot uc dot edu
2003-09-02 20:14 ` bgreen at nas dot nasa dot gov
2004-08-16 18:25 ` bangerth at dealii dot org
2004-08-25 17:02 ` pinskia at gcc dot gnu dot org
2004-12-31  0:14 ` bgreen at nas dot nasa dot gov
2005-01-31  6:57 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).