https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120955
fiesh at zefix dot tv changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-source |
--- Comment #19 from fiesh at zefix dot tv ---
So maybe this more reduced test case helps more:
-----8<-----
struct ad {
int ae;
ad(int b) : ae(b) {}
};
struct bc {
int by{60};
ad a{50};
};
struct c {
bc ce;
};
void d(c &ch) { ch = {}; }
-----8<-----
It behaves as follows:
% podman run -it -v /tmp:/tmp alpine:3.21 sh -c 'sed -i -e s/https/http/
/etc/apk/repositories && apk -q add gcc-avr && avr-g++ --version && avr-g++
-std=c++20 -Os -g0 -fimplicit-constexpr -o /b.o -c /tmp/b.ii && avr-size -G
/b.o' && podman run -it -v /tmp:/tmp alpine:3.22 sh -c 'sed -i -e s/https/http/
/etc/apk/repositories && apk -q add gcc-avr && avr-g++ --version && avr-g++
-std=c++20 -Os -g0 -fimplicit-constexpr -o /b.o -c /tmp/b.ii && avr-size -G
/b.o'
avr-g++ (Alpine Linux) 14.2.0
Copyright (C) 2024 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.
text data bss total filename
22 0 0 22 /b.o
avr-g++ (Alpine Linux) 15.1.0
Copyright (C) 2025 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.
text data bss total filename
30 4 0 34 /b.o
Note that -fimplicit-constexpr is key!