public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr
@ 2020-04-18 4:22 avi@cloudius-systems.com
2020-04-18 4:26 ` [Bug c++/94645] " avi@cloudius-systems.com
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: avi@cloudius-systems.com @ 2020-04-18 4:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Bug ID: 94645
Summary: incorrect concecpt evaluation with decltype, plus
internal erropr
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: avi@cloudius-systems.com
Target Milestone: ---
Created attachment 48303
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48303&action=edit
reduced test case (before preprocessing)
A concept involving decltype() fails to evaludate correctly in gcc 10, with
some indication the compiler has an internal error.
The same program compiles in gcc9 (with -fconcepts).
Reduced program and preprocessed output attached.
gcc 10 command line:
g++ -std=gnu++2a -Wall -Werror -c -o /dev/null reduced.cc
gcc 9 command line:
g++ -std=gnu++2a -fconcepts -Wall -Werror -c -o /dev/null reduced.cc
gcc 10 errors:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/algorithm:61,
from reduced.cc:1:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'constexpr bool
__gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator
= std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
operator<<(std::ostream&, l<p>)::<lambda(const value_type&)>]':
/usr/include/c++/10/bits/stl_algobase.h:1906:42: required from 'constexpr
_InputIterator std::__find_if(_InputIterator, _InputIterator, _Predicate,
std::input_iterator_tag) [with _InputIterator =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
__gnu_cxx::__ops::_Iter_pred<operator<<(std::ostream&, l<p>)::<lambda(const
value_type&)> >]'
/usr/include/c++/10/bits/stl_algobase.h:1965:23: required from 'constexpr
_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
__gnu_cxx::__ops::_Iter_pred<operator<<(std::ostream&, l<p>)::<lambda(const
value_type&)> >]'
/usr/include/c++/10/bits/stl_algo.h:3928:28: required from 'constexpr _IIter
std::find_if(_IIter, _IIter, _Predicate) [with _IIter =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
operator<<(std::ostream&, l<p>)::<lambda(const value_type&)>]'
reduced.cc:12:7: recursively required from 'std::ostream&
operator<<(std::ostream&, std::vector<a>) [with a = l<p>; std::ostream =
std::basic_ostream<char>]'
reduced.cc:12:7: required from 'std::ostream& operator<<(std::ostream&,
std::vector<a>) [with a = std::vector<l<p> >; std::ostream =
std::basic_ostream<char>]'
reduced.cc:56:11: required from 'void e::h<a>::g(const string_view&, const
string_view&) [with a = std::vector<l<p> >; std::string_view =
std::basic_string_view<char>]'
reduced.cc:23:10: required from here
/usr/include/c++/10/bits/predefined_ops.h:316:23: error: no match for call to
'(operator<<(std::ostream&, l<p>)::<lambda(const value_type&)>) (const
std::pair<const std::__cxx11::basic_string<char>, p::feature>&)'
316 | { return bool(_M_pred(*__it)); }
| ~~~~~~~^~~~~~~
reduced.cc:37:17: note: candidate: 'operator<<(std::ostream&,
l<p>)::<lambda(const value_type&)>'
37 | [opt](const typename m::value_type &) { return opt.n;
});
| ^
reduced.cc:37:17: note: constraints not satisfied
reduced.cc: In instantiation of 'operator<<(std::ostream&, l<p>)::<lambda(const
value_type&)>':
/usr/include/c++/10/bits/predefined_ops.h:316:23: required from 'constexpr
bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with
_Iterator = std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
operator<<(std::ostream&, l<p>)::<lambda(const value_type&)>]'
/usr/include/c++/10/bits/stl_algobase.h:1906:42: required from 'constexpr
_InputIterator std::__find_if(_InputIterator, _InputIterator, _Predicate,
std::input_iterator_tag) [with _InputIterator =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
__gnu_cxx::__ops::_Iter_pred<operator<<(std::ostream&, l<p>)::<lambda(const
value_type&)> >]'
/usr/include/c++/10/bits/stl_algobase.h:1965:23: required from 'constexpr
_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
__gnu_cxx::__ops::_Iter_pred<operator<<(std::ostream&, l<p>)::<lambda(const
value_type&)> >]'
/usr/include/c++/10/bits/stl_algo.h:3928:28: required from 'constexpr _IIter
std::find_if(_IIter, _IIter, _Predicate) [with _IIter =
std::__detail::_Node_const_iterator<std::pair<const
std::__cxx11::basic_string<char>, p::feature>, false, true>; _Predicate =
operator<<(std::ostream&, l<p>)::<lambda(const value_type&)>]'
reduced.cc:12:7: recursively required from 'std::ostream&
operator<<(std::ostream&, std::vector<a>) [with a = l<p>; std::ostream =
std::basic_ostream<char>]'
reduced.cc:12:7: required from 'std::ostream& operator<<(std::ostream&,
std::vector<a>) [with a = std::vector<l<p> >; std::ostream =
std::basic_ostream<char>]'
reduced.cc:56:11: required from 'void e::h<a>::g(const string_view&, const
string_view&) [with a = std::vector<l<p> >; std::string_view =
std::basic_string_view<char>]'
reduced.cc:23:10: required from here
reduced.cc:26:31: required for the satisfaction of 'HasMapInterface<decltype
(Mapper::map())>'
reduced.cc:26: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/cccbFNij.out file, please attach this to
your bugreport.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] incorrect concecpt evaluation with decltype, plus internal erropr
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
@ 2020-04-18 4:26 ` avi@cloudius-systems.com
2020-04-19 21:58 ` [Bug c++/94645] incorrect concept " rafael at espindo dot la
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: avi@cloudius-systems.com @ 2020-04-18 4:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #1 from Avi Kivity <avi@cloudius-systems.com> ---
Created attachment 48304
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48304&action=edit
reduced test case (after preprocessing)
This is what the compiler spat out after it failed to compile the
non-preprocessed test case.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] incorrect concept evaluation with decltype, plus internal erropr
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
2020-04-18 4:26 ` [Bug c++/94645] " avi@cloudius-systems.com
@ 2020-04-19 21:58 ` rafael at espindo dot la
2020-04-20 6:58 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error rguenth at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rafael at espindo dot la @ 2020-04-19 21:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #2 from Rafael Avila de Espindola <rafael at espindo dot la> ---
This reduces to just
template <typename a> concept HasMapInterface = requires(a t) { t.cend; };
template <typename Mapper>
requires HasMapInterface<decltype(Mapper::map())> struct l {};
struct mymap {
int cend();
};
struct p {
static mymap map();
};
l<p> q;
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
2020-04-18 4:26 ` [Bug c++/94645] " avi@cloudius-systems.com
2020-04-19 21:58 ` [Bug c++/94645] incorrect concept " rafael at espindo dot la
@ 2020-04-20 6:58 ` rguenth at gcc dot gnu.org
2020-04-20 7:28 ` marxin at gcc dot gnu.org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-20 6:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
Summary|incorrect concept |[10 Regression][concepts]
|evaluation with decltype, |incorrect concept
|plus internal erropr |evaluation with decltype,
| |plus internal error
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (2 preceding siblings ...)
2020-04-20 6:58 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error rguenth at gcc dot gnu.org
@ 2020-04-20 7:28 ` marxin at gcc dot gnu.org
2020-04-20 9:04 ` avi@cloudius-systems.com
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-20 7:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2020-04-20
Status|UNCONFIRMED |WAITING
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Are you sure the reduced test-case can be compiled with gcc 9?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (3 preceding siblings ...)
2020-04-20 7:28 ` marxin at gcc dot gnu.org
@ 2020-04-20 9:04 ` avi@cloudius-systems.com
2020-04-20 9:19 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257 marxin at gcc dot gnu.org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: avi@cloudius-systems.com @ 2020-04-20 9:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #4 from Avi Kivity <avi@cloudius-systems.com> ---
Yes (at least mine, don't know about Rafael's)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (4 preceding siblings ...)
2020-04-20 9:04 ` avi@cloudius-systems.com
@ 2020-04-20 9:19 ` marxin at gcc dot gnu.org
2020-04-20 9:19 ` marxin at gcc dot gnu.org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-20 9:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Known to work| |9.3.0
Known to fail| |10.0
Summary|[10 Regression][concepts] |[10 Regression][concepts]
|incorrect concept |incorrect concept
|evaluation with decltype, |evaluation with decltype,
|plus internal error |plus internal error since
| |r10-7554-gf1ad7bac76b66257
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Sorry, you are right. Reproduced now, the error started with
r10-7554-gf1ad7bac76b66257.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (5 preceding siblings ...)
2020-04-20 9:19 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257 marxin at gcc dot gnu.org
@ 2020-04-20 9:19 ` marxin at gcc dot gnu.org
2020-04-21 12:52 ` ppalka at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-20 9:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (6 preceding siblings ...)
2020-04-20 9:19 ` marxin at gcc dot gnu.org
@ 2020-04-21 12:52 ` ppalka at gcc dot gnu.org
2020-04-21 12:54 ` ppalka at gcc dot gnu.org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-21 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|NEW |ASSIGNED
CC| |ppalka at gcc dot gnu.org
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (7 preceding siblings ...)
2020-04-21 12:52 ` ppalka at gcc dot gnu.org
@ 2020-04-21 12:54 ` ppalka at gcc dot gnu.org
2020-04-21 15:17 ` ppalka at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-21 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|ppalka at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Oops, accidentally assigned myself this bug; unassigning.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (8 preceding siblings ...)
2020-04-21 12:54 ` ppalka at gcc dot gnu.org
@ 2020-04-21 15:17 ` ppalka at gcc dot gnu.org
2020-04-21 19:08 ` rafael at espindo dot la
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-21 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
As in PR94597, I think the testcases here in #c0 and #c2 might be invalid as-is
-- the requirement "t.cend;" should probably be "t.cend();", and we reject the
former since r10-7554.
With that minor change we successfully compile the reduced testcase, but we
still get the same ICE with the original testcase.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (9 preceding siblings ...)
2020-04-21 15:17 ` ppalka at gcc dot gnu.org
@ 2020-04-21 19:08 ` rafael at espindo dot la
2020-04-21 23:21 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rafael at espindo dot la @ 2020-04-21 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #8 from Rafael Avila de Espindola <rafael at espindo dot la> ---
The internal compiler error reduces to
struct unordered_map {
int cend() const noexcept;
};
template <typename a> concept HasMapInterface = requires(a t) { t.cend(); };
template <typename Mapper>
requires HasMapInterface<decltype(Mapper::map())> struct l {
friend void foo(l opt) {
([]() {})();
}
};
struct p {
static unordered_map map();
};
void g(l<p> *y) { foo(*y); }
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (10 preceding siblings ...)
2020-04-21 19:08 ` rafael at espindo dot la
@ 2020-04-21 23:21 ` ppalka at gcc dot gnu.org
2020-04-23 4:38 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-21 23:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Thanks for the reduced testcases.
The problem in #c8 seems to start in grokfndecl() when processing the
operator() of the lambda. During grokfndecl on the operator(),
processing_template_decl is 1 but template_class_depth is 0 (seems it should be
1 here?). So the condition for 'memtmpl' in
tree ctx = friendp ? current_class_type : ctype;
bool memtmpl = (processing_template_decl > template_class_depth (ctx));
is true for this non-templated lambda, but IIUC 'memtmpl' should be true only
if the declaration in question has its own set of template parameters, which is
not the case here.
Since memtmpl is true, we then attach the innermost constraints (belonging to
struct l) to this non-templated operator() via:
if (memtmpl)
tmpl_reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms);
tree ci = build_constraints (tmpl_reqs, decl_reqs);
...
set_constraints (decl, ci);
and thing goes downhill from there.
I tried fixing template_class_depth to return 1 in this case via
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -390,7 +390,12 @@ template_class_depth (tree type)
++depth;
if (DECL_P (type))
- type = CP_DECL_CONTEXT (type);
+ {
+ if (tree fctx = DECL_FRIEND_CONTEXT (type))
+ type = fctx;
+ else
+ type = CP_DECL_CONTEXT (type);
+ }
else if (LAMBDA_TYPE_P (type) && LAMBDA_TYPE_EXTRA_SCOPE (type))
type = LAMBDA_TYPE_EXTRA_SCOPE (type);
else
but this change causes a bunch of ICEs in the cmcstl2 testsuite.
It seems that the condition for 'memtmpl' needs adjusting, but I'm not sure
how.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (11 preceding siblings ...)
2020-04-21 23:21 ` ppalka at gcc dot gnu.org
@ 2020-04-23 4:38 ` jason at gcc dot gnu.org
2020-04-23 13:15 ` ppalka at gcc dot gnu.org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jason at gcc dot gnu.org @ 2020-04-23 4:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (12 preceding siblings ...)
2020-04-23 4:38 ` jason at gcc dot gnu.org
@ 2020-04-23 13:15 ` ppalka at gcc dot gnu.org
2020-04-23 21:42 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-23 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #10 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Oops, it turns out the ICEs I was seeing in the cmcstl2 testsuite with the
change in #c9 were actually due to PR94719, which has since been fixed. The
cmcstl2 testsuite now compiles fine with or without the change in #c9 FWIW.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (13 preceding siblings ...)
2020-04-23 13:15 ` ppalka at gcc dot gnu.org
@ 2020-04-23 21:42 ` cvs-commit at gcc dot gnu.org
2020-04-23 21:42 ` ppalka at gcc dot gnu.org
2020-04-23 23:43 ` rafael at espindo dot la
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-23 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:f9f166251f181ddcee64092d89aecbc1166ca706
commit r10-7932-gf9f166251f181ddcee64092d89aecbc1166ca706
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Apr 23 17:29:55 2020 -0400
c++: Lambda in friend of constrained class [PR94645]
In the testcase below, when grokfndecl processes the operator() decl for
the
lambda inside the friend function foo, processing_template_decl is rightly
1,
but template_class_depth on the lambda's closure type incorrectly returns 0
instead of 1.
Since processing_template_decl > template_class_depth, this makes
grokfndecl
think that the operator() has its own set of template arguments, and so we
attach the innermost set of constraints -- those belonging to struct l --
to the
operator() decl. We then get confused when checking
constraints_satisfied_p on
the operator() because it doesn't have template information and yet has
constraints associated with it.
This patch fixes template_class_depth to return the correct template
nesting
level in cases like these, in that when it hits a friend function it walks
into
the DECL_FRIEND_CONTEXT of the friend rather than into the CP_DECL_CONTEXT.
gcc/cp/ChangeLog:
PR c++/94645
* pt.c (template_class_depth): Walk into the DECL_FRIEND_CONTEXT of
a
friend declaration rather than into its CP_DECL_CONTEXT.
gcc/testsuite/ChangeLog:
PR c++/94645
* g++.dg/cpp2a/concepts-lambda6.C: New test.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (14 preceding siblings ...)
2020-04-23 21:42 ` cvs-commit at gcc dot gnu.org
@ 2020-04-23 21:42 ` ppalka at gcc dot gnu.org
2020-04-23 23:43 ` rafael at espindo dot la
16 siblings, 0 replies; 18+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-23 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #12 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
` (15 preceding siblings ...)
2020-04-23 21:42 ` ppalka at gcc dot gnu.org
@ 2020-04-23 23:43 ` rafael at espindo dot la
16 siblings, 0 replies; 18+ messages in thread
From: rafael at espindo dot la @ 2020-04-23 23:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645
--- Comment #13 from Rafael Avila de Espindola <rafael at espindo dot la> ---
Thank you so much. I can confirm that scylla now builds with gcc master with
just a few fixes on the scylla side (we build with -Werror).
There is a couple of test failures. I will try to reduce those and open new
bugs as appropriate.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2020-04-23 23:43 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 4:22 [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr avi@cloudius-systems.com
2020-04-18 4:26 ` [Bug c++/94645] " avi@cloudius-systems.com
2020-04-19 21:58 ` [Bug c++/94645] incorrect concept " rafael at espindo dot la
2020-04-20 6:58 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error rguenth at gcc dot gnu.org
2020-04-20 7:28 ` marxin at gcc dot gnu.org
2020-04-20 9:04 ` avi@cloudius-systems.com
2020-04-20 9:19 ` [Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257 marxin at gcc dot gnu.org
2020-04-20 9:19 ` marxin at gcc dot gnu.org
2020-04-21 12:52 ` ppalka at gcc dot gnu.org
2020-04-21 12:54 ` ppalka at gcc dot gnu.org
2020-04-21 15:17 ` ppalka at gcc dot gnu.org
2020-04-21 19:08 ` rafael at espindo dot la
2020-04-21 23:21 ` ppalka at gcc dot gnu.org
2020-04-23 4:38 ` jason at gcc dot gnu.org
2020-04-23 13:15 ` ppalka at gcc dot gnu.org
2020-04-23 21:42 ` cvs-commit at gcc dot gnu.org
2020-04-23 21:42 ` ppalka at gcc dot gnu.org
2020-04-23 23:43 ` rafael at espindo dot la
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).