https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120955

--- Comment #11 from fiesh at zefix dot tv ---
So at last I have *something*.  I'm not sure if it's at the core of the problem
though, but it does look fishy to my untrained eye.

Attached you find a translation unit a.ii that:

* produces a data segment of size 31 with 14
* produces a data segment of size 194 with 15

It is not reduced since nothing happened.  My interestingness test was like
this (with -n1 since it would race otherwise):

podman exec 86af579e3591 avr-g++ -std=c++20 -Os -g0 -ffunction-sections
-fdata-sections -fmerge-all-constants -fstrict-enums -ffast-math
-fassociative-math -freciprocal-math -fno-signed-zeros -fno-exceptions
-fno-threadsafe-statics -fimplicit-constexpr -mmcu=atmega2560
-fvisibility=hidden -o /a.o -c /tmp/z/a.ii && podman exec 86af579e3591 avr-size
-G /a.o | rg -v text | awk '{ print $2; }' > /tmp/z/gcc15_size &&
podman exec 267b0fab5455 avr-g++ -std=c++20 -Os -g0 -ffunction-sections
-fdata-sections -fmerge-all-constants -fstrict-enums -ffast-math
-fassociative-math -freciprocal-math -fno-signed-zeros -fno-exceptions
-fno-threadsafe-statics -fimplicit-constexpr -mmcu=atmega2560
-fvisibility=hidden -o /a.o -c /tmp/z/a.ii && podman exec 267b0fab5455 avr-size
-G /a.o | rg -v text | awk '{ print $2; }' > /tmp/z/gcc14_size &&
test `cat /tmp/z/gcc15_size` -ge 194 &&
test `cat /tmp/z/gcc14_size` -le 31

With 86af579e3591 being an alpine 3.22 container with avr-gcc 15 and
267b0fab5455 being an alpine 3.21 container with avr-gcc 14 installed.

Reply via email to