public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: reichelt@igpm.rwth-aachen.de
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org,
	wwieser@gmx.de
Subject: Re: c++/8511: (hopefully) reproducible cc1plus SIGSEGV.
Date: Sat, 09 Nov 2002 15:54:00 -0000	[thread overview]
Message-ID: <20021109235452.6062.qmail@sources.redhat.com> (raw)

Synopsis: (hopefully) reproducible cc1plus SIGSEGV.

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Sat Nov  9 15:54:52 2002
State-Changed-Why:
    Confirmed.
    
    Compiling the code with gcc 3.2 I get an internal compiler error.
    The problem can be reduced to the following code snippet:
    
    ------------------------snip here--------------------
    template <int I> struct A
    {
       void foo();
       template <int M,int N> friend int bar (const A<N>&, const A<M>&);
    };
    
    template <> void A<0>::foo() {}
    
    template <int M,int N> int bar (const A<N>&, const A<M>&) { return N; }
    
    void baz () { bar(A<1>(),A<2>()); }
    ------------------------snip here--------------------
    
    Compiling this with gcc 3.2 (just "g++ -c") I get the
    following ICE:
    
    bug.cc: In function `int bar(const A<N>&, const A<M>&) [with int M = 2, int N 
       = 1, int I = 0]':
    bug.cc:11:   instantiated from here
    bug.cc:9: Internal compiler error in c_expand_expr, at c-common.c:3646
    Please submit a full bug report, [etc.]
    
    In fact, the short testcase crashes gcc since 2.95.x.
    
    The code looks illegal to me (foo is specialized without
    having specialized A first).

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8511


             reply	other threads:[~2002-11-09 23:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09 15:54 reichelt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-22 10:46 Wolfgang Wieser
2002-11-20 18:16 Zack Weinberg
2002-11-20 18:12 Wolfgang Wieser
2002-11-19 18:25 Zack Weinberg
2002-11-19 18:16 Wolfgang Wieser
2002-11-10 13:16 Volker Reichelt
2002-11-10 12:46 Zack Weinberg
2002-11-10  5:26 wwieser
2002-11-09  4:36 wwieser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021109235452.6062.qmail@sources.redhat.com \
    --to=reichelt@igpm.rwth-aachen.de \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    --cc=wwieser@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).