Bug 66919 - [5 Regression] C++14 ICE during error reporting
Summary: [5 Regression] C++14 ICE during error reporting
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.2.1
: P3 normal
Target Milestone: 5.3
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2015-07-17 20:35 UTC by Jakub Jelinek
Modified: 2015-09-11 01:20 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-07-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2015-07-17 20:35:23 UTC
template <int>
struct A {
  template <typename F, typename R, typename T>
    static auto run (F fn, R, T) { auto r =  fn (); }
};
template <typename F, typename T>
auto foo (F fn, T)
{
  A <0>::run (fn, 0, 0);
}
struct B;
struct C {
  typedef B D;
};
struct E {
  virtual void bar (const int &);
};
template <typename C>
struct F : E {
  typedef typename C::D::G G;
  void bar (const G &);
  typename C::D::H I;
};
struct J { struct K {}; };
template <typename T>
void
F<T>::bar (const G &)
{
  auto s = I;
  typedef decltype (s) L;
  auto u =[&](L) { auto t = foo (J::K (), 0); };
}
struct B {
  typedef int G;
  typedef int H;
};
struct M : F <C> {
  M () {}
};

ICEs with -std=c++1y starting with r211188 and it got fixed (or went latent) on the trunk with r222150.
Comment 1 Jason Merrill 2015-08-17 21:35:22 UTC
Author: jason
Date: Mon Aug 17 21:34:50 2015
New Revision: 226955

URL: https://gcc.gnu.org/viewcvs?rev=226955&root=gcc&view=rev
Log:
	PR c++/66919
	* pt.c (tsubst_copy): Pass complain to mark_used, check return value.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/pt.c
Comment 2 Jason Merrill 2015-08-18 21:29:38 UTC
Author: jason
Date: Tue Aug 18 21:29:07 2015
New Revision: 226993

URL: https://gcc.gnu.org/viewcvs?rev=226993&root=gcc&view=rev
Log:
	PR c++/66919
	* g++.dg/cpp1y/auto-fn27.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C
Comment 3 Paolo Carlini 2015-09-07 13:26:27 UTC
Fixed then.