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:
2499393
)
ada: Put back conversion to interface in more cases
author
Eric Botcazou
<ebotcazou@adacore.com>
Tue, 3 Jan 2023 07:20:30 +0000
(08:20 +0100)
committer
Marc Poulhiès
<poulhies@adacore.com>
Mon, 16 Jan 2023 14:44:54 +0000
(15:44 +0100)
This needs to be done for all expressions with class-wide type.
gcc/ada/
* exp_ch3.adb (Make_Allocator_For_Return): Put back an interface
conversion for expressions with non-interface class-wide type.
gcc/ada/exp_ch3.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/exp_ch3.adb
b/gcc/ada/exp_ch3.adb
index
c866a9c
..
84594ed
100644
(file)
--- a/
gcc/ada/exp_ch3.adb
+++ b/
gcc/ada/exp_ch3.adb
@@
-7185,7
+7185,7
@@
package body Exp_Ch3 is
-- remove earlier in the processing.
if Is_Interface (Typ)
- and then Is_
Interfac
e (Etype (Alloc_Expr))
+ and then Is_
Class_Wide_Typ
e (Etype (Alloc_Expr))
and then Typ /= Etype (Alloc_Expr)
then
Alloc_Expr := Convert_To (Typ, Alloc_Expr);