summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-12 08:45:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-12 08:45:27 +0000
commit6b2e6e3347b155a61200ebed36ec53b5043c98bf (patch)
treeee66bf6f85df2b3be6eff488406f296b98a0eafa /gcc/ada/gcc-interface/trans.c
parentbce49ba48eac50ef8a5b06cd5d57db9bb99570f2 (diff)
downloadgcc-6b2e6e3347b155a61200ebed36ec53b5043c98bf.tar.gz
2012-11-12 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 193426 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@193427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 0188ddc4c35..dbc4689a1d5 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. */