Bug 3689 - ICE on typeid() with -fno-rtti
Summary: ICE on typeid() with -fno-rtti
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 2.95.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-14 19:06 UTC by carlo
Modified: 2003-07-25 17:33 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description carlo 2001-07-14 19:06:00 UTC
2.95.x terminates with an ICE on a typeid when
using -fno-rtti.

Release:
2.95.3

Environment:
i686-unknown-linux-gnu

Unformatted:
 >g++-2.95.3 -v -fno-rtti test.cc
 Reading specs from /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
 gcc version 2.95.3 20010315 (release)
  /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) - D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ test.cc /tmp/cc0Kq1dX.ii
 GNU CPP version 2.95.3 20010315 (release) (i386 Linux/ELF)
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3
  /usr/local/include
  /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../i686-pc-linux-gnu/include
  /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/include
  /usr/include
 End of search list.
 The following default directories have been omitted from the search path:
 End of omitted list.
  /usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/cc1plus /tmp/cc0Kq1dX.ii -quiet -dumpbase test.cc -version -fno-rtti -o /tmp/ccC0X0NJ.s
 GNU C++ version 2.95.3 20010315 (release) (i686-pc-linux-gnu) compiled by GNU C version 2.95.3 20010315 (release).
 test.cc: In function `int main()':
 test.cc:5: Internal compiler error.
 test.cc:5: Please submit a full bug report.
 test.cc:5: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
 >cat test.cc
 #include <typeinfo>
  
 int main(void)
 {
   typeid(int);
   return 0;
 }
Comment 1 Kriang Lerdsuwanakij 2001-08-10 08:22:59 UTC
State-Changed-From-To: open->closed
State-Changed-Why: In the main trunk (gcc 3.1), the error message
      cannot use typeid with -fno-rtti
    is displayed.