From: charlet Date: Wed, 6 Jul 2016 13:45:55 +0000 (+0000) Subject: 2016-07-06 Javier Miranda X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c8f2bf1b962ec33a42474c0be70e6e017c1a4d1;p=thirdparty%2Fgcc.git 2016-07-06 Javier Miranda * sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec then move its aspects to the internally built subprogram spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238052 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 98e47fbc7589..8954f8b04ea5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2016-07-06 Javier Miranda + + * sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec + then move its aspects to the internally built subprogram spec. + 2016-07-06 Yannick Moy * sem_ch6.adb (Analyze_Expression_Function): Mark body of diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index a47ebda28071..c9c0f7f46056 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2665,6 +2665,12 @@ package body Sem_Ch6 is (Specification (Decl), Plist); end if; + -- Move aspects to the new spec + + if Has_Aspects (N) then + Move_Aspects (N, To => Decl); + end if; + Insert_Before (N, Decl); Analyze (Decl); Analyze (Prag);