* [Bug c++/108309] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
@ 2023-01-06 3:09 ` tim at klingt dot org
2023-01-06 6:22 ` [Bug c++/108309] [12 Regression] " pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tim at klingt dot org @ 2023-01-06 3:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
--- Comment #1 from tim blechmann <tim at klingt dot org> ---
Created attachment 54200
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54200&action=edit
reduced test case
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
2023-01-06 3:09 ` [Bug c++/108309] " tim at klingt dot org
@ 2023-01-06 6:22 ` pinskia at gcc dot gnu.org
2023-01-06 6:31 ` tim at klingt dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-06 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.3
Keywords| |ice-on-valid-code,
| |needs-bisection
Known to fail| |12.2.0
Summary|ICE in in |[12 Regression] ICE in in
|cxx_eval_component_referenc |cxx_eval_component_referenc
|e, at cp/constexpr.cc:4136 |e, at cp/constexpr.cc:4136
Known to work| |11.3.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-01-06
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced further:
```
struct _Enable_copy_move {};
struct h {
union {
int _M_value;
};
};
struct m {
constexpr m(...) : _M_payload() {}
constexpr m(const m &) {}
h _M_payload;
};
struct optional : m, _Enable_copy_move {
constexpr optional() {}
template <typename _Up> constexpr optional(_Up __t) : m(__t) {}
};
struct array { optional t[1]; };
optional page {
array {}
};
```
>clang++-15 doesn't (not sure if it's related, but i thought it's worth mentioning:
That is a conditionally supported construct in C++. clang does not support it
but GCC does.
GCC does warn with -Wconditionally-supported :
<source>: In instantiation of 'constexpr optional::optional(_Up) [with _Up =
array]':
<source>:20:1: required from here
<source>:14:62: warning: passing objects of non-trivially-copyable type 'struct
array' through '...' is conditionally supported [-Wconditionally-supported]
14 | template <typename _Up> constexpr optional(_Up __t) : m(__t) {}
| ^
Anyways this is fixed on the trunk; though since it is a GCC 12.x regression it
will/should be fixed on the GCC 12 branch too once someone figures out which
patch fixed it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
2023-01-06 3:09 ` [Bug c++/108309] " tim at klingt dot org
2023-01-06 6:22 ` [Bug c++/108309] [12 Regression] " pinskia at gcc dot gnu.org
@ 2023-01-06 6:31 ` tim at klingt dot org
2023-01-06 6:33 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tim at klingt dot org @ 2023-01-06 6:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
--- Comment #3 from tim blechmann <tim at klingt dot org> ---
> That is a conditionally supported construct in C++. clang does not support it but GCC does.
>
> GCC does warn with -Wconditionally-supported
interesting. i may have to reduce it manually rather than going through cvise:
the real-world code builds with clang and gcc doesn't seem to emit a warning
with -Wconditionally-supported
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
` (2 preceding siblings ...)
2023-01-06 6:31 ` tim at klingt dot org
@ 2023-01-06 6:33 ` pinskia at gcc dot gnu.org
2023-01-06 11:30 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-06 6:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to tim blechmann from comment #3)
> > That is a conditionally supported construct in C++. clang does not support it but GCC does.
> >
> > GCC does warn with -Wconditionally-supported
>
> interesting. i may have to reduce it manually rather than going through
> cvise: the real-world code builds with clang and gcc doesn't seem to emit a
> warning with -Wconditionally-supported
Or you could add -Werror=conditionally-supported as an option and reduce it
that way ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
` (3 preceding siblings ...)
2023-01-06 6:33 ` pinskia at gcc dot gnu.org
@ 2023-01-06 11:30 ` marxin at gcc dot gnu.org
2023-01-06 17:25 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-06 11:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master with r13-963-gd19b4342c19e5a7f and it started with
r12-2304-ga42f8120442cf3ba.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
` (4 preceding siblings ...)
2023-01-06 11:30 ` marxin at gcc dot gnu.org
@ 2023-01-06 17:25 ` pinskia at gcc dot gnu.org
2023-04-27 12:06 ` rguenth at gcc dot gnu.org
2023-05-08 12:26 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-06 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=105795,
| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=101371
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #5)
> Fixed on master with r13-963-gd19b4342c19e5a7f
I didn't mention it when I produced the reduced testcase but removing the empty
base class does cause the ICE to go away so this looks like a real fix ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
` (5 preceding siblings ...)
2023-01-06 17:25 ` pinskia at gcc dot gnu.org
@ 2023-04-27 12:06 ` rguenth at gcc dot gnu.org
2023-05-08 12:26 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-27 12:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136
2023-01-06 3:09 [Bug c++/108309] New: ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 tim at klingt dot org
` (6 preceding siblings ...)
2023-04-27 12:06 ` rguenth at gcc dot gnu.org
@ 2023-05-08 12:26 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108309
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 9+ messages in thread