public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "com dot d2 at free dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object)) Date: Fri, 24 Feb 2006 12:38:00 -0000 [thread overview] Message-ID: <bug-26455-12253@http.gcc.gnu.org/bugzilla/> (raw) The code below generates an ICE with g++ 3.3 (debian stable), g++ 3.4 (debian testing): ------------------------------------------------ [pollindd] ~ >g++-3.3 -c ice-typeid.cc ice-typeid.cc: In function `int bug5(BaseB*)': ice-typeid.cc:43: internal compiler error: in expand_expr, at expr.c:8833 Please submit a full bug ... [pollindd] ~ >g++-3.4 -c ice-typeid.cc ice-typeid.cc: In function `int bug5(BaseB*)': ice-typeid.cc:43: internal compiler error: in expand_expr_real, at expr.c:8469 Please submit a full bug report... ------------------------------------------------ It works well with g++ 2.95.4 (debian). Maybe related to bug #25357. ------------------------------------------------ [pollindd] ~ >g++-3.4 -v Reading specs from /usr/lib/gcc/i486-linux/3.4.4/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --disable-werror i486-linux Thread model: posix gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13) [pollindd] ~ >g++-3.3 -v Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.6/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.6 (Debian 1:3.3.6-5) ------------------------------------------------ Code follows. Command line: g++-3.x -c ice-typeid.cc Optimisation flag seems to have no impact (same problem with -O3). Likewise for -Wall. It works on more complicated code (?!)... but it's hard to see where the fix is introduced. ------------------------------------------------ #include <typeinfo> class BaseB { public: virtual ~BaseB() {} }; #if BUG == 1 const char* bug1(BaseB const* o) { return typeid(typeid(*o)).name(); } #elif BUG == 2 const std::type_info & bug2(BaseB const* o) { return typeid(typeid(*o)); } #elif BUG == 3 const char* bug3(BaseB * o) { return typeid(typeid(*o)).name(); } #elif BUG == 4 const std::type_info & bug4(BaseB * o) { return typeid(typeid(*o)); } #else int bug5(BaseB * o) { int i; return (typeid(typeid(*o)) == typeid(i)); } #endif ------------------------------------------------ -- Summary: g++ 3.x ICE on typeid(typeid(*object)) Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: com dot d2 at free dot fr GCC build triplet: i486-pc-linux-gnu GCC host triplet: i486-pc-linux-gnu GCC target triplet: i486-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26455
next reply other threads:[~2006-02-24 12:25 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-24 12:38 com dot d2 at free dot fr [this message] 2006-02-24 12:40 ` [Bug c++/26455] " com dot d2 at free dot fr 2006-02-24 13:02 ` com dot d2 at free dot fr 2006-02-24 18:30 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26455-12253@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).