+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
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;
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