diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-07-31 09:55:59 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-31 09:55:59 +0000 |
commit | 007443a0c1bb11ae55a43d562f070aba88a607c6 (patch) | |
tree | 26e10abace19553f3fd5d6ff39ece5add8a893f8 /gcc/ada/gnatxref.adb | |
parent | 76ed5f08f4462d7d22bc6cda3624e131e65bdd52 (diff) | |
download | gcc-007443a0c1bb11ae55a43d562f070aba88a607c6.zip gcc-007443a0c1bb11ae55a43d562f070aba88a607c6.tar.gz gcc-007443a0c1bb11ae55a43d562f070aba88a607c6.tar.bz2 |
[Ada] Spurious error on the placement of aspect Global
This patch modifies the expansion of stand-alone subprogram bodies that appear
in the body of a protected type to properly associate aspects and pragmas to
the newly created spec for the subprogram body. As a result, the annotations
are properly associated with the initial declaration of the subprogram.
2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* exp_ch9.adb (Analyze_Pragmas): New routine.
(Build_Private_Protected_Declaration): Code clean up. Relocate
relevant aspects and pragmas from the stand-alone body to the
newly created spec. Explicitly analyze any pragmas that have
been either relocated or produced by the analysis of the
aspects.
(Move_Pragmas): New routine.
* sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the
case where a pragma applies to the internally created spec for a
stand-along subprogram body declared in a protected body.
gcc/testsuite/
* gnat.dg/global.adb, gnat.dg/global.ads: New testcase.
From-SVN: r263097
Diffstat (limited to 'gcc/ada/gnatxref.adb')
0 files changed, 0 insertions, 0 deletions