]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix error and crash on imported function with precondition and 'Base
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 1 Feb 2023 11:35:08 +0000 (12:35 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 22 May 2023 08:44:08 +0000 (10:44 +0200)
commit159977048dcdf3d4f7f4c7bd0186be411464cd0f
tree410e379da4068e126de2ed5173dd05fc0cb207f5
parent165b05717cfe9ed17a87b5430e5f9dd19aa8eb1a
ada: Fix error and crash on imported function with precondition and 'Base

This fixes a spurious error on an imported function with a precondition
and a parameter declared with a 'Base formal type, and even a crash in
the case where this function is declared in a generic package.

gcc/ada/

* freeze.adb (Wrap_Imported_Subprogram): Use Copy_Subprogram_Spec
to copy the spec from the subprogram to the generated subprogram
body.
(Freeze_Entity): Do not wrap imported subprograms inside generics.
gcc/ada/freeze.adb