public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: giovannibajo@libero.it
To: gcc-gnats@gcc.gnu.org
Subject: c++/10594: [3.3 regression] ICE (segfault) on error recovering in weird code
Date: Fri, 02 May 2003 02:16:00 -0000	[thread overview]
Message-ID: <20030502021040.25555.qmail@sources.redhat.com> (raw)


>Number:         10594
>Category:       c++
>Synopsis:       [3.3 regression] ICE (segfault) on error recovering in weird code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Fri May 02 02:15:59 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Giovanni Bajo
>Release:        3.3 CVS 20030421
>Organization:
>Environment:
i686-pc-cygwin
>Description:
While playing a bit with c++/10108, I found this regression
on the 3.3 branch:

----------------------------------------------
struct Foo
{
    template <typename>
    struct Nested
    {};
};

class Bar
{
  Foo base ;

public:
  typedef Foo::Nested type;

  Bar() {}
  Bar(const Bar& x) 
      : base(x.base)
  {}
};
----------------------------------------------
pr10108.cpp:13: error: invalid use of template-name 'Foo::Nested' in a declarator
pr10108.cpp:13: error: syntax error before `;' token
pr10108.cpp:15: error: declaration does not declare anything
pr10108.cpp:15: error: missing ';' before right brace
pr10108.cpp:9: error: ISO C++ forbids declaration of `Bar' with no type
pr10108.cpp:17: error: ISO C++ forbids defining types within return type
pr10108.cpp:17: error: semicolon missing after declaration of `class Bar'
pr10108.cpp: In function `int Bar(const Bar&)':
pr10108.cpp:17: error: only constructors take base initializers
pr10108.cpp:10: error: `Foo Bar::base' is private
pr10108.cpp:17: error: within this context
pr10108.cpp:18: internal compiler error: Segmentation fault
Please submit a full bug report,

3.3 regression only (wrt 2.95), and does not show up in 3.4
(whose parser is much less aggressive and aborts
compilation earlier).

I rate this with the lowest priority and severity since it segfaults after several lines from the illegal code, and after decent error messages.
>How-To-Repeat:
Compile the above code.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2003-05-02  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02  2:16 giovannibajo [this message]
2003-05-02 13:16 bangerth

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=20030502021040.25555.qmail@sources.redhat.com \
    --to=giovannibajo@libero.it \
    --cc=gcc-gnats@gcc.gnu.org \
    /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).