-/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
Contributed by Thomas Koenig
This file is part of the GNU Fortran runtime library (libgfortran).
ret_rank = GFC_DESCRIPTOR_RANK (retarray);
- if (ret_rank != 1)
- runtime_error ("Incorrect rank of return array in %s intrinsic:"
- "is %ld, should be 1", name, (long int) ret_rank);
+ /* ret_rank should always be 1, otherwise there is an internal error */
+ GFC_ASSERT(ret_rank == 1);
rank = GFC_DESCRIPTOR_RANK (array);
ret_extent = GFC_DESCRIPTOR_EXTENT(retarray,0);
const char * a_name, const char * intrinsic)
{
int empty;
- int n;
int rank;
index_type a_size;
a_size = size0 (a);
empty = 0;
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
if (extent[n] == 0)
empty = 1;
" intrinsic: should not be zero-sized",
a_name, intrinsic);
- for (n = 0; n < rank; n++)
+ for (index_type n = 0; n < rank; n++)
{
index_type a_extent;
a_extent = GFC_DESCRIPTOR_EXTENT(a, n);