[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-07-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||7.3.0
   Keywords||rejects-valid
   Last reconfirmed||2018-07-20
 CC||nathan at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|non-const operator  |[8/9 Regression] non-const
   |erroneously called in   |operator erroneously called
   |lambda in templated |in lambda in templated
   |function|function
  Known to fail||8.1.0, 9.0

--- Comment #1 from Jonathan Wakely  ---
Seems to have started with r255605

[PR C++/15272] lookups with ambiguating dependent base

https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00766.html
PR c++/15272
* pt.c (tsubst_baselink): Don't repeat the lookup for
non-dependent baselinks.

PR c++/15272
* g++.dg/template/pr71826.C: Adjust for 15272 fix.

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |8.2

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-07-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.2 |8.3

--- Comment #2 from Jakub Jelinek  ---
GCC 8.2 has been released.

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-10-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jlegg at feralinteractive dot 
com

--- Comment #3 from Jonathan Wakely  ---
*** Bug 87584 has been marked as a duplicate of this bug. ***

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-10-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

--- Comment #4 from Jonathan Wakely  ---
Smaller testcase from PR 87584

struct C
{
int operator[](int)
{
return 0;
}

int operator[](int) const
{
return 1;
}
};

template 
int f(T)
{
C c;
return [=] { return c[0]; }();
}

int main()
{
return f(0);
}

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2019-01-16 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2019-01-17 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Nathan Sidwell  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Nathan Sidwell  ---
Fixed r268016

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2019-01-17 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

--- Comment #7 from Nathan Sidwell  ---
Author: nathan
Date: Thu Jan 17 11:56:58 2019
New Revision: 268016

URL: https://gcc.gnu.org/viewcvs?rev=268016&root=gcc&view=rev
Log:
[PR c++/86610] lambda captures in templates

https://gcc.gnu.org/ml/gcc-patches/2019-01/msg00948.html
PR c++/86610
* semantics.c (process_outer_var_ref): Only skip dependent types
in templates.

PR c++/86610
* g++.dg/cpp0x/pr86610.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr86610.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2019-01-17 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

--- Comment #8 from Nathan Sidwell  ---
Fixed gcc-8 r268029

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2019-01-17 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

--- Comment #9 from Nathan Sidwell  ---
Author: nathan
Date: Thu Jan 17 12:58:50 2019
New Revision: 268029

URL: https://gcc.gnu.org/viewcvs?rev=268029&root=gcc&view=rev
Log:
[PR c++/86610] lambda captures in templates

https://gcc.gnu.org/ml/gcc-patches/2019-01/msg00948.html
PR c++/86610
* semantics.c (process_outer_var_ref): Only skip dependent types
in templates.

PR c++/86610
* g++.dg/cpp0x/pr86610.C: New.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/pr86610.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Nathan, another r255605 regression, can you please have a look?