* [Bug c++/95181] internal compiler error: in push_access_scope, at cp/pt.c:241
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
@ 2020-05-17 22:29 ` tahasuf at gmail dot com
2020-05-17 22:31 ` tahasuf at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tahasuf at gmail dot com @ 2020-05-17 22:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
--- Comment #1 from ahmet özhan <tahasuf at gmail dot com> ---
gcc 9.3 compile
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] internal compiler error: in push_access_scope, at cp/pt.c:241
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
2020-05-17 22:29 ` [Bug c++/95181] " tahasuf at gmail dot com
@ 2020-05-17 22:31 ` tahasuf at gmail dot com
2020-05-17 22:32 ` tahasuf at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tahasuf at gmail dot com @ 2020-05-17 22:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
--- Comment #2 from ahmet özhan <tahasuf at gmail dot com> ---
Comment on attachment 48554
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48554
gcc 10 don't compile but clang compile
>#include <array>
>
>namespace math {
>
> template <typename T, std::size_t Row, std::size_t Col>
> requires std::is_arithmetic_v<T>
> class matrix {
> union {
> std::array<T, Row * Col> m_elements_1d;
> std::array<std::array<T, Col>, Row> m_elements_2d;
> };
>
> public:
> template <typename ...Args>
> requires
> std::conjunction_v<std::is_same<T, Args>...>
> constexpr matrix(const Args&... args) noexcept
> : m_elements_1d {{ args... }} {}
>
> template <typename ...Args>
> requires
> std::conjunction_v<std::is_same<std::array<T, Col>, Args>...>
> constexpr matrix(const Args&... args) noexcept
> : m_elements_2d {{ args... }} {}
> };
>}
>
>#include <iostream>
>
>template <typename T>
>void test() {
>
> T f1, f2, f3, f4, f5, f6, f7, f8;
>
> std::cin >> f1 >> f2 >> f3 >> f4 >> f5 >> f6 >> f7 >> f8;
> math::matrix<T, 4, 4> m0(
> std::array<T, 4> {{ f1, f2, f3, f4 }},
> std::array<T, 4> {{ f5, f6, f7, f8 }}
> );
>}
>
>int main(int argc, char **argv)
>{
> test<float>();
> return 0;
>}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] internal compiler error: in push_access_scope, at cp/pt.c:241
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
2020-05-17 22:29 ` [Bug c++/95181] " tahasuf at gmail dot com
2020-05-17 22:31 ` tahasuf at gmail dot com
@ 2020-05-17 22:32 ` tahasuf at gmail dot com
2020-05-18 6:10 ` [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891 marxin at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tahasuf at gmail dot com @ 2020-05-17 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
--- Comment #3 from ahmet özhan <tahasuf at gmail dot com> ---
Comment on attachment 48554
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48554
gcc 10 don't compile but clang compile
>#include <array>
>
>namespace math {
>
> template <typename T, std::size_t Row, std::size_t Col>
> requires std::is_arithmetic_v<T>
> class matrix {
> union {
> std::array<T, Row * Col> m_elements_1d;
> std::array<std::array<T, Col>, Row> m_elements_2d;
> };
>
> public:
> template <typename ...Args>
> requires
> std::conjunction_v<std::is_same<T, Args>...>
> constexpr matrix(const Args&... args) noexcept
> : m_elements_1d {{ args... }} {}
>
> template <typename ...Args>
> requires
> std::conjunction_v<std::is_same<std::array<T, Col>, Args>...>
> constexpr matrix(const Args&... args) noexcept
> : m_elements_2d {{ args... }} {}
> };
>}
>
>#include <iostream>
>
>template <typename T>
>void test() {
>
> T f1, f2, f3, f4, f5, f6, f7, f8;
>
> std::cin >> f1 >> f2 >> f3 >> f4 >> f5 >> f6 >> f7 >> f8;
> math::matrix<T, 4, 4> m0(
> std::array<T, 4> {{ f1, f2, f3, f4 }},
> std::array<T, 4> {{ f5, f6, f7, f8 }}
> );
>}
>
>int main(int argc, char **argv)
>{
> test<float>();
> return 0;
>}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (2 preceding siblings ...)
2020-05-17 22:32 ` tahasuf at gmail dot com
@ 2020-05-18 6:10 ` marxin at gcc dot gnu.org
2020-05-18 6:29 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-18 6:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed| |2020-05-18
Summary|internal compiler error: in |[10/11 Regression] ICE in
|push_access_scope, at |push_access_scope, at
|cp/pt.c:241 |cp/pt.c:241 since
| |r10-3735-gcb57504a55015891
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
$ cat pr95181.ii
template <typename> bool a;
template <typename, typename> struct b;
template <typename, long> struct array;
template <typename d, int c> class f {
template <typename... e> f(const e &...);
template <typename... e> requires a<b<array<d, c>, e>...> f(const e &...);
};
started with r10-3735-gcb57504a55015891.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (3 preceding siblings ...)
2020-05-18 6:10 ` [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891 marxin at gcc dot gnu.org
@ 2020-05-18 6:29 ` rguenth at gcc dot gnu.org
2020-05-18 12:43 ` ppalka at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-18 6:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.2
Priority|P3 |P2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (4 preceding siblings ...)
2020-05-18 6:29 ` rguenth at gcc dot gnu.org
@ 2020-05-18 12:43 ` ppalka at gcc dot gnu.org
2020-05-18 20:40 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-18 12:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Another testcase:
template <typename> class f {
template <typename> f();
template <typename> requires false f();
};
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (5 preceding siblings ...)
2020-05-18 12:43 ` ppalka at gcc dot gnu.org
@ 2020-05-18 20:40 ` ppalka at gcc dot gnu.org
2020-05-28 15:51 ` ppalka at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-18 20:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
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
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I will look into this.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (6 preceding siblings ...)
2020-05-18 20:40 ` ppalka at gcc dot gnu.org
@ 2020-05-28 15:51 ` ppalka at gcc dot gnu.org
2020-05-29 22:15 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-28 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|ppalka at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Unassigning myself due to the issue described in
https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546308.html
which my initial patch attempt fails to address.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (7 preceding siblings ...)
2020-05-28 15:51 ` ppalka at gcc dot gnu.org
@ 2020-05-29 22:15 ` jason at gcc dot gnu.org
2020-05-29 22:19 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2020-05-29 22:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
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] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (8 preceding siblings ...)
2020-05-29 22:15 ` jason at gcc dot gnu.org
@ 2020-05-29 22:19 ` cvs-commit at gcc dot gnu.org
2020-05-30 2:11 ` cvs-commit at gcc dot gnu.org
2020-06-01 19:51 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29 22:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:c75ebe76ae12ac4020f20a24f34606a594a40d15
commit r11-735-gc75ebe76ae12ac4020f20a24f34606a594a40d15
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri May 22 10:28:19 2020 -0400
c++: P0848R3 and member function templates [PR95181]
When comparing two special member function templates to see if one hides
the other (as per P0848R3), we need to check satisfaction which we can't
do on templates. So this patch makes add_method skip the eligibility
test on member function templates and just lets them coexist.
gcc/cp/ChangeLog:
PR c++/95181
* class.c (add_method): Let special member function templates
coexist if they are not equivalently constrained, or in a class
template.
gcc/testsuite/ChangeLog:
PR c++/95181
* g++.dg/concepts/pr95181.C: New test.
* g++.dg/concepts/pr95181-2.C: New test.
Co-authored-by: Jason Merrill <jason@redhat.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (9 preceding siblings ...)
2020-05-29 22:19 ` cvs-commit at gcc dot gnu.org
@ 2020-05-30 2:11 ` cvs-commit at gcc dot gnu.org
2020-06-01 19:51 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-30 2:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:9e81c820a3e48ead478dabbd6988482747f7a521
commit r10-8212-g9e81c820a3e48ead478dabbd6988482747f7a521
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri May 22 10:28:19 2020 -0400
c++: P0848R3 and member function templates [PR95181]
When comparing two special member function templates to see if one hides
the other (as per P0848R3), we need to check satisfaction which we can't
do on templates. So this patch makes add_method skip the eligibility
test on member function templates and just lets them coexist.
gcc/cp/ChangeLog:
PR c++/95181
* class.c (add_method): Let special member function templates
coexist if they are not equivalently constrained, or in a class
template.
gcc/testsuite/ChangeLog:
PR c++/95181
* g++.dg/concepts/pr95181.C: New test.
* g++.dg/concepts/pr95181-2.C: New test.
Co-authored-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit 6b449b74c590f5a6f66c73aed894e5b5b36aa59d)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891
2020-05-17 22:25 [Bug c++/95181] New: internal compiler error: in push_access_scope, at cp/pt.c:241 tahasuf at gmail dot com
` (10 preceding siblings ...)
2020-05-30 2:11 ` cvs-commit at gcc dot gnu.org
@ 2020-06-01 19:51 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2020-06-01 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 10.2/11.
^ permalink raw reply [flat|nested] 13+ messages in thread