diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-08-21 14:46:45 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:46:45 +0000 |
commit | 1ab1c4ee18d7866249fb99bcc9d073fcb475dc9d (patch) | |
tree | 45623568818d7cd8e118cbf03e108d6ce8d48f64 /gcc | |
parent | 294e7bbb9eb0b1f8d0484e9ddb562a08f7505cab (diff) | |
download | gcc-1ab1c4ee18d7866249fb99bcc9d073fcb475dc9d.zip gcc-1ab1c4ee18d7866249fb99bcc9d073fcb475dc9d.tar.gz gcc-1ab1c4ee18d7866249fb99bcc9d073fcb475dc9d.tar.bz2 |
[Ada] Fix spurious error on unchecked conversion on VFA record type
2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* gcc-interface/trans.c (Call_to_gnu): Always suppress an
unchecked conversion around the actual for an In parameter
passed by copy.
From-SVN: r263718
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 27bb79d..e882e39 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2018-08-21 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/trans.c (Call_to_gnu): Always suppress an + unchecked conversion around the actual for an In parameter + passed by copy. + +2018-08-21 Eric Botcazou <ebotcazou@adacore.com> + * exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a selected component inherited in a record extension and subject to a representation clause, retrieve the position and size from diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 0371d00..940bf5f 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -4450,6 +4450,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target, const bool suppress_type_conversion = ((Nkind (gnat_actual) == N_Unchecked_Type_Conversion && (!in_param + || !is_by_ref_formal_parm || (Is_Composite_Type (Underlying_Type (gnat_formal_type)) && !Is_Constrained (Underlying_Type (gnat_formal_type))))) || (Nkind (gnat_actual) == N_Type_Conversion |