public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function
@ 2023-01-26 12:22 zakkariusr at gmail dot com
2023-01-26 12:25 ` [Bug c++/108559] [13 Regression] " redi at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zakkariusr at gmail dot com @ 2023-01-26 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
Bug ID: 108559
Summary: A new crash with using a simple class, inheritance and
a function
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zakkariusr at gmail dot com
Target Milestone: ---
The following code:
struct A {
int g = 0;
A() {}
A(const A&) {}
};
struct B : A {};
A u() { return A{}; }
int bug() { return B{u()}.g; }
int main() {
return 0;
}
causes a compiler crash on the current gcc(trunk) 13.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
@ 2023-01-26 12:25 ` redi at gcc dot gnu.org
2023-01-26 12:51 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-26 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Known to fail| |13.0
Keywords| |ice-on-valid-code
Summary|A new crash with using a |[13 Regression] A new crash
|simple class, inheritance |with using a simple class,
|and a function |inheritance and a function
Known to work| |12.2.0
Target Milestone|--- |13.0
Last reconfirmed| |2023-01-26
Status|UNCONFIRMED |NEW
CC| |jason at gcc dot gnu.org
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed, started with r13-3175
c++: track whether we expect a TARGET_EXPR to be elided
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
2023-01-26 12:25 ` [Bug c++/108559] [13 Regression] " redi at gcc dot gnu.org
@ 2023-01-26 12:51 ` rguenth at gcc dot gnu.org
2023-01-26 16:31 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26 12:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
2023-01-26 12:25 ` [Bug c++/108559] [13 Regression] " redi at gcc dot gnu.org
2023-01-26 12:51 ` rguenth at gcc dot gnu.org
@ 2023-01-26 16:31 ` pinskia at gcc dot gnu.org
2023-01-30 22:46 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-26 16:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This might be related to C++ core issue cwg2403: https://wg21.link/cwg2403
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
` (2 preceding siblings ...)
2023-01-26 16:31 ` pinskia at gcc dot gnu.org
@ 2023-01-30 22:46 ` jason at gcc dot gnu.org
2023-01-30 23:16 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-30 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
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] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
` (3 preceding siblings ...)
2023-01-30 22:46 ` jason at gcc dot gnu.org
@ 2023-01-30 23:16 ` jason at gcc dot gnu.org
2023-02-01 0:11 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-30 23:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> This might be related to C++ core issue cwg2403: https://wg21.link/cwg2403
Indeed. We don't expect the copy to be elided because of that issue, but we
are eliding it anyway. So this is a bug caught by the added checking.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
` (4 preceding siblings ...)
2023-01-30 23:16 ` jason at gcc dot gnu.org
@ 2023-02-01 0:11 ` cvs-commit at gcc dot gnu.org
2023-02-01 0:15 ` jason at gcc dot gnu.org
2023-02-01 15:11 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-01 0:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:b533084d756a2696a3eb6521810e0a0b2182a8e8
commit r13-5611-gb533084d756a2696a3eb6521810e0a0b2182a8e8
Author: Jason Merrill <jason@redhat.com>
Date: Mon Jan 30 18:18:54 2023 -0500
c++: aggregate base and TARGET_EXPR_ELIDING_P [PR108559]
We also need to split up a CONSTRUCTOR in cp_genericize_init if we need to
add extra copy constructor calls to deal with CWG2403.
PR c++/108559
gcc/cp/ChangeLog:
* cp-gimplify.cc (any_non_eliding_target_exprs): New.
(cp_genericize_init): Check it.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/aggr-base13.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
` (5 preceding siblings ...)
2023-02-01 0:11 ` cvs-commit at gcc dot gnu.org
@ 2023-02-01 0:15 ` jason at gcc dot gnu.org
2023-02-01 15:11 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-02-01 0:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108559] [13 Regression] A new crash with using a simple class, inheritance and a function
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
` (6 preceding siblings ...)
2023-02-01 0:15 ` jason at gcc dot gnu.org
@ 2023-02-01 15:11 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-02-01 15:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 108627 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-02-01 15:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 12:22 [Bug c++/108559] New: A new crash with using a simple class, inheritance and a function zakkariusr at gmail dot com
2023-01-26 12:25 ` [Bug c++/108559] [13 Regression] " redi at gcc dot gnu.org
2023-01-26 12:51 ` rguenth at gcc dot gnu.org
2023-01-26 16:31 ` pinskia at gcc dot gnu.org
2023-01-30 22:46 ` jason at gcc dot gnu.org
2023-01-30 23:16 ` jason at gcc dot gnu.org
2023-02-01 0:11 ` cvs-commit at gcc dot gnu.org
2023-02-01 0:15 ` jason at gcc dot gnu.org
2023-02-01 15:11 ` mpolacek 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).