aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-11-09 11:07:30 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-11-09 11:07:30 +0000
commit4e568a151c146de62c58f35cd4620145600e4bf2 (patch)
tree416759c1516f6513f952d4883ad51ceb994c8e4e /gcc/ada
parent4993465992b6711d8bda90247122135d01ed6f3d (diff)
downloadgcc-4e568a151c146de62c58f35cd4620145600e4bf2.zip
gcc-4e568a151c146de62c58f35cd4620145600e4bf2.tar.gz
gcc-4e568a151c146de62c58f35cd4620145600e4bf2.tar.bz2
trans.c (gnat_to_gnu): Deal with a missing library unit instead of calling gnat_to_gnu on Emtpy.
* gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Body_Stub>: Deal with a missing library unit instead of calling gnat_to_gnu on Emtpy. Remove last bits of support for SCIL nodes. Add cases for nodes that should only be present when annotating types. Add default abort. From-SVN: r193357
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/gcc-interface/trans.c25
2 files changed, 27 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2012814..6871576 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Body_Stub>: Deal
+ with a missing library unit instead of calling gnat_to_gnu on Emtpy.
+ Remove last bits of support for SCIL nodes. Add cases for nodes that
+ should only be present when annotating types. Add default abort.
+
2012-11-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in: Revert most changes.
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 0188ddc..dbc4689 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -6493,7 +6493,13 @@ gnat_to_gnu (Node_Id gnat_node)
case N_Protected_Body_Stub:
case N_Task_Body_Stub:
/* Simply process whatever unit is being inserted. */
- gnu_result = gnat_to_gnu (Unit (Library_Unit (gnat_node)));
+ if (Present (Library_Unit (gnat_node)))
+ gnu_result = gnat_to_gnu (Unit (Library_Unit (gnat_node)));
+ else
+ {
+ gcc_assert (type_annotate_only);
+ gnu_result = alloc_stmt_list ();
+ }
break;
case N_Subunit:
@@ -6855,11 +6861,20 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_result = alloc_stmt_list ();
break;
- default:
- /* SCIL nodes require no processing for GCC. Other nodes should only
- be present when annotating types. */
- gcc_assert (IN (kind, N_SCIL_Node) || type_annotate_only);
+ case N_Function_Specification:
+ case N_Procedure_Specification:
+ case N_Op_Concat:
+ case N_Component_Association:
+ case N_Protected_Body:
+ case N_Task_Body:
+ /* These nodes should only be present when annotating types. */
+ gcc_assert (type_annotate_only);
gnu_result = alloc_stmt_list ();
+ break;
+
+ default:
+ /* Other nodes are not supposed to reach here. */
+ gcc_unreachable ();
}
/* If we pushed the processing of the elaboration routine, pop it back. */