public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11596] New: ICE with int templates
@ 2003-07-19 22:01 weiss at sztaki dot hu
  2003-07-19 22:23 ` [Bug c++/11596] [3.4 Regression] " pinskia at physics dot uc dot edu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: weiss at sztaki dot hu @ 2003-07-19 22:01 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11596

           Summary: ICE with int templates
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: weiss at sztaki dot hu
                CC: gcc-bugs at gcc dot gnu dot org

The following example causes an ICE:


gonzo:~ # cat foo.cc
template <int A, int B, int C, bool D=(A<B)>
struct a
{
  enum { value = D? A+B: A+C };
};


template <int A>
struct b
{
//   enum { value = a<A,A,A>::value };  // compiles
//   enum { value = a<A,1,A>::value };  // compiles as well
//   enum { value = a<1,A,A>::value };  // compiles as well
  enum { value = a<1,1,A>::value };  // ICE
};


int main()
{
  return b<1>::value;
}

gonzo:~ # g++-cvs -v
Reading specs from /gml/shared/gcc-cvs/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/gml/shared/gcc-cvs --enable-shared
--enable-languages=c,c++ --enable-threads=posix
Thread model: posix
gcc version 3.4 20030719 (experimental)

gonzo:~ # g++-cvs foo.cc
foo.cc:14: 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.


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

end of thread, other threads:[~2003-07-25 13:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-19 22:01 [Bug c++/11596] New: ICE with int templates weiss at sztaki dot hu
2003-07-19 22:23 ` [Bug c++/11596] [3.4 Regression] " pinskia at physics dot uc dot edu
2003-07-21 13:18 ` nathan at gcc dot gnu dot org
2003-07-23 23:24 ` janis187 at us dot ibm dot com
2003-07-25 10:16 ` cvs-commit at gcc dot gnu dot org
2003-07-25 10:27 ` nathan at gcc dot gnu dot org
2003-07-25 13:05 ` nathan 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).