public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/4569: ICE on legal template code
@ 2001-10-14 15:26 bitti
  0 siblings, 0 replies; 2+ messages in thread
From: bitti @ 2001-10-14 15:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: bitti

>Number:         4569
>Category:       c++
>Synopsis:       ICE on legal template code
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 14 15:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Matti Rintala
>Release:        3.0.1
>Organization:
Tampere University of Technology
>Environment:
System: Linux mustikkakukko.cs.tut.fi 2.4.11 #1 Wed Oct 10 15:23:04 EEST 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.1/configure --prefix=/usr/local/gcc-3.0.1 --enable-shared --enable-threads --enable-cpp --with-cpu=i686
>Description:
	When the included file is compiled, the following error message occurs:
Reading specs from /usr/local/gcc-test/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --host=i686-pc-linux-gnu --prefix=/usr/local/gcc-test --enable-shared --enable-threads --with-cpu=i686 --enable-cpp --enable-languages=c++
Thread model: posix
gcc version 3.1 20011014 (experimental)
 /usr/local/gcc-test/lib/gcc-lib/i686-pc-linux-gnu/3.1/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ gccbug.cc gccbug.ii
GNU CPP version 3.1 20011014 (experimental) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/local/gcc-test/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gcc-test/include/g++-v3
 /usr/local/gcc-test/include/g++-v3/i686-pc-linux-gnu
 /usr/local/gcc-test/include/g++-v3/backward
 /usr/local/include
 /usr/local/gcc-test/include
 /usr/local/gcc-test/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.
 /usr/local/gcc-test/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -fpreprocessed gccbug.ii -quiet -dumpbase gccbug.cc -version -o gccbug.s
GNU CPP version 3.1 20011014 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011014 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20011014 (experimental).
gccbug.cc: In constructor `Kertoeval<Arvo>::Kertoeval() [with Arvo = double]':
gccbug.cc:39:   instantiated from `Kertoeval<Arvo>::Kertoeval() [with Arvo = double]'
gccbug.cc:48:   instantiated from here
gccbug.cc:39: Internal compiler error in c_expand_expr, at c-common.c:3395
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:
	Here's a quite small file which causes the error:
------------
class Vakio
{
};

template<typename Oper>
class Vakioeval
{
public:
  typedef void (*Evalf)(const Vakio&, const Vakio&);
  template<typename Vasen, typename Oikea, Evalf evalf, bool VAIHDANNAINEN>
  static void rekisteroi();
};

class Kerto
{
};


template<typename Arvo>
class Lukuvakio
{
};

template<typename Arvo>
class Kertoeval : Vakioeval<Kerto>
{
public:

  Kertoeval();
private:
  static Kertoeval rekisteroija_;

  static void pluslukuvakio(Vakio& vasen, Vakio& oikea);
};

template<typename Arvo>
Kertoeval<Arvo>::Kertoeval() : Vakioeval<Kerto>()
{
  void (*f)() = rekisteroi<Lukuvakio<Arvo>, Lukuvakio<Arvo>, pluslukuvakio, false>;
  f();

}

template<typename Arvo>
Kertoeval<Arvo> Kertoeval<Arvo>::rekisteroija_;


template class Kertoeval<double>;
-----------------------
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/4569: ICE on legal template code
@ 2001-10-22  9:15 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2001-10-22  9:15 UTC (permalink / raw)
  To: bitti, gcc-bugs, gcc-prs, nobody

Synopsis: ICE on legal template code

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Mon Oct 22 09:15:33 2001
State-Changed-Why:
    Confirm as a bug.  Still present in the main trunk.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4569&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-22  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-14 15:26 c++/4569: ICE on legal template code bitti
2001-10-22  9:15 lerdsuwa

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