public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9113: ICE with templates
@ 2002-12-31  6:26 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2002-12-31  6:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9113
>Category:       c++
>Synopsis:       g++ crashes when compiling an initializer with templates
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 31 06:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bruno Haible
>Release:        3.2.1
>Organization:
GNU hackers
>Environment:
System: FreeBSD linuix.math.u-bordeaux.fr 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Mon Mar 20 22:50:22 GMT 2000 root@monster.cdrom.com:/usr/src/sys/compile/GENERIC i386


        <machine, os, target, libraries (multiple lines)>
host: i486-pc-freebsd-gnu
build: i486-pc-freebsd-gnu
target: i486-pc-freebsd-gnu
configured with: ../gcc-3.2.1/configure --enable-shared --disable-nls --prefix=/gnu/usr --with-local-prefix=/gnu/usr/local --with-as=/gnu/usr/bin/as --with-gnu-as --with-ld=/gnu/usr/bin/ld --with-gnu-ld --enable-languages=c,c++,java,f77 --enable-threads --enable-__cxa_atexit i486-pc-freebsd-gnu
>Description:

$ g++ -S foo.cc
foo.cc: In function `void __static_initialization_and_destruction_0(int, int)':
foo.cc:14: Internal compiler error in simplify_gen_subreg, at simplify-rtx.c:
   2711
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

>How-To-Repeat:

Save this file
============================ foo.cc ======================================
template <char *p>
struct Offset {
  int x;
};

char pool[] = "Eins\0" "Zwei";

struct Temp {
  char *q;
  Temp (char *s) : q (s) {}
  template <char *p> operator Offset<p> () const { return (Offset<p>){x: q-p}; }
};

Offset<pool> offsets[2] = { Temp(pool+0), Temp(pool+5) };
===========================================================================

and run "g++ -S foo.cc".

>Fix:
        unknown.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-31 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31  6:26 c++/9113: ICE with templates Bruno Haible

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).