projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e73972
)
[Ada] Fix missing error messages when returning limited type
author
Ghjuvan Lacambre
<lacambre@adacore.com>
Fri, 30 Apr 2021 08:11:25 +0000
(10:11 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Mon, 5 Jul 2021 13:09:15 +0000
(13:09 +0000)
gcc/ada/
* sem_ch6.adb (Check_Limited_Return): Replace Comes_From_Source
with Comes_From_Extended_Return_Statement.
gcc/ada/sem_ch6.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_ch6.adb
b/gcc/ada/sem_ch6.adb
index
ffab332
..
3697aba
100644
(file)
--- a/
gcc/ada/sem_ch6.adb
+++ b/
gcc/ada/sem_ch6.adb
@@
-7008,7
+7008,8
@@
package body Sem_Ch6 is
elsif Is_Limited_Type (R_Type)
and then not Is_Interface (R_Type)
- and then Comes_From_Source (N)
+ and then not (Nkind (N) = N_Simple_Return_Statement
+ and then Comes_From_Extended_Return_Statement (N))
and then not In_Instance_Body
and then not OK_For_Limited_Init_In_05 (R_Type, Expr)
then