From: Eric Botcazou Date: Sat, 8 Dec 2012 12:13:44 +0000 (+0000) Subject: trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54441a34e7aebb64613ee1105548c55769b93791;p=gcc.git trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an array. * gcc-interface/trans.c (gnat_to_gnu) : Assert that the type of the prefix is ultimately an array. From-SVN: r194323 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5a5834fc98e..7e1208f0e52 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2012-12-08 Eric Botcazou + + * gcc-interface/trans.c (gnat_to_gnu) : Assert + that the type of the prefix is ultimately an array. + 2012-12-08 Eric Botcazou * gcc-interface/trans.c (Subprogram_Body_to_gnu): Be prepared for a 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. */