mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 02:00:54 +08:00
[Ada] Avoid crash in GNATprove due to inlining inside type
The special inlining for GNATprove should not inline calls inside record types, used for the constraints of components. There is no impact on compilation. 2019-08-13 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Call): Do not inline calls inside record types. From-SVN: r274344
This commit is contained in:
parent
258325dddf
commit
1788bf118c
@ -1,3 +1,8 @@
|
||||
2019-08-13 Yannick Moy <moy@adacore.com>
|
||||
|
||||
* sem_res.adb (Resolve_Call): Do not inline calls inside record
|
||||
types.
|
||||
|
||||
2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* sem_ch4.adb (Analyze_One_Call): Remove bypass for type
|
||||
|
@ -7062,6 +7062,15 @@ package body Sem_Res is
|
||||
end if;
|
||||
end if;
|
||||
|
||||
-- Cannot inline a call inside the definition of a record type,
|
||||
-- typically inside the constraints of the type. Calls in
|
||||
-- default expressions are also not inlined, but this is
|
||||
-- filtered out above when testing In_Default_Expr.
|
||||
|
||||
elsif Is_Record_Type (Current_Scope) then
|
||||
Cannot_Inline
|
||||
("cannot inline & (inside record type)?", N, Nam_UA);
|
||||
|
||||
-- With the one-pass inlining technique, a call cannot be
|
||||
-- inlined if the corresponding body has not been seen yet.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user