public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object))
@ 2006-02-24 12:38 com dot d2 at free dot fr
2006-02-24 12:40 ` [Bug c++/26455] " com dot d2 at free dot fr
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: com dot d2 at free dot fr @ 2006-02-24 12:38 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/26455] g++ 3.x ICE on typeid(typeid(*object))
2006-02-24 12:38 [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object)) com dot d2 at free dot fr
@ 2006-02-24 12:40 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: com dot d2 at free dot fr @ 2006-02-24 12:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from com dot d2 at free dot fr 2006-02-24 12:38 -------
Created an attachment (id=10907)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10907&action=view)
Code leading to ICE
Compile it with -DBUG=xyz to activate bug xyz
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26455
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/26455] g++ 3.x ICE on typeid(typeid(*object))
2006-02-24 12:38 [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object)) com dot d2 at free dot fr
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
2 siblings, 0 replies; 4+ messages in thread
From: com dot d2 at free dot fr @ 2006-02-24 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from com dot d2 at free dot fr 2006-02-24 12:40 -------
Created an attachment (id=10908)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10908&action=view)
Preprocessor output (gcc 3.4.4)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26455
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/26455] g++ 3.x ICE on typeid(typeid(*object))
2006-02-24 12:38 [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object)) com dot d2 at free dot fr
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
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-24 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-24 18:30 -------
*** This bug has been marked as a duplicate of 26417 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26455
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-24 18:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-24 12:38 [Bug c++/26455] New: g++ 3.x ICE on typeid(typeid(*object)) com dot d2 at free dot fr
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
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).