This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53845] New: Another "error reporting routines re-entered" issue


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]