https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105256
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |102990
--- Comment #28 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #27)
> So it started on gcc-11 branch with r11-9711-g6ba2a7e7474135.
For
struct S {
struct Prefs {
struct P {
int i = 42;
int j = i;
} p;
void Load();
};
};
void S::Prefs::Load() {
*this = {};
};
that is, which probably means that the assumtion CTORs are already folded
is false and with the PR102990 change we no longer constant fold the
initializer. Before:
;; Function void S::Prefs::Load() (null)
;; enabled by -tree-original
<<cleanup_point <<< Unknown tree: expr_stmt
(void) (*(struct Prefs *) this = *(struct Prefs &) &TARGET_EXPR <D.2377,
{.p={.i=42, .j=42}}>) >>>>>;
After:
;; Function void S::Prefs::Load() (null)
;; enabled by -tree-original
<<cleanup_point <<< Unknown tree: expr_stmt
(void) (*(struct Prefs *) this = *(struct Prefs &) &TARGET_EXPR <D.2377,
{.p={.i=42, .j=(&<PLACEHOLDER_EXPR struct P>)->i}}>) >>>>>;
which explains why the PR102990 change makes a difference here (and why it
is a recent regression for compiling Firefox on the branch).
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102990
[Bug 102990] [9/10 Regression] ICE in tsubst_copy_and_build with NSDMI and
double to int conversion