diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-29 09:02:46 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-29 09:02:46 +0000 |
commit | 95164e7198c69e87adf63516993537c834b4512e (patch) | |
tree | 393bcdf9df2f8ceab15cb45aae341cbc2d86146c /gcc/ada/gcc-interface/gigi.h | |
parent | a890896f9d530c1501c3e053174a8f4bcb1478e8 (diff) | |
download | gcc-95164e7198c69e87adf63516993537c834b4512e.tar.gz |
* gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
* gcc-interface/gigi.h (gigi): Remove useless attribute.
(gnat_gimplify_expr): Likewise.
(gnat_to_gnu_external): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
code dealing with the expression of external constants into...
Invoke gnat_to_gnu_external instead.
<E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
when not for a definition. Deal with COMPOUND_EXPR and variables with
DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
'reference to a function call in a renaming. Remove obsolete test and
adjust associated comment.
* gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
temporaries created to hold the return value, if any.
(gnat_to_gnu_external): ...this. New function.
* gcc-interface/utils.c (create_var_decl): Detect a constant created
to hold 'reference to function call.
* gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 00b7c6a66be..2b58d4eadb9 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -246,7 +246,7 @@ extern "C" { structures and then generates code. */ extern void gigi (Node_Id gnat_root, int max_gnat_node, - int number_name ATTRIBUTE_UNUSED, + int number_name, struct Node *nodes_ptr, struct Flags *Flags_Ptr, Node_Id *next_node_ptr, @@ -270,17 +270,19 @@ extern void gigi (Node_Id gnat_root, #endif /* GNAT_NODE is the root of some GNAT tree. Return the root of the - GCC tree corresponding to that GNAT tree. Normally, no code is generated; - we just return an equivalent tree which is used elsewhere to generate - code. */ + GCC tree corresponding to that GNAT tree. */ extern tree gnat_to_gnu (Node_Id gnat_node); +/* Similar to gnat_to_gnu, but discard any object that might be created in + the course of the translation of GNAT_NODE, which must be an "external" + expression in the sense that it will be elaborated elsewhere. */ +extern tree gnat_to_gnu_external (Node_Id gnat_node); + /* GNU_STMT is a statement. We generate code for that statement. */ extern void gnat_expand_stmt (tree gnu_stmt); /* Generate GIMPLE in place for the expression at *EXPR_P. */ -extern int gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p, - gimple_seq *post_p ATTRIBUTE_UNUSED); +extern int gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *); /* Do the processing for the declaration of a GNAT_ENTITY, a type. If a separate Freeze node exists, delay the bulk of the processing. Otherwise |