aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-12-08 12:13:44 +0000
committerEric Botcazou <ebotcazou@adacore.com>2012-12-08 12:13:44 +0000
commit9019c60aa8bf1dc759288aa48727f4cf8711226f (patch)
tree162d77654a66967758368af8f7f5c1e4e216b4c0
parenta9823e332a3f101d102ddf89ffbd24c9c563b676 (diff)
* gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert
that the type of the prefix is ultimately an array. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194323 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/trans.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5a5834fc98e..7e1208f0e52 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert
+ that the type of the prefix is ultimately an array.
+
+2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Be prepared for a
by-ref VAR_DECL in the case of an Out parameter passed by copy.
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index f1398e2b6ba..74133a458b1 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -5410,6 +5410,10 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_result = gnu_array_object;
+ /* The failure of this assertion will very likely come from a missing
+ expansion for a packed array access. */
+ gcc_assert (TREE_CODE (TREE_TYPE (gnu_array_object)) == ARRAY_TYPE);
+
/* First compute the number of dimensions of the array, then
fill the expression array, the order depending on whether
this is a Convention_Fortran array or not. */