aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-06-13 08:17:07 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-06-13 08:17:07 +0000
commit7cdb687133520d1091198e034398df3cec0c8ae1 (patch)
treed1c9e2f79e0a5b29479f21ee3e9011d56648faad /gcc
parent42e77cbc7d5c00e637bca5614a8d688ad08a39c7 (diff)
downloadgcc-7cdb687133520d1091198e034398df3cec0c8ae1.zip
gcc-7cdb687133520d1091198e034398df3cec0c8ae1.tar.gz
gcc-7cdb687133520d1091198e034398df3cec0c8ae1.tar.bz2
decl.c (gnat_to_gnu_subprog_type): Build only a minimal PARM_DECL when the parameter type is dummy.
* gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal PARM_DECL when the parameter type is dummy. * gcc-interface/trans.c (Call_to_gnu): Translate formal types before formal objects. From-SVN: r237362
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/gcc-interface/decl.c5
-rw-r--r--gcc/ada/gcc-interface/trans.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4ab6648..930e866 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,12 @@
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
+ PARM_DECL when the parameter type is dummy.
+ * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
+ formal objects.
+
+2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
PLUS_EXPR in the expression of a renaming.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 985527e..0ce2d47 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -5959,8 +5959,11 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition,
else
{
+ /* Build a minimal PARM_DECL without DECL_ARG_TYPE so that
+ Call_to_gnu will stop if it encounters the PARM_DECL. */
gnu_param
- = create_param_decl (gnu_param_name, gnu_param_type);
+ = build_decl (input_location, PARM_DECL, gnu_param_name,
+ gnu_param_type);
associate_subprog_with_dummy_type (gnat_subprog,
gnu_param_type);
incomplete_profile_p = true;
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 2f47e9a..f110e92 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -4341,9 +4341,9 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
gnat_actual = Next_Actual (gnat_actual))
{
Entity_Id gnat_formal_type = Etype (gnat_formal);
+ tree gnu_formal_type = gnat_to_gnu_type (gnat_formal_type);
tree gnu_formal = present_gnu_tree (gnat_formal)
? get_gnu_tree (gnat_formal) : NULL_TREE;
- tree gnu_formal_type = gnat_to_gnu_type (gnat_formal_type);
const bool is_true_formal_parm
= gnu_formal && TREE_CODE (gnu_formal) == PARM_DECL;
const bool is_by_ref_formal_parm