gigi.h (create_label_decl): Adjust.
* gcc-interface/gigi.h (create_label_decl): Adjust. * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter and invoke gnat_pushdecl on it. Remove obsolete settings. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to create_label_decl. * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the label for debugging purposes. From-SVN: r183606
This commit is contained in:
parent
6b318bf2bf
commit
88a94e2bba
|
@ -1,3 +1,13 @@
|
|||
2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/gigi.h (create_label_decl): Adjust.
|
||||
* gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
|
||||
and invoke gnat_pushdecl on it. Remove obsolete settings.
|
||||
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
|
||||
create_label_decl.
|
||||
* gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
|
||||
label for debugging purposes.
|
||||
|
||||
2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
|
||||
|
|
|
@ -4619,7 +4619,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
|
|||
break;
|
||||
|
||||
case E_Label:
|
||||
gnu_decl = create_label_decl (gnu_entity_name);
|
||||
gnu_decl = create_label_decl (gnu_entity_name, gnat_entity);
|
||||
break;
|
||||
|
||||
case E_Block:
|
||||
|
|
|
@ -672,8 +672,9 @@ extern tree create_field_decl (tree field_name, tree field_type,
|
|||
extern tree create_param_decl (tree param_name, tree param_type,
|
||||
bool readonly);
|
||||
|
||||
/* Return a LABEL_DECL node for LABEL_NAME. */
|
||||
extern tree create_label_decl (tree label_name);
|
||||
/* Return a LABEL_DECL with LABEL_NAME. GNAT_NODE is used for the position
|
||||
of the decl. */
|
||||
extern tree create_label_decl (tree, Node_Id);
|
||||
|
||||
/* Return a FUNCTION_DECL node. SUBPROG_NAME is the name of the subprogram,
|
||||
ASM_NAME is its assembler name, SUBPROG_TYPE is its type (a FUNCTION_TYPE
|
||||
|
|
|
@ -5881,7 +5881,8 @@ gnat_to_gnu (Node_Id gnat_node)
|
|||
the next statement that the middle-end knows how to preserve. */
|
||||
if (!optimize && Comes_From_Source (gnat_node))
|
||||
{
|
||||
tree stmt, label = create_label_decl (NULL_TREE);
|
||||
tree stmt, label = create_label_decl (NULL_TREE, gnat_node);
|
||||
DECL_IGNORED_P (label) = 1;
|
||||
start_stmt_group ();
|
||||
stmt = build1 (GOTO_EXPR, void_type_node, label);
|
||||
set_expr_location_from_node (stmt, gnat_node);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* *
|
||||
* C Implementation File *
|
||||
* *
|
||||
* Copyright (C) 1992-2011, Free Software Foundation, Inc. *
|
||||
* Copyright (C) 1992-2012, Free Software Foundation, Inc. *
|
||||
* *
|
||||
* GNAT is free software; you can redistribute it and/or modify it under *
|
||||
* terms of the GNU General Public License as published by the Free Soft- *
|
||||
|
@ -1849,17 +1849,19 @@ potential_alignment_gap (tree prev_field, tree curr_field, tree offset)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Return a LABEL_DECL node for LABEL_NAME. */
|
||||
/* Return a LABEL_DECL with LABEL_NAME. GNAT_NODE is used for the position
|
||||
of the decl. */
|
||||
|
||||
tree
|
||||
create_label_decl (tree label_name)
|
||||
create_label_decl (tree label_name, Node_Id gnat_node)
|
||||
{
|
||||
tree label_decl = build_decl (input_location,
|
||||
LABEL_DECL, label_name, void_type_node);
|
||||
tree label_decl
|
||||
= build_decl (input_location, LABEL_DECL, label_name, void_type_node);
|
||||
|
||||
DECL_CONTEXT (label_decl) = current_function_decl;
|
||||
DECL_MODE (label_decl) = VOIDmode;
|
||||
DECL_SOURCE_LOCATION (label_decl) = input_location;
|
||||
|
||||
/* Add this decl to the current binding level. */
|
||||
gnat_pushdecl (label_decl, gnat_node);
|
||||
|
||||
return label_decl;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue