public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456
@ 2022-07-08 12:14 drahflow at gmx dot de
2022-07-08 12:54 ` [Bug c++/106233] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: drahflow at gmx dot de @ 2022-07-08 12:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106233
Bug ID: 106233
Summary: Designated initializers targeting inherited fields
breaks reshape_init_class, at cp/decl.c:6456
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: drahflow at gmx dot de
Target Milestone: ---
In a vain attempt to use designated initializers to target inherited fields, I
discovered that running
g++ -W -Wall --std=c++20
... on ...
struct Base {
int i;
};
struct Derived: public Base {
using Base::i;
};
int main(void) {
Derived d{
.i = 0,
};
return d.i;
}
... results in ...
designated-usage.c++: In function ‘int main()’:
designated-usage.c++:12:3: internal compiler error: in reshape_init_class, at
cp/decl.c:6456
12 | };
| ^
0x7f080f8137fc __libc_start_main
../csu/libc-start.c:332
Please submit a full bug report, [...]
... for ...
g++ --version
g++ (Debian 11.2.0-18) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
GCC 12.1 gives
<source>: In function 'int main()':
<source>:12:3: error: 'Base::i' is not a direct member of 'Derived'
12 | };
| ^
Compiler returned: 1
... the correctness of which I don't feel qualified to judge.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/106233] Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456
2022-07-08 12:14 [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456 drahflow at gmx dot de
@ 2022-07-08 12:54 ` marxin at gcc dot gnu.org
2022-07-08 12:55 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-08 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106233
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
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
It's likely only on gcc-11 branch and it started with r11-8449-g0a1010428b3861.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/106233] Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456
2022-07-08 12:14 [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456 drahflow at gmx dot de
2022-07-08 12:54 ` [Bug c++/106233] " marxin at gcc dot gnu.org
@ 2022-07-08 12:55 ` marxin at gcc dot gnu.org
2022-07-08 20:06 ` [Bug c++/106233] [11 Regression] " pinskia at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-08 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106233
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-07-08
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/106233] [11 Regression] Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456
2022-07-08 12:14 [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456 drahflow at gmx dot de
2022-07-08 12:54 ` [Bug c++/106233] " marxin at gcc dot gnu.org
2022-07-08 12:55 ` marxin at gcc dot gnu.org
@ 2022-07-08 20:06 ` pinskia at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-08 20:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106233
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target Milestone|--- |11.4
Summary|Designated initializers |[11 Regression] Designated
|targeting inherited fields |initializers targeting
|breaks reshape_init_class, |inherited fields breaks
|at cp/decl.c:6456 |reshape_init_class, at
| |cp/decl.c:6456
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/106233] [11 Regression] Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456
2022-07-08 12:14 [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456 drahflow at gmx dot de
` (2 preceding siblings ...)
2022-07-08 20:06 ` [Bug c++/106233] [11 Regression] " pinskia at gcc dot gnu.org
@ 2023-05-29 10:07 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106233
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-29 10:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 12:14 [Bug c++/106233] New: Designated initializers targeting inherited fields breaks reshape_init_class, at cp/decl.c:6456 drahflow at gmx dot de
2022-07-08 12:54 ` [Bug c++/106233] " marxin at gcc dot gnu.org
2022-07-08 12:55 ` marxin at gcc dot gnu.org
2022-07-08 20:06 ` [Bug c++/106233] [11 Regression] " pinskia at gcc dot gnu.org
2023-05-29 10:07 ` jakub 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).