]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix alignment violation for chain of aligned and misaligned composite types
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 24 Jun 2025 18:32:46 +0000 (20:32 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 4 Jul 2025 08:19:28 +0000 (10:19 +0200)
commit433fcdb6a2c0d5e80c95f58527228802726f8f0e
tree2a680c7bd3159b01558a20bc319dcd44459ff6ac
parent7b4e397c5790055d7791fc341b87f7fb35ff2d6c
ada: Fix alignment violation for chain of aligned and misaligned composite types

This happens when aggressive optimizations are enabled (i.e. -O2 and above)
because the ivopts pass fails to properly mark the new memory accesses it is
creating as misaligned by means of the build_aligned_type function.

gcc/ada/ChangeLog:

* gcc-interface/utils.cc (make_packable_type): Clear the TYPE_PACKED
flag in the case where the alignment is bumped.
gcc/ada/gcc-interface/utils.cc