[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615

2018-02-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Tue Feb 27 15:31:29 2018
New Revision: 258037

URL: https://gcc.gnu.org/viewcvs?rev=258037=gcc=rev
Log:
PR c++/84496 - ICE with generic lambda in lambda.

* pt.c (type_dependent_expression_p): Fix dependency checking of
functions without DECL_TEMPLATE_INFO.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1y/pr84496.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/pt.c

[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615

2018-02-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615

2018-02-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P2
  Known to work||8.0.1

[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615

2018-02-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb 22 09:55:32 2018
New Revision: 257895

URL: https://gcc.gnu.org/viewcvs?rev=257895=gcc=rev
Log:
PR c++/84496
* g++.dg/cpp1y/pr84496.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr84496.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615

2018-02-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-02-22
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
Version|unknown |7.0
   Target Milestone|--- |6.5
Summary|Internal compiler error |[6/7 Regression] Internal
   |with lambda, static and |compiler error with lambda,
   |auto|static and auto since
   ||r236615
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r236615 and got fixed on the trunk with r253600.

Reduced testcase:

// PR c++/84496
// { dg-do compile { target c++14 } }

template  struct C { static constexpr T D = n; };
struct E : C {};
template  struct F : C {};
template  T foo ();
template  struct H { typedef int G; };
template  class I;
struct L;
template  struct J;
template  struct K;
struct R {
  template 
  static J () (foo...)), L> o;
};
template  struct K : R {
  typedef decltype (o) G;
};
template 
struct D : K::D, P, Q...> {};
template  struct I : D {};
template  class function;
template  struct function {
  template ::G> struct C;
  template  using U = int;
  template , typename = U>
  function (P);
};
template 
template 
function::function (P)
{
}
void bar (function);

void
baz ()
{
  auto a = [] {
static int counter;
bar ([] (auto) { counter++; });
  };
}

Will commit the testcase to trunk now to make sure we don't regress it again.