diff options
author | Justin Squirek <squirek@adacore.com> | 2022-01-18 10:46:23 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-09 09:27:38 +0000 |
commit | a252a471df552cf2c0a688a3472094fe234b7ab6 (patch) | |
tree | d2a5c715ee359862469384ce368c2e5876f41cc7 /gcc/system.h | |
parent | ebbe48015e6070b0f020fa57c7eb7fce554e71d4 (diff) | |
download | gcc-a252a471df552cf2c0a688a3472094fe234b7ab6.zip gcc-a252a471df552cf2c0a688a3472094fe234b7ab6.tar.gz gcc-a252a471df552cf2c0a688a3472094fe234b7ab6.tar.bz2 |
[Ada] Fix invalid memory access on finalization of class-wide type
This patch corrects issues in the compiler whereby finalization of a
heap- allocated class-wide type may cause an invalid memory read at
runtime when the type in question contains a component whose type has a
large alignment.
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Tag>:
Deal specifically wth class-wide equivalent types without a
parent.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Extract
allocator node for calculation of alignment actual and modify
alignment for allocators of class-wide types with associated
expressions.
(Make_CW_Equivalent_Type): Handle interface types differently
when generating the equivalent record.
* sem_aux.adb (First_Tag_Component): Accept class-wide
equivalent types too.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions