public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jewillco at osl dot iu.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53845] New: Another "error reporting routines re-entered" issue
Date: Tue, 03 Jul 2012 19:58:00 -0000	[thread overview]
Message-ID: <bug-53845-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             Bug #: 53845
           Summary: Another "error reporting routines re-entered" issue
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jewillco@osl.iu.edu


This example causes "Error reporting routines re-entered", and seems to be
different from those reported so far:

struct a {};
template<typename> struct b;
template<> struct b<a> {static const int v = 3;};

template <typename L>
struct c {
  static_assert(b<L>::v == 3, "");
  using t = int;
};
template <typename E, typename T>
auto d(T x) -> decltype(((x.template e<E>()))) {return ((x.template e<E>()));}
template <typename B>
struct f {
  template <typename E>
  struct h {
    using w = int;
    typename c<E>::t x;
  };
  template <typename E>
  decltype(d<typename h<E>::w>(*(B*)nullptr)) e();
};
struct g {
  template <typename> int e();
};
int main(int argc, char** argv) {
  d<a>(f<g>{});
  return 0;
}

It is probably invalid code.  Some small variations on it cause infinite loops
(recursion depth exceeded), which also seem to be incorrect.  The full error
message for the code above with 4.7.1 is:

‘
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


             reply	other threads:[~2012-07-03 19:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 19:58 jewillco at osl dot iu.edu [this message]
2012-07-03 21:44 ` [Bug c++/53845] " paolo.carlini at oracle dot com
2012-07-13  0:10 ` xinliangli at gmail dot com
2012-10-04 15:35 ` paolo.carlini at oracle dot com
2012-10-04 15:44 ` jewillco at osl dot iu.edu
2012-10-04 15:55 ` paolo.carlini at oracle dot com
2012-10-05 19:40 ` paolo.carlini at oracle dot com

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=bug-53845-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).