public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall
@ 2022-04-18 16:14 bjoern at hoehrmann dot de
2022-04-19 14:13 ` [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bjoern at hoehrmann dot de @ 2022-04-18 16:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
Bug ID: 105304
Summary: ICE segfault using ad-hoc concept with -Wall
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bjoern at hoehrmann dot de
Target Milestone: ---
GCC 11.2.0 on Linux
❯ g++-11 -Wall -std=c++2a -o x ../mini.cxx
../mini.cxx: In function 'int main()':
../mini.cxx:23:18: internal compiler error: Segmentation fault
23 | }) {
| ^
Please submit a full bug report,
Code:
#include <iostream>
#include <utility>
class X
{
public:
int m(int, int, int = 7) { return 123; }
};
template<typename... Ts>
void
invoke_m(std::index_sequence_for<Ts...> is)
{
X o;
o.m(Ts()...);
}
int
main()
{
if constexpr (requires {
invoke_m<int, int, int, int>(std::make_index_sequence<4>());
}) {
std::cerr << "ok" << '\n';
}
return 0;
}
Compiles when omitting -Wall.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
@ 2022-04-19 14:13 ` marxin at gcc dot gnu.org
2022-04-21 7:22 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-19 14:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |marxin at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Summary|ICE segfault using ad-hoc |[10/11/12 Regression] ICE
|concept with -Wall |segfault using ad-hoc
| |concept with -Wall since
| |r10-7441-ga7ea3d2ced786c45
Last reconfirmed| |2022-04-19
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-7441-ga7ea3d2ced786c45.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
2022-04-19 14:13 ` [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
@ 2022-04-21 7:22 ` rguenth at gcc dot gnu.org
2022-04-22 18:16 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
2022-04-19 14:13 ` [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
2022-04-21 7:22 ` rguenth at gcc dot gnu.org
@ 2022-04-22 18:16 ` ppalka at gcc dot gnu.org
2022-04-26 1:49 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-04-22 18:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
` (2 preceding siblings ...)
2022-04-22 18:16 ` ppalka at gcc dot gnu.org
@ 2022-04-26 1:49 ` cvs-commit at gcc dot gnu.org
2022-04-26 1:50 ` [Bug c++/105304] [10/11 " ppalka at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-26 1:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
--- Comment #2 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:c83b9c54d9dee2dce5d8268472a745b013d166cc
commit r12-8257-gc83b9c54d9dee2dce5d8268472a745b013d166cc
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Apr 25 21:49:00 2022 -0400
c++: ICE with requires-expr and -Wsequence-point [PR105304]
Here we're crashing from verify_sequence_points for this requires-expr
condition because it contains a templated CAST_EXPR with empty operand,
and verify_tree doesn't ignore this empty operand only because the
manual tail recursion that it performs for unary expression trees skips
the NULL test.
PR c++/105304
gcc/c-family/ChangeLog:
* c-common.cc (verify_tree) [restart]: Move up to before the
NULL test.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-requires30.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
` (3 preceding siblings ...)
2022-04-26 1:49 ` cvs-commit at gcc dot gnu.org
@ 2022-04-26 1:50 ` ppalka at gcc dot gnu.org
2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-04-26 1:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12 Regression] ICE |[10/11 Regression] ICE
|segfault using ad-hoc |segfault using ad-hoc
|concept with -Wall since |concept with -Wall since
|r10-7441-ga7ea3d2ced786c45 |r10-7441-ga7ea3d2ced786c45
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 12 so far.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10/11 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
` (4 preceding siblings ...)
2022-04-26 1:50 ` [Bug c++/105304] [10/11 " ppalka at gcc dot gnu.org
@ 2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
2022-05-09 23:33 ` [Bug c++/105304] [10 " cvs-commit at gcc dot gnu.org
2022-05-09 23:35 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28 15:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:992dd9a071c16b94a616ab7242390b6581fa6001
commit r11-9946-g992dd9a071c16b94a616ab7242390b6581fa6001
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Apr 25 21:49:00 2022 -0400
c++: ICE with requires-expr and -Wsequence-point [PR105304]
Here we're crashing from verify_sequence_points for this requires-expr
condition because it contains a templated CAST_EXPR with empty operand,
and verify_tree doesn't ignore this empty operand only because the
manual tail recursion that it performs for unary expression trees skips
the NULL test.
PR c++/105304
gcc/c-family/ChangeLog:
* c-common.c (verify_tree) [restart]: Move up to before the
NULL test.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-requires30.C: New test.
(cherry picked from commit c83b9c54d9dee2dce5d8268472a745b013d166cc)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
` (5 preceding siblings ...)
2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
@ 2022-05-09 23:33 ` cvs-commit at gcc dot gnu.org
2022-05-09 23:35 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 23:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:9a8b7edbe65ec6350a996eab51a7c26a087e6d2b
commit r10-10605-g9a8b7edbe65ec6350a996eab51a7c26a087e6d2b
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Apr 25 21:49:00 2022 -0400
c++: ICE with requires-expr and -Wsequence-point [PR105304]
Here we're crashing from verify_sequence_points for this requires-expr
condition because it contains a templated CAST_EXPR with empty operand,
and verify_tree doesn't ignore this empty operand only because the
manual tail recursion that it performs for unary expression trees skips
the NULL test.
PR c++/105304
gcc/c-family/ChangeLog:
* c-common.c (verify_tree) [restart]: Move up to before the
NULL test.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-requires30.C: New test.
(cherry picked from commit c83b9c54d9dee2dce5d8268472a745b013d166cc)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/105304] [10 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
` (6 preceding siblings ...)
2022-05-09 23:33 ` [Bug c++/105304] [10 " cvs-commit at gcc dot gnu.org
@ 2022-05-09 23:35 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-09 23:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105304
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 10.4/11.4/12, thanks for the bug report.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-09 23:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 16:14 [Bug c++/105304] New: ICE segfault using ad-hoc concept with -Wall bjoern at hoehrmann dot de
2022-04-19 14:13 ` [Bug c++/105304] [10/11/12 Regression] ICE segfault using ad-hoc concept with -Wall since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
2022-04-21 7:22 ` rguenth at gcc dot gnu.org
2022-04-22 18:16 ` ppalka at gcc dot gnu.org
2022-04-26 1:49 ` cvs-commit at gcc dot gnu.org
2022-04-26 1:50 ` [Bug c++/105304] [10/11 " ppalka at gcc dot gnu.org
2022-04-28 15:39 ` cvs-commit at gcc dot gnu.org
2022-05-09 23:33 ` [Bug c++/105304] [10 " cvs-commit at gcc dot gnu.org
2022-05-09 23:35 ` ppalka at gcc dot gnu.org
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).