X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/8fe9942cde59835eb3c3c6936d866dd3305582ef..003b628647705666de261350195da72a38f2c4d2:/l4/pkg/libgfortran/lib/contrib/generated/maxloc1_8_r4.c diff --git a/l4/pkg/libgfortran/lib/contrib/generated/maxloc1_8_r4.c b/l4/pkg/libgfortran/lib/contrib/generated/maxloc1_8_r4.c index 584bdb81f..5e508ba7a 100644 --- a/l4/pkg/libgfortran/lib/contrib/generated/maxloc1_8_r4.c +++ b/l4/pkg/libgfortran/lib/contrib/generated/maxloc1_8_r4.c @@ -1,5 +1,5 @@ /* Implementation of the MAXLOC intrinsic - Copyright 2002, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2002-2015 Free Software Foundation, Inc. Contributed by Paul Brook This file is part of the GNU Fortran runtime library (libgfortran). @@ -80,7 +80,7 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, extent[n] = 0; } - if (retarray->data == NULL) + if (retarray->base_addr == NULL) { size_t alloc_size, str; @@ -98,10 +98,9 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank; - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1) - * extent[rank-1]; + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; - retarray->data = internal_malloc_size (alloc_size); + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ @@ -131,8 +130,8 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, return; } - base = array->data; - dest = retarray->data; + base = array->base_addr; + dest = retarray->base_addr; continue_loop = 1; while (continue_loop) @@ -243,7 +242,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, if (len <= 0) return; - mbase = mask->data; + mbase = mask->base_addr; mask_kind = GFC_DESCRIPTOR_SIZE (mask); @@ -279,7 +278,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, extent[n] = 0; } - if (retarray->data == NULL) + if (retarray->base_addr == NULL) { size_t alloc_size, str; @@ -294,8 +293,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, } - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1) - * extent[rank-1]; + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; retarray->offset = 0; retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank; @@ -307,7 +305,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, return; } else - retarray->data = internal_malloc_size (alloc_size); + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else @@ -332,8 +330,8 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, return; } - dest = retarray->data; - base = array->data; + dest = retarray->base_addr; + base = array->base_addr; while (base) { @@ -354,12 +352,8 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_8 result2 = 0; #endif result = 0; - if (len <= 0) - *dest = 0; - else + for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - for (n = 0; n < len; n++, src += delta, msrc += mdelta) - { if (*msrc) { @@ -387,9 +381,8 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, maxval = *src; result = (GFC_INTEGER_8)n + 1; } - } - *dest = result; } + *dest = result; } /* Advance to the next element. */ count[0]++; @@ -472,7 +465,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, extent[n] = 0; } - if (retarray->data == NULL) + if (retarray->base_addr == NULL) { size_t alloc_size, str; @@ -490,8 +483,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank; - alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1) - * extent[rank-1]; + alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; if (alloc_size == 0) { @@ -500,7 +492,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, return; } else - retarray->data = internal_malloc_size (alloc_size); + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { @@ -532,7 +524,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); } - dest = retarray->data; + dest = retarray->base_addr; while(1) {