aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-12-08 12:13:44 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-12-08 12:13:44 +0000
commit54441a34e7aebb64613ee1105548c55769b93791 (patch)
tree162d77654a66967758368af8f7f5c1e4e216b4c0 /gcc/ada/gcc-interface/trans.c
parent28ea163c41fc5ca58c6e9368ece155e42ecd9cc7 (diff)
downloadgcc-54441a34e7aebb64613ee1105548c55769b93791.zip
gcc-54441a34e7aebb64613ee1105548c55769b93791.tar.gz
gcc-54441a34e7aebb64613ee1105548c55769b93791.tar.bz2
trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array.
* gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert that the type of the prefix is ultimately an array. From-SVN: r194323
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index f1398e2..74133a4 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. */