]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Remove useless trampolines caused by Unchecked_Conversion
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 4 Apr 2024 16:15:24 +0000 (18:15 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:26:48 +0000 (09:26 +0200)
commit933d27af7748c38f1213edceaa6a2edf46f82cc2
treed1cce2ab5a7ef68d942bec516b414aafc0d1271a
parent21484502b0d773ae485be9c9b814b30f2b52fb2f
ada: Remove useless trampolines caused by Unchecked_Conversion

The partial solution implemented in Validate_Unchecked_Conversion to support
unchecked conversions between addresses and pointers to subprograms, for the
platforms where pointers to subprograms do not all have the same size, turns
out to be counter-productive for others because it may cause the creation of
useless trampolines, which in turn makes the stack executable.

gcc/ada/

* sem_ch13.adb (Validate_Unchecked_Conversion): Restrict forcing the
Can_Use_Internal_Rep flag to platforms that require unnesting.
gcc/ada/sem_ch13.adb