re PR libfortran/51828 (libgfortran build warnings)

PR libfortran/51828
	* intrinsics/unpack_generic.c (unpack_internal): Let the compiler
	know that dim > 0 to avoid warnings.

From-SVN: r204940
This commit is contained in:
Francois-Xavier Coudert 2013-11-18 09:27:11 +00:00 committed by François-Xavier Coudert
parent ed97ad4709
commit 74bc175e84
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-11-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/51828
* intrinsics/unpack_generic.c (unpack_internal): Let the compiler
know that dim > 0 to avoid warnings.
2013-11-15 Janne Blomqvist <jb@gcc.gnu.org>
Jerry DeLisle <jvdelisle@gcc.gnu.org>

View File

@ -144,6 +144,9 @@ unpack_internal (gfc_array_char *ret, const gfc_array_char *vector,
if (empty)
return;
/* This assert makes sure GCC knows we can access *stride[0] later. */
assert (dim > 0);
vstride0 = GFC_DESCRIPTOR_STRIDE_BYTES(vector,0);
rstride0 = rstride[0];
fstride0 = fstride[0];