]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Incorrect code for anonymous access-to-function with convention C
authorBob Duff <duff@adacore.com>
Thu, 28 Apr 2022 14:22:42 +0000 (10:22 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 1 Jun 2022 08:43:15 +0000 (08:43 +0000)
commit5512eabc3e162c2c1e4c54febc716353519e51f0
tree2a3d16b45828288ea5d103979c0a277c48a4baa8
parent3cd52053f80846df2ea22e3fff059ebc094e649b
[Ada] Incorrect code for anonymous access-to-function with convention C

This patch fixes a bug where the compiler generates incorrect code for a
call via an object with convention C, whose type is an anonymous
access-to-function type.

gcc/ada/

* einfo-utils.adb (Set_Convention): Call Set_Convention
recursively, so that Set_Can_Use_Internal_Rep is called (if
appropriate) on the anonymous access type of the object, and its
designated subprogram type.
* sem_ch3.adb (Access_Definition): Remove redundant call to
Set_Can_Use_Internal_Rep.
gcc/ada/einfo-utils.adb
gcc/ada/sem_ch3.adb