public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31905] New: ICE with typeof(&T::method2)
@ 2007-05-12 2:51 blaisorblade_spam at yahoo dot it
2007-05-12 3:18 ` [Bug c++/31905] " blaisorblade_spam at yahoo dot it
2007-05-12 13:44 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: blaisorblade_spam at yahoo dot it @ 2007-05-12 2:51 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]
I get an ICE when instantiating the following template:
template <typename T>
typeof(&T::method2) method2_of(T) {
return &T::method2;
}
Note that both '&' are needed, as well as instantiating this template on a
type having a ::method2 member function. If I omit any of them, I get just
various error messages.
==bug.cpp==
struct Foo
{
void method2(int) {
}
};
template <typename T>
typeof(&T::method2) method2_of(T) {
return &T::method2;
}
int main() {
Foo a;
method2_of(a);
}
==end==
$ g++ -c bug.cpp
bug.cpp: In function __typeof__ (& T::method2) method2_of(T) [with T = Foo]:
bug.cpp:9: internal compiler error: in write_type, at cp/mangle.c:1651
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccSj6aeQ.out file, please attach this to
your bugreport.
$ g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Command line of cc1plus:
// /usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1plus -quiet -D_GNU_SOURCE
bug.cpp -quiet -dumpbase bug.cpp -mtune=generic -auxbase
bug -fstack-protector -fstack-protector -o - -frandom-seed=0
--
Summary: ICE with typeof(&T::method2)
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: blaisorblade_spam at yahoo dot it
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31905
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/31905] ICE with typeof(&T::method2)
2007-05-12 2:51 [Bug c++/31905] New: ICE with typeof(&T::method2) blaisorblade_spam at yahoo dot it
@ 2007-05-12 3:18 ` blaisorblade_spam at yahoo dot it
2007-05-12 13:44 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: blaisorblade_spam at yahoo dot it @ 2007-05-12 3:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from blaisorblade_spam at yahoo dot it 2007-05-12 04:18 -------
Created an attachment (id=13544)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13544&action=view)
Preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31905
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/31905] ICE with typeof(&T::method2)
2007-05-12 2:51 [Bug c++/31905] New: ICE with typeof(&T::method2) blaisorblade_spam at yahoo dot it
2007-05-12 3:18 ` [Bug c++/31905] " blaisorblade_spam at yahoo dot it
@ 2007-05-12 13:44 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-12 13:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-05-12 14:44 -------
We don't know how to mangle typeof yet.
*** This bug has been marked as a duplicate of 11078 ***
--
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=31905
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-12 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12 2:51 [Bug c++/31905] New: ICE with typeof(&T::method2) blaisorblade_spam at yahoo dot it
2007-05-12 3:18 ` [Bug c++/31905] " blaisorblade_spam at yahoo dot it
2007-05-12 13:44 ` 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).