public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13870] New: template with type and function templated on type causes segfault.
@ 2004-01-26 20:43 gcc-bugzilla at gcc dot gnu dot org
2004-01-26 21:00 ` [Bug c++/13870] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-01-26 20:43 UTC (permalink / raw)
To: gcc-bugs
g++ segfaults on a templated class where the template is of
a particular form (see below)
Environment:
System: Linux razorfish 2.4.22-1-686 #6 Sat Oct 4 14:09:08 EST 2003 i686 GNU/Linux
Architecture: i686
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
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 --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
How-To-Repeat:
Try to compile these three lines with
g++ foo.cc -c
------------------------------------------------------------
template <class T, void *X<T>() >
class Bar {
};
------------------------------------------------------------
You will see
foo.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
------- Additional Comments From jhbrown at bluefinrobotics dot com 2004-01-26 20:43 -------
Fix:
"Don't write broken code." Still, core-dumping isn't a very
helpful diagnostic.
--
Summary: template with type and function templated on type causes
segfault.
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jhbrown at bluefinrobotics dot com
CC: gcc-bugs at gcc dot gnu dot org
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=13870
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/13870] template with type and function templated on type causes segfault.
2004-01-26 20:43 [Bug c++/13870] New: template with type and function templated on type causes segfault gcc-bugzilla at gcc dot gnu dot org
@ 2004-01-26 21:00 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-26 21:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-26 21:00 -------
As you said this is invalid code, and this is fixed on the mainline:
pr13870.cc:1: error: expected `>' before '<' token
pr13870.cc:1: error: expected unqualified-id before ')' token
pr13870.cc:1: error: expected `;' before '>' token
So closing as fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |ice-on-invalid-code
Resolution| |FIXED
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13870
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-26 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-26 20:43 [Bug c++/13870] New: template with type and function templated on type causes segfault gcc-bugzilla at gcc dot gnu dot org
2004-01-26 21:00 ` [Bug c++/13870] " 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).