X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libgfortran%2Fgenerated%2Fminloc1_8_i1.c;h=b92faa76494c6d808d3f9594aa2c8a1021003cfd;hb=748086b7b2201112aff2dea9d037af1fc92567ff;hp=b0fbe0d946ec48ffe34b8c7234424564b9d04603;hpb=802367d7c9052b80798421c6452f1361b75bcf32;p=gcc.git diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index b0fbe0d946e..b92faa76494 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -1,5 +1,5 @@ /* Implementation of the MINLOC intrinsic - Copyright 2002, 2007 Free Software Foundation, Inc. + Copyright 2002, 2007, 2009 Free Software Foundation, Inc. Contributed by Paul Brook This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -7,26 +7,21 @@ This file is part of the GNU Fortran 95 runtime library (libgfortran). Libgfortran is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) +version 3 of the License, or (at your option) any later version. Libgfortran is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public -License along with libgfortran; see the file COPYING. If not, -write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ #include "libgfortran.h" #include @@ -57,12 +52,15 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type len; index_type delta; index_type dim; + int continue_loop; /* Make dim zero based to avoid confusion. */ dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; len = array->dim[dim].ubound + 1 - array->dim[dim].lbound; + if (len < 0) + len = 0; delta = array->dim[dim].stride; for (n = 0; n < dim; n++) @@ -121,7 +119,7 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, (long int) (GFC_DESCRIPTOR_RANK (retarray)), (long int) rank); - if (compile_options.bounds_check) + if (unlikely (compile_options.bounds_check)) { for (n=0; n < rank; n++) { @@ -149,7 +147,8 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, base = array->data; dest = retarray->data; - while (base) + continue_loop = 1; + while (continue_loop) { const GFC_INTEGER_1 * restrict src; GFC_INTEGER_8 result; @@ -193,8 +192,8 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, if (n == rank) { /* Break out of the look. */ - base = NULL; - break; + continue_loop = 0; + break; } else { @@ -314,7 +313,7 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, if (rank != GFC_DESCRIPTOR_RANK (retarray)) runtime_error ("rank of return array incorrect in MINLOC intrinsic"); - if (compile_options.bounds_check) + if (unlikely (compile_options.bounds_check)) { for (n=0; n < rank; n++) { @@ -504,7 +503,7 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, (long int) (GFC_DESCRIPTOR_RANK (retarray)), (long int) rank); - if (compile_options.bounds_check) + if (unlikely (compile_options.bounds_check)) { for (n=0; n < rank; n++) {