From patchwork Tue Nov 7 10:24:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 162370 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp138223vqo; Tue, 7 Nov 2023 02:26:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvTa0rieEoz22eVi19dVmqEYR803tn9Z6/unQOVKyDsYH5/Sd2rzJggmlV1EpIybcd09x6 X-Received: by 2002:a05:622a:216:b0:417:eb3c:494e with SMTP id b22-20020a05622a021600b00417eb3c494emr40080092qtx.59.1699352787048; Tue, 07 Nov 2023 02:26:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699352787; cv=pass; d=google.com; s=arc-20160816; b=QxkCO0X9MVQoUJ/86Nc6PKNIKGTfecNyKHkwl+mtiTALf0XZGyxmto0KD2lPVGURfB vgWik67JHfz98T11j5uVwWMu43GM5sgy5wRN8mAdLtkAknT9GHpIE9pE2oJBL+GVghRK eGYjQElfrbcsZotJ3+PkpBUA5RyKRvNzKGnxnH186HzmdlzMt3cspDIHFuDX0zBjXAfG yNuQFR0QTvpsoB6cqZWBWzuaDyn2PtJ5fSrYXEIXCv5yWm8pbqijlnVtxeEAkqqdDjf+ omBmB4cTqAZHgXqcUXtMZ/3VA9gygvaNsjpZD0Cgh0FDiHsDz8ER0GLaEVM/U5s6pBri ldCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=CQSOaYGRENUauQOvEJN0BRl8xB9dLvIH8LtuaJd3lEU=; fh=zSP9Z/xOHj5SuUPPVSStTox2VGm+p0Uo644NtF/AZic=; b=YiElP+1NUHPAaQI3oNi1aRGPyytCQw2OyeqQ7vd019swGknJA0mq21rwGTeCGRIaFQ P1lsgq7LTJ4313hXwvCJ+qfta0voB3dhQr2Fa6AMzILOH4rls5W29/7tQwf8CNLoomlN MJHp56pcBjW17VLKb72lMEGmUMS/BwJAVe0aT3KSArXSwYRPu20f0RiRc93rC3IrUkjz 1QaTh4Ebl8j7QdTLzmIjZj6Pd0XpdjxZpoQz5KVDFdoK2RsYT3EE43ckKbQT/EoS2bl0 j105wd3XLkhMUfUavW4D1CcvEI/JjBrmpZOoLHe7p8WU7rKJCWqCWn+FEA+FvsjPyBiE EcTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lNvCp2GO; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=LEa4ctTh; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k9-20020a05622a03c900b0041cd183c283si6470958qtx.803.2023.11.07.02.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 02:26:27 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lNvCp2GO; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=LEa4ctTh; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61F603887F58 for ; Tue, 7 Nov 2023 10:26:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61F603887F58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699352762; bh=CQSOaYGRENUauQOvEJN0BRl8xB9dLvIH8LtuaJd3lEU=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lNvCp2GOdY9w1D9CGJAPGkUahgFtwRgSKl/y9NBKf3EMGmy80MgyzraVFdtyVvr/q f/JOGpV8jLX6rk75EA2r7oNDj7o9gVJ4SyLhQjRwn/mp79FabpP8JHLGIjpAsvgmK4 IwWE2dpL65V0W4S2xwfbBeKCAUxxpgXBfSB7T4RI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by sourceware.org (Postfix) with ESMTPS id ED78E38618B4 for ; Tue, 7 Nov 2023 10:24:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED78E38618B4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gcc.gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ED78E38618B4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352658; cv=none; b=czF8lz7zrL8KfFofXesQRBJdtcrqEEkYGnKeYPht/gN+PGUJlLZo+4ibkVmG6gfC5E5rZby2odwwKcFk5jmxI91V0fPZYwn0iynV1t0yyWk4NPvSO41wnB6/9CV7QTpuDOyITpz5JgZ0dsu67SmrQsdkvTUeNcXmJkEGvLD/hDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352658; c=relaxed/simple; bh=NTv9bMji1HcdZtAvc41HZWDzUof09d3SvCcQt9wzObI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ASqwvQ3zghPOEPUvCRtUw7OkfJp3asXsP+/mlyQmb5f4E+tz9M7johoPYZ0yne/gKsv8mQf3BkDyym7FoNL7ZBTmTaokZWy4t8NgyZj0B/q/WDt/EDKCw2h97Vj/Qp4B/5x9Ci+LrGNMLNdMZ12LHcFirZdEyCAiUvZpoji9N98= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from cyrano.home ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 0JFcrynXNF6ta0JFirgDCt; Tue, 07 Nov 2023 11:24:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1699352651; bh=CQSOaYGRENUauQOvEJN0BRl8xB9dLvIH8LtuaJd3lEU=; h=From:To:Subject:Date:In-Reply-To:References; b=LEa4ctTh82AxdTJolZtMcmhE5QLzrNam8tZc9vJhS6jWn6Ue1d9FUVD5VSB+WkCDK xE/86eCqZnZsLCTjERml2J8jTuzCmL9Nd58CVz2kEGkq5zZnf9bey50sNxKgDOjbky +yliLOioxCVUtSOm6eEsnCO3M/cl/s7tGc1+ekKLet7+3jwZTGz42NFqd/wkxTmt98 DziX5bw7GFLF8hkpi588eOOX7EoFJd1F8PHf8QVhJFKozok6qYE3bQHTC7A8OccCjr iIHkDvryTWUJFtfpa8y0xZvCKrrUFdcffXgoBE5VWsBljgjD8/0RjtEYcTpwYLwU5l pJNmknHL5SUJQ== X-ME-Helo: cyrano.home X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Tue, 07 Nov 2023 11:24:11 +0100 X-ME-IP: 86.215.161.51 From: Mikael Morin To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH v2 1/3] libgfortran: Don't skip allocation if size is zero [PR112412] Date: Tue, 7 Nov 2023 11:24:02 +0100 Message-ID: <20231107102404.1723120-2-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107102404.1723120-1-mikael@gcc.gnu.org> References: <20231107102404.1723120-1-mikael@gcc.gnu.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781900548224387498 X-GMAIL-MSGID: 1781900548224387498 In the function template of transformational functions doing a reduction of an array along one dimension, if the passed in result array was unallocated and the calculated allocation size was zero (this is the case of empty result arrays), an early return used to skip the allocation. This change moves the allocation before the early return, so that empty result arrays are not seen as unallocated. This is possible because zero size is explicitly supported by the allocation function. The offending code is present in several places, and this updates them all. More precisely, there is one place in the template for logical reductions, and there are two places in the templates corresponding to masked reductions with respectively array mask and scalar mask. Templates for unmasked reductions, which already allocate before returning, are not affected, but unmasked reductions are checked nevertheless in the testcase. The affected m4 files are ifunction.m4 for regular functions and types, ifunction-s.m4 for character minloc and maxloc, ifunction-s2.m4 for character minval and maxval, and ifunction_logical for logical reductions. PR fortran/112412 libgfortran/ChangeLog: * m4/ifunction.m4 (START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Don't skip allocation if the allocation size is zero. * m4/ifunction-s.m4 (START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Ditto. * m4/ifunction-s2.m4 (START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Ditto. * m4/ifunction_logical.m4 (START_ARRAY_FUNCTION): Ditto. * generated/all_l1.c: Regenerate. * generated/all_l16.c: Regenerate. * generated/all_l2.c: Regenerate. * generated/all_l4.c: Regenerate. * generated/all_l8.c: Regenerate. * generated/any_l1.c: Regenerate. * generated/any_l16.c: Regenerate. * generated/any_l2.c: Regenerate. * generated/any_l4.c: Regenerate. * generated/any_l8.c: Regenerate. * generated/count_16_l.c: Regenerate. * generated/count_1_l.c: Regenerate. * generated/count_2_l.c: Regenerate. * generated/count_4_l.c: Regenerate. * generated/count_8_l.c: Regenerate. * generated/iall_i1.c: Regenerate. * generated/iall_i16.c: Regenerate. * generated/iall_i2.c: Regenerate. * generated/iall_i4.c: Regenerate. * generated/iall_i8.c: Regenerate. * generated/iany_i1.c: Regenerate. * generated/iany_i16.c: Regenerate. * generated/iany_i2.c: Regenerate. * generated/iany_i4.c: Regenerate. * generated/iany_i8.c: Regenerate. * generated/iparity_i1.c: Regenerate. * generated/iparity_i16.c: Regenerate. * generated/iparity_i2.c: Regenerate. * generated/iparity_i4.c: Regenerate. * generated/iparity_i8.c: Regenerate. * generated/maxloc1_16_i1.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/maxloc1_16_i2.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/maxloc1_16_r17.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/maxloc1_16_s1.c: Regenerate. * generated/maxloc1_16_s4.c: Regenerate. * generated/maxloc1_4_i1.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/maxloc1_4_i2.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/maxloc1_4_r17.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/maxloc1_4_s1.c: Regenerate. * generated/maxloc1_4_s4.c: Regenerate. * generated/maxloc1_8_i1.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/maxloc1_8_i2.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r17.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/maxloc1_8_s1.c: Regenerate. * generated/maxloc1_8_s4.c: Regenerate. * generated/maxval1_s1.c: Regenerate. * generated/maxval1_s4.c: Regenerate. * generated/maxval_i1.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/maxval_i2.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/maxval_r17.c: Regenerate. * generated/maxval_r4.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/minloc1_16_i1.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/minloc1_16_i2.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/minloc1_16_r17.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/minloc1_16_s1.c: Regenerate. * generated/minloc1_16_s4.c: Regenerate. * generated/minloc1_4_i1.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc1_4_i2.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/minloc1_4_r17.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/minloc1_4_s1.c: Regenerate. * generated/minloc1_4_s4.c: Regenerate. * generated/minloc1_8_i1.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/minloc1_8_i2.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/minloc1_8_r17.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/minloc1_8_s1.c: Regenerate. * generated/minloc1_8_s4.c: Regenerate. * generated/minval1_s1.c: Regenerate. * generated/minval1_s4.c: Regenerate. * generated/minval_i1.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/minval_i2.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/minval_r17.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/minval_r8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/product_c17.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/product_i1.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/product_i2.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_r17.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/sum_c17.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/sum_i1.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/sum_i2.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/sum_r17.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/sum_r8.c: Regenerate. gcc/testsuite/ChangeLog: * gfortran.dg/allocated_4.f90: New test. --- gcc/testsuite/gfortran.dg/allocated_4.f90 | 195 ++++++++++++++++++++++ libgfortran/generated/all_l1.c | 3 +- libgfortran/generated/all_l16.c | 3 +- libgfortran/generated/all_l2.c | 3 +- libgfortran/generated/all_l4.c | 3 +- libgfortran/generated/all_l8.c | 3 +- libgfortran/generated/any_l1.c | 3 +- libgfortran/generated/any_l16.c | 3 +- libgfortran/generated/any_l2.c | 3 +- libgfortran/generated/any_l4.c | 3 +- libgfortran/generated/any_l8.c | 3 +- libgfortran/generated/count_16_l.c | 3 +- libgfortran/generated/count_1_l.c | 3 +- libgfortran/generated/count_2_l.c | 3 +- libgfortran/generated/count_4_l.c | 3 +- libgfortran/generated/count_8_l.c | 3 +- libgfortran/generated/iall_i1.c | 7 +- libgfortran/generated/iall_i16.c | 7 +- libgfortran/generated/iall_i2.c | 7 +- libgfortran/generated/iall_i4.c | 7 +- libgfortran/generated/iall_i8.c | 7 +- libgfortran/generated/iany_i1.c | 7 +- libgfortran/generated/iany_i16.c | 7 +- libgfortran/generated/iany_i2.c | 7 +- libgfortran/generated/iany_i4.c | 7 +- libgfortran/generated/iany_i8.c | 7 +- libgfortran/generated/iparity_i1.c | 7 +- libgfortran/generated/iparity_i16.c | 7 +- libgfortran/generated/iparity_i2.c | 7 +- libgfortran/generated/iparity_i4.c | 7 +- libgfortran/generated/iparity_i8.c | 7 +- libgfortran/generated/maxloc1_16_i1.c | 7 +- libgfortran/generated/maxloc1_16_i16.c | 7 +- libgfortran/generated/maxloc1_16_i2.c | 7 +- libgfortran/generated/maxloc1_16_i4.c | 7 +- libgfortran/generated/maxloc1_16_i8.c | 7 +- libgfortran/generated/maxloc1_16_r10.c | 7 +- libgfortran/generated/maxloc1_16_r16.c | 7 +- libgfortran/generated/maxloc1_16_r17.c | 7 +- libgfortran/generated/maxloc1_16_r4.c | 7 +- libgfortran/generated/maxloc1_16_r8.c | 7 +- libgfortran/generated/maxloc1_16_s1.c | 7 +- libgfortran/generated/maxloc1_16_s4.c | 7 +- libgfortran/generated/maxloc1_4_i1.c | 7 +- libgfortran/generated/maxloc1_4_i16.c | 7 +- libgfortran/generated/maxloc1_4_i2.c | 7 +- libgfortran/generated/maxloc1_4_i4.c | 7 +- libgfortran/generated/maxloc1_4_i8.c | 7 +- libgfortran/generated/maxloc1_4_r10.c | 7 +- libgfortran/generated/maxloc1_4_r16.c | 7 +- libgfortran/generated/maxloc1_4_r17.c | 7 +- libgfortran/generated/maxloc1_4_r4.c | 7 +- libgfortran/generated/maxloc1_4_r8.c | 7 +- libgfortran/generated/maxloc1_4_s1.c | 7 +- libgfortran/generated/maxloc1_4_s4.c | 7 +- libgfortran/generated/maxloc1_8_i1.c | 7 +- libgfortran/generated/maxloc1_8_i16.c | 7 +- libgfortran/generated/maxloc1_8_i2.c | 7 +- libgfortran/generated/maxloc1_8_i4.c | 7 +- libgfortran/generated/maxloc1_8_i8.c | 7 +- libgfortran/generated/maxloc1_8_r10.c | 7 +- libgfortran/generated/maxloc1_8_r16.c | 7 +- libgfortran/generated/maxloc1_8_r17.c | 7 +- libgfortran/generated/maxloc1_8_r4.c | 7 +- libgfortran/generated/maxloc1_8_r8.c | 7 +- libgfortran/generated/maxloc1_8_s1.c | 7 +- libgfortran/generated/maxloc1_8_s4.c | 7 +- libgfortran/generated/maxval1_s1.c | 7 +- libgfortran/generated/maxval1_s4.c | 7 +- libgfortran/generated/maxval_i1.c | 7 +- libgfortran/generated/maxval_i16.c | 7 +- libgfortran/generated/maxval_i2.c | 7 +- libgfortran/generated/maxval_i4.c | 7 +- libgfortran/generated/maxval_i8.c | 7 +- libgfortran/generated/maxval_r10.c | 7 +- libgfortran/generated/maxval_r16.c | 7 +- libgfortran/generated/maxval_r17.c | 7 +- libgfortran/generated/maxval_r4.c | 7 +- libgfortran/generated/maxval_r8.c | 7 +- libgfortran/generated/minloc1_16_i1.c | 7 +- libgfortran/generated/minloc1_16_i16.c | 7 +- libgfortran/generated/minloc1_16_i2.c | 7 +- libgfortran/generated/minloc1_16_i4.c | 7 +- libgfortran/generated/minloc1_16_i8.c | 7 +- libgfortran/generated/minloc1_16_r10.c | 7 +- libgfortran/generated/minloc1_16_r16.c | 7 +- libgfortran/generated/minloc1_16_r17.c | 7 +- libgfortran/generated/minloc1_16_r4.c | 7 +- libgfortran/generated/minloc1_16_r8.c | 7 +- libgfortran/generated/minloc1_16_s1.c | 7 +- libgfortran/generated/minloc1_16_s4.c | 7 +- libgfortran/generated/minloc1_4_i1.c | 7 +- libgfortran/generated/minloc1_4_i16.c | 7 +- libgfortran/generated/minloc1_4_i2.c | 7 +- libgfortran/generated/minloc1_4_i4.c | 7 +- libgfortran/generated/minloc1_4_i8.c | 7 +- libgfortran/generated/minloc1_4_r10.c | 7 +- libgfortran/generated/minloc1_4_r16.c | 7 +- libgfortran/generated/minloc1_4_r17.c | 7 +- libgfortran/generated/minloc1_4_r4.c | 7 +- libgfortran/generated/minloc1_4_r8.c | 7 +- libgfortran/generated/minloc1_4_s1.c | 7 +- libgfortran/generated/minloc1_4_s4.c | 7 +- libgfortran/generated/minloc1_8_i1.c | 7 +- libgfortran/generated/minloc1_8_i16.c | 7 +- libgfortran/generated/minloc1_8_i2.c | 7 +- libgfortran/generated/minloc1_8_i4.c | 7 +- libgfortran/generated/minloc1_8_i8.c | 7 +- libgfortran/generated/minloc1_8_r10.c | 7 +- libgfortran/generated/minloc1_8_r16.c | 7 +- libgfortran/generated/minloc1_8_r17.c | 7 +- libgfortran/generated/minloc1_8_r4.c | 7 +- libgfortran/generated/minloc1_8_r8.c | 7 +- libgfortran/generated/minloc1_8_s1.c | 7 +- libgfortran/generated/minloc1_8_s4.c | 7 +- libgfortran/generated/minval1_s1.c | 7 +- libgfortran/generated/minval1_s4.c | 7 +- libgfortran/generated/minval_i1.c | 7 +- libgfortran/generated/minval_i16.c | 7 +- libgfortran/generated/minval_i2.c | 7 +- libgfortran/generated/minval_i4.c | 7 +- libgfortran/generated/minval_i8.c | 7 +- libgfortran/generated/minval_r10.c | 7 +- libgfortran/generated/minval_r16.c | 7 +- libgfortran/generated/minval_r17.c | 7 +- libgfortran/generated/minval_r4.c | 7 +- libgfortran/generated/minval_r8.c | 7 +- libgfortran/generated/product_c10.c | 7 +- libgfortran/generated/product_c16.c | 7 +- libgfortran/generated/product_c17.c | 7 +- libgfortran/generated/product_c4.c | 7 +- libgfortran/generated/product_c8.c | 7 +- libgfortran/generated/product_i1.c | 7 +- libgfortran/generated/product_i16.c | 7 +- libgfortran/generated/product_i2.c | 7 +- libgfortran/generated/product_i4.c | 7 +- libgfortran/generated/product_i8.c | 7 +- libgfortran/generated/product_r10.c | 7 +- libgfortran/generated/product_r16.c | 7 +- libgfortran/generated/product_r17.c | 7 +- libgfortran/generated/product_r4.c | 7 +- libgfortran/generated/product_r8.c | 7 +- libgfortran/generated/sum_c10.c | 7 +- libgfortran/generated/sum_c16.c | 7 +- libgfortran/generated/sum_c17.c | 7 +- libgfortran/generated/sum_c4.c | 7 +- libgfortran/generated/sum_c8.c | 7 +- libgfortran/generated/sum_i1.c | 7 +- libgfortran/generated/sum_i16.c | 7 +- libgfortran/generated/sum_i2.c | 7 +- libgfortran/generated/sum_i4.c | 7 +- libgfortran/generated/sum_i8.c | 7 +- libgfortran/generated/sum_r10.c | 7 +- libgfortran/generated/sum_r16.c | 7 +- libgfortran/generated/sum_r17.c | 7 +- libgfortran/generated/sum_r4.c | 7 +- libgfortran/generated/sum_r8.c | 7 +- libgfortran/m4/ifunction-s.m4 | 7 +- libgfortran/m4/ifunction-s2.m4 | 7 +- libgfortran/m4/ifunction.m4 | 7 +- libgfortran/m4/ifunction_logical.m4 | 3 +- 161 files changed, 499 insertions(+), 752 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/allocated_4.f90 diff --git a/gcc/testsuite/gfortran.dg/allocated_4.f90 b/gcc/testsuite/gfortran.dg/allocated_4.f90 new file mode 100644 index 00000000000..485806be287 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/allocated_4.f90 @@ -0,0 +1,195 @@ +! { dg-do run } +! +! PR fortran/112412 +! The library used to not allocate memory for the result of transformational +! functions reducing an array along one dimension, if the result of the +! function was an empty array. This caused the result to be seen as +! an unallocated array. + +program p + implicit none + call check_iparity + call check_sum + call check_minloc_int + call check_minloc_char + call check_maxloc_char4 + call check_minval_char + call check_maxval_char4 + call check_any + call check_count4 +contains + subroutine check_iparity + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = iparity(a, dim=i) + if (.not. allocated(r)) stop 11 + deallocate(r) + i = 2 + r = iparity(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 12 + deallocate(r) + i = 4 + r = iparity(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 13 + deallocate(r) + end subroutine + subroutine check_sum + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 2 + r = sum(a, dim=i) + if (.not. allocated(r)) stop 21 + deallocate(r) + i = 4 + r = sum(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 22 + deallocate(r) + i = 1 + r = sum(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 23 + deallocate(r) + end subroutine + subroutine check_minloc_int + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 4 + r = minloc(a, dim=i) + if (.not. allocated(r)) stop 31 + deallocate(r) + i = 1 + r = minloc(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 32 + deallocate(r) + i = 2 + r = minloc(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 33 + deallocate(r) + end subroutine + subroutine check_minloc_char + character :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ character:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 4 + r = minloc(a, dim=i) + if (.not. allocated(r)) stop 41 + deallocate(r) + i = 2 + r = minloc(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 42 + deallocate(r) + i = 1 + r = minloc(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 43 + deallocate(r) + end subroutine + subroutine check_maxloc_char4 + character(kind=4) :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ character(kind=4):: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = maxloc(a, dim=i) + if (.not. allocated(r)) stop 51 + deallocate(r) + i = 4 + r = maxloc(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 52 + deallocate(r) + i = 2 + r = maxloc(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 53 + deallocate(r) + end subroutine + subroutine check_minval_char + character :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + character, allocatable :: r(:,:,:) + a = reshape((/ character:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 2 + r = minval(a, dim=i) + if (.not. allocated(r)) stop 61 + deallocate(r) + i = 1 + r = minval(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 62 + deallocate(r) + i = 4 + r = minval(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 63 + deallocate(r) + end subroutine + subroutine check_maxval_char4 + character(kind=4) :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + character(kind=4), allocatable :: r(:,:,:) + a = reshape((/ character(kind=4):: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = maxval(a, dim=i) + if (.not. allocated(r)) stop 71 + deallocate(r) + i = 2 + r = maxval(a, dim=i, mask=m1) + if (.not. allocated(r)) stop 72 + deallocate(r) + i = 4 + r = maxval(a, dim=i, mask=m4) + if (.not. allocated(r)) stop 73 + deallocate(r) + end subroutine + subroutine check_any + logical :: a(9,3,0,7) + integer :: i + logical, allocatable :: r(:,:,:) + a = reshape((/ logical:: /), shape(a)) + i = 2 + r = any(a, dim=i) + if (.not. allocated(r)) stop 81 + deallocate(r) + end subroutine + subroutine check_count4 + logical(kind=4) :: a(9,3,0,7) + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ logical(kind=4):: /), shape(a)) + i = 4 + r = count(a, dim=i) + if (.not. allocated(r)) stop 91 + deallocate(r) + end subroutine +end program diff --git a/libgfortran/generated/all_l1.c b/libgfortran/generated/all_l1.c index afe94491b42..e4942811461 100644 --- a/libgfortran/generated/all_l1.c +++ b/libgfortran/generated/all_l1.c @@ -101,14 +101,13 @@ all_l1 (gfc_array_l1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); } else { diff --git a/libgfortran/generated/all_l16.c b/libgfortran/generated/all_l16.c index 3b04889f920..1fc45bfd97c 100644 --- a/libgfortran/generated/all_l16.c +++ b/libgfortran/generated/all_l16.c @@ -101,14 +101,13 @@ all_l16 (gfc_array_l16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); } else { diff --git a/libgfortran/generated/all_l2.c b/libgfortran/generated/all_l2.c index 5ce9027d6f5..f6dbf1c456d 100644 --- a/libgfortran/generated/all_l2.c +++ b/libgfortran/generated/all_l2.c @@ -101,14 +101,13 @@ all_l2 (gfc_array_l2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); } else { diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c index e004d1f6783..7f915ef9c61 100644 --- a/libgfortran/generated/all_l4.c +++ b/libgfortran/generated/all_l4.c @@ -101,14 +101,13 @@ all_l4 (gfc_array_l4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); } else { diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c index 7ae7392d4bf..3fa8147c1a1 100644 --- a/libgfortran/generated/all_l8.c +++ b/libgfortran/generated/all_l8.c @@ -101,14 +101,13 @@ all_l8 (gfc_array_l8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); } else { diff --git a/libgfortran/generated/any_l1.c b/libgfortran/generated/any_l1.c index f3269c6c920..236e4100ec2 100644 --- a/libgfortran/generated/any_l1.c +++ b/libgfortran/generated/any_l1.c @@ -101,14 +101,13 @@ any_l1 (gfc_array_l1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); } else { diff --git a/libgfortran/generated/any_l16.c b/libgfortran/generated/any_l16.c index d27f496e93c..7290d66667e 100644 --- a/libgfortran/generated/any_l16.c +++ b/libgfortran/generated/any_l16.c @@ -101,14 +101,13 @@ any_l16 (gfc_array_l16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); } else { diff --git a/libgfortran/generated/any_l2.c b/libgfortran/generated/any_l2.c index bac6837f515..d54e78fda0c 100644 --- a/libgfortran/generated/any_l2.c +++ b/libgfortran/generated/any_l2.c @@ -101,14 +101,13 @@ any_l2 (gfc_array_l2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); } else { diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c index f489091774d..a577bc58213 100644 --- a/libgfortran/generated/any_l4.c +++ b/libgfortran/generated/any_l4.c @@ -101,14 +101,13 @@ any_l4 (gfc_array_l4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); } else { diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c index a22923c0c61..0af302746f5 100644 --- a/libgfortran/generated/any_l8.c +++ b/libgfortran/generated/any_l8.c @@ -101,14 +101,13 @@ any_l8 (gfc_array_l8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); } else { diff --git a/libgfortran/generated/count_16_l.c b/libgfortran/generated/count_16_l.c index 545ce6537bf..89f4f753d1a 100644 --- a/libgfortran/generated/count_16_l.c +++ b/libgfortran/generated/count_16_l.c @@ -101,14 +101,13 @@ count_16_l (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/count_1_l.c b/libgfortran/generated/count_1_l.c index fd95964534f..05b8b898e94 100644 --- a/libgfortran/generated/count_1_l.c +++ b/libgfortran/generated/count_1_l.c @@ -101,14 +101,13 @@ count_1_l (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/count_2_l.c b/libgfortran/generated/count_2_l.c index 63512580e61..654b21589d0 100644 --- a/libgfortran/generated/count_2_l.c +++ b/libgfortran/generated/count_2_l.c @@ -101,14 +101,13 @@ count_2_l (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/count_4_l.c b/libgfortran/generated/count_4_l.c index 44e7d68b2a4..8f40ea1c0be 100644 --- a/libgfortran/generated/count_4_l.c +++ b/libgfortran/generated/count_4_l.c @@ -101,14 +101,13 @@ count_4_l (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/count_8_l.c b/libgfortran/generated/count_8_l.c index 4f4d82b5d62..ab64c085803 100644 --- a/libgfortran/generated/count_8_l.c +++ b/libgfortran/generated/count_8_l.c @@ -101,14 +101,13 @@ count_8_l (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index 4af96269308..c9696c92485 100644 --- a/libgfortran/generated/iall_i1.c +++ b/libgfortran/generated/iall_i1.c @@ -301,15 +301,13 @@ miall_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -466,14 +464,13 @@ siall_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/iall_i16.c b/libgfortran/generated/iall_i16.c index e678d06d1b8..f0a1b3adcf2 100644 --- a/libgfortran/generated/iall_i16.c +++ b/libgfortran/generated/iall_i16.c @@ -301,15 +301,13 @@ miall_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -466,14 +464,13 @@ siall_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/iall_i2.c b/libgfortran/generated/iall_i2.c index fbe52663f16..4d14d71cab2 100644 --- a/libgfortran/generated/iall_i2.c +++ b/libgfortran/generated/iall_i2.c @@ -301,15 +301,13 @@ miall_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -466,14 +464,13 @@ siall_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/iall_i4.c b/libgfortran/generated/iall_i4.c index 3d6b6deba3d..cb7ce755bfc 100644 --- a/libgfortran/generated/iall_i4.c +++ b/libgfortran/generated/iall_i4.c @@ -301,15 +301,13 @@ miall_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -466,14 +464,13 @@ siall_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/iall_i8.c b/libgfortran/generated/iall_i8.c index 072f6837029..c7dab3e2e56 100644 --- a/libgfortran/generated/iall_i8.c +++ b/libgfortran/generated/iall_i8.c @@ -301,15 +301,13 @@ miall_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -466,14 +464,13 @@ siall_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/iany_i1.c b/libgfortran/generated/iany_i1.c index 6f03df6efd2..539c5389561 100644 --- a/libgfortran/generated/iany_i1.c +++ b/libgfortran/generated/iany_i1.c @@ -301,15 +301,13 @@ miany_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -466,14 +464,13 @@ siany_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/iany_i16.c b/libgfortran/generated/iany_i16.c index 72a7add660b..d690dff60be 100644 --- a/libgfortran/generated/iany_i16.c +++ b/libgfortran/generated/iany_i16.c @@ -301,15 +301,13 @@ miany_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -466,14 +464,13 @@ siany_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/iany_i2.c b/libgfortran/generated/iany_i2.c index 26858b42916..dd37c1e5b48 100644 --- a/libgfortran/generated/iany_i2.c +++ b/libgfortran/generated/iany_i2.c @@ -301,15 +301,13 @@ miany_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -466,14 +464,13 @@ siany_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/iany_i4.c b/libgfortran/generated/iany_i4.c index ca315d1223c..e9689904951 100644 --- a/libgfortran/generated/iany_i4.c +++ b/libgfortran/generated/iany_i4.c @@ -301,15 +301,13 @@ miany_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -466,14 +464,13 @@ siany_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/iany_i8.c b/libgfortran/generated/iany_i8.c index dc9081e5149..79f6c381a3f 100644 --- a/libgfortran/generated/iany_i8.c +++ b/libgfortran/generated/iany_i8.c @@ -301,15 +301,13 @@ miany_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -466,14 +464,13 @@ siany_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/iparity_i1.c b/libgfortran/generated/iparity_i1.c index cfb2e481831..8e0f4529d4d 100644 --- a/libgfortran/generated/iparity_i1.c +++ b/libgfortran/generated/iparity_i1.c @@ -301,15 +301,13 @@ miparity_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -466,14 +464,13 @@ siparity_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/iparity_i16.c b/libgfortran/generated/iparity_i16.c index 3b1f3232327..912ca591dda 100644 --- a/libgfortran/generated/iparity_i16.c +++ b/libgfortran/generated/iparity_i16.c @@ -301,15 +301,13 @@ miparity_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -466,14 +464,13 @@ siparity_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/iparity_i2.c b/libgfortran/generated/iparity_i2.c index 60575bdcb15..6e7e60a5a2e 100644 --- a/libgfortran/generated/iparity_i2.c +++ b/libgfortran/generated/iparity_i2.c @@ -301,15 +301,13 @@ miparity_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -466,14 +464,13 @@ siparity_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/iparity_i4.c b/libgfortran/generated/iparity_i4.c index 49f65145e15..0bb1be1dedb 100644 --- a/libgfortran/generated/iparity_i4.c +++ b/libgfortran/generated/iparity_i4.c @@ -301,15 +301,13 @@ miparity_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -466,14 +464,13 @@ siparity_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/iparity_i8.c b/libgfortran/generated/iparity_i8.c index ec68d514a48..e219d6e3dce 100644 --- a/libgfortran/generated/iparity_i8.c +++ b/libgfortran/generated/iparity_i8.c @@ -301,15 +301,13 @@ miparity_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -466,14 +464,13 @@ siparity_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_16_i1.c b/libgfortran/generated/maxloc1_16_i1.c index dd86eb22d95..e126c18bc80 100644 --- a/libgfortran/generated/maxloc1_16_i1.c +++ b/libgfortran/generated/maxloc1_16_i1.c @@ -329,15 +329,13 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index f40ade40214..04ced535df9 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -329,15 +329,13 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_i2.c b/libgfortran/generated/maxloc1_16_i2.c index d857d4fe768..9f7447e9de9 100644 --- a/libgfortran/generated/maxloc1_16_i2.c +++ b/libgfortran/generated/maxloc1_16_i2.c @@ -329,15 +329,13 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index c67878b0f48..8663dfc7e24 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -329,15 +329,13 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index 6e040811301..c0593a67f11 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -329,15 +329,13 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index 47d8f7ba619..a5e0665fccf 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -329,15 +329,13 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index f5bd965205c..cbb20002665 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -329,15 +329,13 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_r17.c b/libgfortran/generated/maxloc1_16_r17.c index 8d59c196236..719ae09772d 100644 --- a/libgfortran/generated/maxloc1_16_r17.c +++ b/libgfortran/generated/maxloc1_16_r17.c @@ -329,15 +329,13 @@ mmaxloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_r17 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index 91299bdcc01..37a0657dab2 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -329,15 +329,13 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index 91e89b02a68..305613694b2 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -329,15 +329,13 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -537,14 +535,13 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index 313ee1cf440..b9a8a639596 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -322,15 +322,13 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -503,14 +501,13 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index d8da8569e15..fdaad7fd2dc 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -322,15 +322,13 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -503,14 +501,13 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxloc1_4_i1.c b/libgfortran/generated/maxloc1_4_i1.c index 333b08cec96..b68d92ef44e 100644 --- a/libgfortran/generated/maxloc1_4_i1.c +++ b/libgfortran/generated/maxloc1_4_i1.c @@ -329,15 +329,13 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index 62dadf6b66f..9221e22505b 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -329,15 +329,13 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_i2.c b/libgfortran/generated/maxloc1_4_i2.c index 6bc6e500b52..3fa2e367898 100644 --- a/libgfortran/generated/maxloc1_4_i2.c +++ b/libgfortran/generated/maxloc1_4_i2.c @@ -329,15 +329,13 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index d38fd367443..5ef2abb98e1 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -329,15 +329,13 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 30314f0f6dd..102d394b309 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -329,15 +329,13 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index 693f52aef78..623204d792c 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -329,15 +329,13 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index c24dece73f6..92209ce79ce 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -329,15 +329,13 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_r17.c b/libgfortran/generated/maxloc1_4_r17.c index a8efa10557e..6ee34b52719 100644 --- a/libgfortran/generated/maxloc1_4_r17.c +++ b/libgfortran/generated/maxloc1_4_r17.c @@ -329,15 +329,13 @@ mmaxloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_r17 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index 6957da417ab..ea6123a987c 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -329,15 +329,13 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index b7e6cf34774..ba83b4d6a6d 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -329,15 +329,13 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -537,14 +535,13 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index 904c5d4a8fa..7d2ab07915e 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -322,15 +322,13 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -503,14 +501,13 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index 5b1f7b0938d..7a4950d3e5c 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -322,15 +322,13 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -503,14 +501,13 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxloc1_8_i1.c b/libgfortran/generated/maxloc1_8_i1.c index ee478907548..d243e6e027c 100644 --- a/libgfortran/generated/maxloc1_8_i1.c +++ b/libgfortran/generated/maxloc1_8_i1.c @@ -329,15 +329,13 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 2c788a26d53..5871aa52379 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -329,15 +329,13 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_i2.c b/libgfortran/generated/maxloc1_8_i2.c index 13474427323..9337f47c9ca 100644 --- a/libgfortran/generated/maxloc1_8_i2.c +++ b/libgfortran/generated/maxloc1_8_i2.c @@ -329,15 +329,13 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index 57a001fefc6..747b9979fdc 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -329,15 +329,13 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index ff837e6872f..adc0ebae28d 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -329,15 +329,13 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index 9046b279c12..4c8d00d937d 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -329,15 +329,13 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index 93e83307da4..df3edbe611b 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -329,15 +329,13 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_r17.c b/libgfortran/generated/maxloc1_8_r17.c index ab14e3a7ebe..162806132f1 100644 --- a/libgfortran/generated/maxloc1_8_r17.c +++ b/libgfortran/generated/maxloc1_8_r17.c @@ -329,15 +329,13 @@ mmaxloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_r17 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index 556357b46a1..dee860a1a8f 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -329,15 +329,13 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index aceebcf7cf4..215d9668adb 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -329,15 +329,13 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -537,14 +535,13 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index 9659f7f74a6..7b1091d596c 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -322,15 +322,13 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -503,14 +501,13 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index 10302b95ade..a61c08c6f64 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -322,15 +322,13 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -503,14 +501,13 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxval1_s1.c b/libgfortran/generated/maxval1_s1.c index 605e04b4e2e..fd65f4b62ec 100644 --- a/libgfortran/generated/maxval1_s1.c +++ b/libgfortran/generated/maxval1_s1.c @@ -318,15 +318,13 @@ mmaxval1_s1 (gfc_array_s1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); - } else { @@ -496,14 +494,13 @@ smaxval1_s1 (gfc_array_s1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1] * string_len; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); } else { diff --git a/libgfortran/generated/maxval1_s4.c b/libgfortran/generated/maxval1_s4.c index 829cdf213c1..3558e61c76a 100644 --- a/libgfortran/generated/maxval1_s4.c +++ b/libgfortran/generated/maxval1_s4.c @@ -318,15 +318,13 @@ mmaxval1_s4 (gfc_array_s4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); - } else { @@ -496,14 +494,13 @@ smaxval1_s4 (gfc_array_s4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1] * string_len; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); } else { diff --git a/libgfortran/generated/maxval_i1.c b/libgfortran/generated/maxval_i1.c index 04faea82a9e..bc52cd74a95 100644 --- a/libgfortran/generated/maxval_i1.c +++ b/libgfortran/generated/maxval_i1.c @@ -315,15 +315,13 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -508,14 +506,13 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c index eaaaf7f55b3..1d9d33369d4 100644 --- a/libgfortran/generated/maxval_i16.c +++ b/libgfortran/generated/maxval_i16.c @@ -315,15 +315,13 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -508,14 +506,13 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c index 440226d2fff..fe3c6fecce7 100644 --- a/libgfortran/generated/maxval_i2.c +++ b/libgfortran/generated/maxval_i2.c @@ -315,15 +315,13 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -508,14 +506,13 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 99248447c31..0412c7a7583 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -315,15 +315,13 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -508,14 +506,13 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index cb14e74486f..2037b96b3c5 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -315,15 +315,13 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -508,14 +506,13 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c index 9fb9b0297c9..7c397eeea77 100644 --- a/libgfortran/generated/maxval_r10.c +++ b/libgfortran/generated/maxval_r10.c @@ -315,15 +315,13 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); - } else { @@ -508,14 +506,13 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); } else { diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c index b06ea6653db..1f2144e5253 100644 --- a/libgfortran/generated/maxval_r16.c +++ b/libgfortran/generated/maxval_r16.c @@ -315,15 +315,13 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); - } else { @@ -508,14 +506,13 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); } else { diff --git a/libgfortran/generated/maxval_r17.c b/libgfortran/generated/maxval_r17.c index 1ec11fff1f2..f85460366aa 100644 --- a/libgfortran/generated/maxval_r17.c +++ b/libgfortran/generated/maxval_r17.c @@ -315,15 +315,13 @@ mmaxval_r17 (gfc_array_r17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); - } else { @@ -508,14 +506,13 @@ smaxval_r17 (gfc_array_r17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); } else { diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index 8dfde41fa0c..e2fd59e92bc 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -315,15 +315,13 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); - } else { @@ -508,14 +506,13 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); } else { diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index 179a4227179..d3aadc62529 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -315,15 +315,13 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); - } else { @@ -508,14 +506,13 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); } else { diff --git a/libgfortran/generated/minloc1_16_i1.c b/libgfortran/generated/minloc1_16_i1.c index 7bca02e91de..541d71fe214 100644 --- a/libgfortran/generated/minloc1_16_i1.c +++ b/libgfortran/generated/minloc1_16_i1.c @@ -339,15 +339,13 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index 1876871f7ca..baaf02597b6 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -339,15 +339,13 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_i2.c b/libgfortran/generated/minloc1_16_i2.c index 061a7928912..e4f78b65de3 100644 --- a/libgfortran/generated/minloc1_16_i2.c +++ b/libgfortran/generated/minloc1_16_i2.c @@ -339,15 +339,13 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index 297d7c53605..c561d71319e 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -339,15 +339,13 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index d0bfb654596..ebdb68dd3c5 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -339,15 +339,13 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index 8fc8399ad43..98d3fb3879b 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -339,15 +339,13 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index 3efb7fbb9cd..ad445a42dfa 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -339,15 +339,13 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_r17.c b/libgfortran/generated/minloc1_16_r17.c index bcffa58b2a0..339d9ad9662 100644 --- a/libgfortran/generated/minloc1_16_r17.c +++ b/libgfortran/generated/minloc1_16_r17.c @@ -339,15 +339,13 @@ mminloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_r17 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index 6b25af9743f..780bcc267fd 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -339,15 +339,13 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index f3f88c35cf0..124587f5fb3 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -339,15 +339,13 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -547,14 +545,13 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index 3419055dc70..f4763dc6e64 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -322,15 +322,13 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -503,14 +501,13 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index aad2f87386f..ba0475a9ca0 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -322,15 +322,13 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -503,14 +501,13 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minloc1_4_i1.c b/libgfortran/generated/minloc1_4_i1.c index 8e2ccace944..433a25a8ef8 100644 --- a/libgfortran/generated/minloc1_4_i1.c +++ b/libgfortran/generated/minloc1_4_i1.c @@ -339,15 +339,13 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index 3236418f64e..9d2c606186b 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -339,15 +339,13 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_i2.c b/libgfortran/generated/minloc1_4_i2.c index f039cc2df88..73737011e9a 100644 --- a/libgfortran/generated/minloc1_4_i2.c +++ b/libgfortran/generated/minloc1_4_i2.c @@ -339,15 +339,13 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index 0eac1a8de9e..d18416ebcc4 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -339,15 +339,13 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index b6fc26765c2..4f7dfdfdf73 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -339,15 +339,13 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index 3245be44d42..ff5af01130d 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -339,15 +339,13 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index a0ca94a653f..2d664467df3 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -339,15 +339,13 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_r17.c b/libgfortran/generated/minloc1_4_r17.c index 56b438aea7d..711fd841d34 100644 --- a/libgfortran/generated/minloc1_4_r17.c +++ b/libgfortran/generated/minloc1_4_r17.c @@ -339,15 +339,13 @@ mminloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_r17 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 922cca690e0..0739d9bd178 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -339,15 +339,13 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index 7316d6e2663..d625195e432 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -339,15 +339,13 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -547,14 +545,13 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index da8e49a8029..13ebc76524d 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -322,15 +322,13 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -503,14 +501,13 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index ca708992ede..5c9a5900237 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -322,15 +322,13 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -503,14 +501,13 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index de8603cc1f2..fab5619979f 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -339,15 +339,13 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index 01a4e37869a..742e2ea73b2 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -339,15 +339,13 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_i2.c b/libgfortran/generated/minloc1_8_i2.c index e020bfe3b49..defef3c653c 100644 --- a/libgfortran/generated/minloc1_8_i2.c +++ b/libgfortran/generated/minloc1_8_i2.c @@ -339,15 +339,13 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index f5093f13bc0..3e696aafcac 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -339,15 +339,13 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 5b3a327abc5..9a017433ee6 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -339,15 +339,13 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index 280840f33e6..18f294f2180 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -339,15 +339,13 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index fd0ee3e6c7b..1dd45dead26 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -339,15 +339,13 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_r17.c b/libgfortran/generated/minloc1_8_r17.c index dcb3f929842..85dc6cb04fe 100644 --- a/libgfortran/generated/minloc1_8_r17.c +++ b/libgfortran/generated/minloc1_8_r17.c @@ -339,15 +339,13 @@ mminloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_r17 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index e6025482211..6d7764a5eb7 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -339,15 +339,13 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index e18185fc6fe..e17d3c881c0 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -339,15 +339,13 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -547,14 +545,13 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 6e26878fc02..0449575a5a3 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -322,15 +322,13 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -503,14 +501,13 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index 14e5c9e7395..682b89b2765 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -322,15 +322,13 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -503,14 +501,13 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minval1_s1.c b/libgfortran/generated/minval1_s1.c index 3a1cde20f93..9c577ed004c 100644 --- a/libgfortran/generated/minval1_s1.c +++ b/libgfortran/generated/minval1_s1.c @@ -318,15 +318,13 @@ mminval1_s1 (gfc_array_s1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); - } else { @@ -496,14 +494,13 @@ sminval1_s1 (gfc_array_s1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1] * string_len; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); } else { diff --git a/libgfortran/generated/minval1_s4.c b/libgfortran/generated/minval1_s4.c index 83987fd1f25..9a30bf0bfb5 100644 --- a/libgfortran/generated/minval1_s4.c +++ b/libgfortran/generated/minval1_s4.c @@ -318,15 +318,13 @@ mminval1_s4 (gfc_array_s4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); - } else { @@ -496,14 +494,13 @@ sminval1_s4 (gfc_array_s4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1] * string_len; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); } else { diff --git a/libgfortran/generated/minval_i1.c b/libgfortran/generated/minval_i1.c index 4b3d19e15f2..174161af4d4 100644 --- a/libgfortran/generated/minval_i1.c +++ b/libgfortran/generated/minval_i1.c @@ -315,15 +315,13 @@ mminval_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -508,14 +506,13 @@ sminval_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c index de746524499..b220391e4f8 100644 --- a/libgfortran/generated/minval_i16.c +++ b/libgfortran/generated/minval_i16.c @@ -315,15 +315,13 @@ mminval_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -508,14 +506,13 @@ sminval_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/minval_i2.c b/libgfortran/generated/minval_i2.c index 8bcaeb7b866..3a050c1eb82 100644 --- a/libgfortran/generated/minval_i2.c +++ b/libgfortran/generated/minval_i2.c @@ -315,15 +315,13 @@ mminval_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -508,14 +506,13 @@ sminval_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index a45aaae0bc6..194967d2f92 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -315,15 +315,13 @@ mminval_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -508,14 +506,13 @@ sminval_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index 481b5d093d2..07acc60d4a0 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -315,15 +315,13 @@ mminval_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -508,14 +506,13 @@ sminval_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c index e0f7c78a2af..d49244c1dff 100644 --- a/libgfortran/generated/minval_r10.c +++ b/libgfortran/generated/minval_r10.c @@ -315,15 +315,13 @@ mminval_r10 (gfc_array_r10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); - } else { @@ -508,14 +506,13 @@ sminval_r10 (gfc_array_r10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); } else { diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c index 41feafb17db..50305430d60 100644 --- a/libgfortran/generated/minval_r16.c +++ b/libgfortran/generated/minval_r16.c @@ -315,15 +315,13 @@ mminval_r16 (gfc_array_r16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); - } else { @@ -508,14 +506,13 @@ sminval_r16 (gfc_array_r16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); } else { diff --git a/libgfortran/generated/minval_r17.c b/libgfortran/generated/minval_r17.c index d928240bf1a..2479a864af3 100644 --- a/libgfortran/generated/minval_r17.c +++ b/libgfortran/generated/minval_r17.c @@ -315,15 +315,13 @@ mminval_r17 (gfc_array_r17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); - } else { @@ -508,14 +506,13 @@ sminval_r17 (gfc_array_r17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); } else { diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index 7d16b6f5c93..ceca490cfcd 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -315,15 +315,13 @@ mminval_r4 (gfc_array_r4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); - } else { @@ -508,14 +506,13 @@ sminval_r4 (gfc_array_r4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); } else { diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 7a2cb031115..091cb74d30d 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -315,15 +315,13 @@ mminval_r8 (gfc_array_r8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); - } else { @@ -508,14 +506,13 @@ sminval_r8 (gfc_array_r8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); } else { diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c index 992313feabe..b888769130d 100644 --- a/libgfortran/generated/product_c10.c +++ b/libgfortran/generated/product_c10.c @@ -301,15 +301,13 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); - } else { @@ -466,14 +464,13 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); } else { diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c index 468c6aa86de..b783367ff05 100644 --- a/libgfortran/generated/product_c16.c +++ b/libgfortran/generated/product_c16.c @@ -301,15 +301,13 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); - } else { @@ -466,14 +464,13 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); } else { diff --git a/libgfortran/generated/product_c17.c b/libgfortran/generated/product_c17.c index e7221738b59..e89e9eea0c3 100644 --- a/libgfortran/generated/product_c17.c +++ b/libgfortran/generated/product_c17.c @@ -301,15 +301,13 @@ mproduct_c17 (gfc_array_c17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); - } else { @@ -466,14 +464,13 @@ sproduct_c17 (gfc_array_c17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); } else { diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index 57875ad2984..08b2878930b 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -301,15 +301,13 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); - } else { @@ -466,14 +464,13 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); } else { diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index fb8a2574542..cb721e50b65 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -301,15 +301,13 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); - } else { @@ -466,14 +464,13 @@ sproduct_c8 (gfc_array_c8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); } else { diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c index ed13fcf37e4..8af7d63c654 100644 --- a/libgfortran/generated/product_i1.c +++ b/libgfortran/generated/product_i1.c @@ -301,15 +301,13 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -466,14 +464,13 @@ sproduct_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c index 53544bea8f0..de9b7fb503a 100644 --- a/libgfortran/generated/product_i16.c +++ b/libgfortran/generated/product_i16.c @@ -301,15 +301,13 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -466,14 +464,13 @@ sproduct_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c index aef0fc47d4f..bb0283286c1 100644 --- a/libgfortran/generated/product_i2.c +++ b/libgfortran/generated/product_i2.c @@ -301,15 +301,13 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -466,14 +464,13 @@ sproduct_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index 16c6f6e10ae..9491031c3a8 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -301,15 +301,13 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -466,14 +464,13 @@ sproduct_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index 66f581f4b2d..49d09318335 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -301,15 +301,13 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -466,14 +464,13 @@ sproduct_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c index 8c79ff88a6f..47af031fe90 100644 --- a/libgfortran/generated/product_r10.c +++ b/libgfortran/generated/product_r10.c @@ -301,15 +301,13 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); - } else { @@ -466,14 +464,13 @@ sproduct_r10 (gfc_array_r10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); } else { diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c index 0f5027be42f..3ecafc170e3 100644 --- a/libgfortran/generated/product_r16.c +++ b/libgfortran/generated/product_r16.c @@ -301,15 +301,13 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); - } else { @@ -466,14 +464,13 @@ sproduct_r16 (gfc_array_r16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); } else { diff --git a/libgfortran/generated/product_r17.c b/libgfortran/generated/product_r17.c index 37134cbb089..8f79c8c9c65 100644 --- a/libgfortran/generated/product_r17.c +++ b/libgfortran/generated/product_r17.c @@ -301,15 +301,13 @@ mproduct_r17 (gfc_array_r17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); - } else { @@ -466,14 +464,13 @@ sproduct_r17 (gfc_array_r17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); } else { diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index 9a8eefb5124..f9b09b3c6dc 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -301,15 +301,13 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); - } else { @@ -466,14 +464,13 @@ sproduct_r4 (gfc_array_r4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); } else { diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index 5112b90f5f2..ff6aa522176 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -301,15 +301,13 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); - } else { @@ -466,14 +464,13 @@ sproduct_r8 (gfc_array_r8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); } else { diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c index d6a5db64fca..45018f88c6f 100644 --- a/libgfortran/generated/sum_c10.c +++ b/libgfortran/generated/sum_c10.c @@ -301,15 +301,13 @@ msum_c10 (gfc_array_c10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); - } else { @@ -466,14 +464,13 @@ ssum_c10 (gfc_array_c10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); } else { diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c index 156382d2f33..df4297c5a84 100644 --- a/libgfortran/generated/sum_c16.c +++ b/libgfortran/generated/sum_c16.c @@ -301,15 +301,13 @@ msum_c16 (gfc_array_c16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); - } else { @@ -466,14 +464,13 @@ ssum_c16 (gfc_array_c16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); } else { diff --git a/libgfortran/generated/sum_c17.c b/libgfortran/generated/sum_c17.c index c00b0b84d5d..65322e78989 100644 --- a/libgfortran/generated/sum_c17.c +++ b/libgfortran/generated/sum_c17.c @@ -301,15 +301,13 @@ msum_c17 (gfc_array_c17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); - } else { @@ -466,14 +464,13 @@ ssum_c17 (gfc_array_c17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); } else { diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index b750a91f940..11ce95d53c3 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -301,15 +301,13 @@ msum_c4 (gfc_array_c4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); - } else { @@ -466,14 +464,13 @@ ssum_c4 (gfc_array_c4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); } else { diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 19b03c07504..16b9ed40e92 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -301,15 +301,13 @@ msum_c8 (gfc_array_c8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); - } else { @@ -466,14 +464,13 @@ ssum_c8 (gfc_array_c8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); } else { diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c index 2df0ec11a87..c2df9619f98 100644 --- a/libgfortran/generated/sum_i1.c +++ b/libgfortran/generated/sum_i1.c @@ -301,15 +301,13 @@ msum_i1 (gfc_array_i1 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); - } else { @@ -466,14 +464,13 @@ ssum_i1 (gfc_array_i1 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); } else { diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c index 0b7179b595d..d4b3d970e51 100644 --- a/libgfortran/generated/sum_i16.c +++ b/libgfortran/generated/sum_i16.c @@ -301,15 +301,13 @@ msum_i16 (gfc_array_i16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); - } else { @@ -466,14 +464,13 @@ ssum_i16 (gfc_array_i16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); } else { diff --git a/libgfortran/generated/sum_i2.c b/libgfortran/generated/sum_i2.c index 3149e5fe5e5..044361c6167 100644 --- a/libgfortran/generated/sum_i2.c +++ b/libgfortran/generated/sum_i2.c @@ -301,15 +301,13 @@ msum_i2 (gfc_array_i2 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); - } else { @@ -466,14 +464,13 @@ ssum_i2 (gfc_array_i2 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); } else { diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index 5cf5f95bf0f..b37393e4c70 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -301,15 +301,13 @@ msum_i4 (gfc_array_i4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); - } else { @@ -466,14 +464,13 @@ ssum_i4 (gfc_array_i4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); } else { diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index a020ba63349..235a98e5fb7 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -301,15 +301,13 @@ msum_i8 (gfc_array_i8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); - } else { @@ -466,14 +464,13 @@ ssum_i8 (gfc_array_i8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); } else { diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c index f02f9816b7d..4e2071fa570 100644 --- a/libgfortran/generated/sum_r10.c +++ b/libgfortran/generated/sum_r10.c @@ -301,15 +301,13 @@ msum_r10 (gfc_array_r10 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); - } else { @@ -466,14 +464,13 @@ ssum_r10 (gfc_array_r10 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); } else { diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c index 43439ef385c..47571d9b010 100644 --- a/libgfortran/generated/sum_r16.c +++ b/libgfortran/generated/sum_r16.c @@ -301,15 +301,13 @@ msum_r16 (gfc_array_r16 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); - } else { @@ -466,14 +464,13 @@ ssum_r16 (gfc_array_r16 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); } else { diff --git a/libgfortran/generated/sum_r17.c b/libgfortran/generated/sum_r17.c index 97af0d73a77..d479f200a80 100644 --- a/libgfortran/generated/sum_r17.c +++ b/libgfortran/generated/sum_r17.c @@ -301,15 +301,13 @@ msum_r17 (gfc_array_r17 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); - } else { @@ -466,14 +464,13 @@ ssum_r17 (gfc_array_r17 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); } else { diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index 5a4e06a5545..227ea34124f 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -301,15 +301,13 @@ msum_r4 (gfc_array_r4 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); - } else { @@ -466,14 +464,13 @@ ssum_r4 (gfc_array_r4 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); } else { diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index 00f7cdba540..d0d0c111d4c 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -301,15 +301,13 @@ msum_r8 (gfc_array_r8 * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); - } else { @@ -466,14 +464,13 @@ ssum_r8 (gfc_array_r8 * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); } else { diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index 16615aa290f..bc5ce55e81c 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -303,15 +303,13 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); - } else { @@ -467,14 +465,13 @@ s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); } else { diff --git a/libgfortran/m4/ifunction-s2.m4 b/libgfortran/m4/ifunction-s2.m4 index 4d31c208e05..22ba00899d7 100644 --- a/libgfortran/m4/ifunction-s2.m4 +++ b/libgfortran/m4/ifunction-s2.m4 @@ -304,15 +304,13 @@ void retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); - } else { @@ -468,14 +466,13 @@ void alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1] * string_len; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); } else { diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index c64217ec5db..c80aa86c890 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -291,15 +291,13 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->offset = 0; retarray->dtype.rank = rank; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); - } else { @@ -455,14 +453,13 @@ void alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); } else { diff --git a/libgfortran/m4/ifunction_logical.m4 b/libgfortran/m4/ifunction_logical.m4 index 0568387e343..cb576f3472e 100644 --- a/libgfortran/m4/ifunction_logical.m4 +++ b/libgfortran/m4/ifunction_logical.m4 @@ -91,14 +91,13 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]; + retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) { /* Make sure we have a zero-sized array. */ GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); return; } - else - retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); } else { From patchwork Tue Nov 7 10:24:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 162437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp181294vqo; Tue, 7 Nov 2023 04:00:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtoMV9nkV1RA5B/w0PCiqr7TWEjkVxznDahrG48NJZfjwxmysOGCT/Oi0v1OscgE3b03/+ X-Received: by 2002:a05:622a:2ca:b0:41e:ae5a:2b96 with SMTP id a10-20020a05622a02ca00b0041eae5a2b96mr9871112qtx.13.1699358439997; Tue, 07 Nov 2023 04:00:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699358439; cv=pass; d=google.com; s=arc-20160816; b=UQT6ZmNkFI8b+mrCEw0r0XvxrJn/pco+Zr/lEhEbPH68KZrPtHpazUFyjHgThoXUKU ZiYB6gfxwQ4T73D7ilEoiQv08TyGMeEl8BwK8Vyq2VpFaWMub1aEe8kKMR4CnQ08MimP 6DR7ngHuxsmxXexY5NsqCsStSJAZ0gEThtntw15DO8ddE9xPI2yL/GCGuKAT6+rovLBy uvMr0MYWHbw4bNsOluM1Ehv3ICr4ZP5FzZkcIQTSB2SteNfiKVloTBTGg9lrvkTCo1WU ISNbn0QUMhTqv2xhs/yzQUfcCpn9Q8T85umjLNDbGoex/+RkVz/Xkbn8gjShHMmf80/a nvTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=jcKbOWZcIYKUgSVtR//5mrtbLgTMjPGA9BwQlzWDtdI=; fh=zSP9Z/xOHj5SuUPPVSStTox2VGm+p0Uo644NtF/AZic=; b=FwGcmKxY63qxMqat2VwlWs+hm5AIVjn5rARij5RMVdv9EeODykeYeNPMVM8ll0Ir0z RIr2Y3Fyjwu87b5WeTYTWq/WfSg8DADKQ7+4z5F/V62/9GoxLydOITchdRjEOQKeuMFs yr9pkKbzhWabPqh0ViNN99jvburivZmAmKNZNZuobi0sSg8eglsmUhcYwRpUtBMrG46y etrJw+WBZkTx8IETvYc2yqRHrDhEfl4gx6rzUFOC6nVjf4jAJVtQa3ziGIXddlidkooZ uIG0Aiw4yUtgkoBEMS4xfxd45l9GKQ4DXuqiYE3awuK9whIbRuZvOOPG9JRop6QPokFj oLsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=M5ugpD1t; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ZO2PNqXk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e21-20020ac84e55000000b004180387dcc0si6676688qtw.605.2023.11.07.04.00.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 04:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=M5ugpD1t; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=ZO2PNqXk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AD8E388204F for ; Tue, 7 Nov 2023 10:25:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6AD8E388204F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699352719; bh=jcKbOWZcIYKUgSVtR//5mrtbLgTMjPGA9BwQlzWDtdI=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=M5ugpD1tO08QG/soX+oLATk+wFgiBQlb3bOtHohoQcz8NcM9zYg3SHsI1thrn0dmQ 79UCA+ij5SmzOXrlFGjv3wmH+p/ikjPLE+DDUGg4bwnkEHl3aaRgce7P9cLHdpXBv0 vGRXsElMLpdQ+nUGtOpwI1WeqD2Hi9kX3DSCsvrg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.smtpout.orange.fr (smtp-29.smtpout.orange.fr [80.12.242.29]) by sourceware.org (Postfix) with ESMTPS id 5D886386545A for ; Tue, 7 Nov 2023 10:24:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D886386545A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gcc.gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5D886386545A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352659; cv=none; b=H39HtNH4mwKl2FWW/2qwinA2tCz11oM8v2vJbFTuKvnMsDn3XOZiKeTUsyCXbrDt6IN1sHbJmR+kfU8V9Si006FBDjNx18tqN3gJoGVyizqo7INGAjpWGbV8jtDaoZgVrc7OsEytpoU1Vbny+Ot1Pjz87uMzpUlyPdh/0jEmJPU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352659; c=relaxed/simple; bh=kHpbUZ+mT32cUYvlVacNt08M8O4IviTLwUs5WH8axfs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lET5zVmrpUsf3GRXZcv7vKrpH2ra3pKpxTBWd6KbGC4Z9qy2YMTSm0xIJfM0KgKnpCRU1l1j8NCl76nYZJ0pBlmwhf/0nDNnFNo911uaAdd1xpEODC+/yRctPHmVS5E3A2PuYFSLlfk81M8fNqiXbrpolikWWi8+bz6TE//i8Zs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from cyrano.home ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 0JFcrynXNF6ta0JFjrgDCw; Tue, 07 Nov 2023 11:24:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1699352651; bh=jcKbOWZcIYKUgSVtR//5mrtbLgTMjPGA9BwQlzWDtdI=; h=From:To:Subject:Date:In-Reply-To:References; b=ZO2PNqXkxuIn4qB4GaHGjfTfrqFm+K3oKlWAsajZUNQbQRH4cxS9JvFwHNgY0W/iR 5CmyP4Mn+pyzAsb2veJUk9orIzA1/YSLvQ/zWxh5G3Te5TF5+RVoQO5f4ZAe4dKfT+ lgd7NIn49rX03dra4qbxKsOtl+Dxfvn/9il7zAS09Y05LcmrdkPP+TXFlchTS+8arM BMpdOVzXqGag0nsesXlGKgKlcmaZwS6OPHhdc5vV3xjn2SyOYFtZ/+zD5xp7ambOxu N2mFjZWSrc6fc9eQWL7d+taQOPsRGzcsPbEZKj0gWuy6WlTRCHybSRh4869jAiQjE4 ZwOm+df7kJcJA== X-ME-Helo: cyrano.home X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Tue, 07 Nov 2023 11:24:11 +0100 X-ME-IP: 86.215.161.51 From: Mikael Morin To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH v2 2/3] libgfortran: Remove early return if extent is zero [PR112371] Date: Tue, 7 Nov 2023 11:24:03 +0100 Message-ID: <20231107102404.1723120-3-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107102404.1723120-1-mikael@gcc.gnu.org> References: <20231107102404.1723120-1-mikael@gcc.gnu.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781906475926745044 X-GMAIL-MSGID: 1781906475926745044 Remove the early return present in function templates for transformational functions doing a (masked) reduction of an array along a dimension. This early return, which triggered if the extent in the reduction dimension was zero, was wrong because even if the reduction operation degenerates to a constant value in that case, one has to loop anyway along the other dimensions to initialize every element of the resulting array with that constant value. The case of negative extent (not sure whether it may happen in practice) which was also early returning, is handled by clamping to zero. The offending piece of code was present in several places, and this removes them all. Namely, the impacted m4 files are ifunction.m4 for regular functions and types, ifunction-s.m4 for character minloc and maxloc, and ifunction-s2.m4 for character minval and maxval. PR fortran/112371 libgfortran/ChangeLog: * m4/ifunction.m4 (START_MASKED_ARRAY_FUNCTION): Remove early return if extent is zero or less, and clamp negative value to zero. * m4/ifunction-s.m4 (START_MASKED_ARRAY_FUNCTION): Ditto. * m4/ifunction-s2.m4 (START_MASKED_ARRAY_FUNCTION): Ditto. * generated/iall_i1.c: Regenerate. * generated/iall_i16.c: Regenerate. * generated/iall_i2.c: Regenerate. * generated/iall_i4.c: Regenerate. * generated/iall_i8.c: Regenerate. * generated/iany_i1.c: Regenerate. * generated/iany_i16.c: Regenerate. * generated/iany_i2.c: Regenerate. * generated/iany_i4.c: Regenerate. * generated/iany_i8.c: Regenerate. * generated/iparity_i1.c: Regenerate. * generated/iparity_i16.c: Regenerate. * generated/iparity_i2.c: Regenerate. * generated/iparity_i4.c: Regenerate. * generated/iparity_i8.c: Regenerate. * generated/maxloc1_16_i1.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/maxloc1_16_i2.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/maxloc1_16_r17.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/maxloc1_16_s1.c: Regenerate. * generated/maxloc1_16_s4.c: Regenerate. * generated/maxloc1_4_i1.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/maxloc1_4_i2.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/maxloc1_4_r17.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/maxloc1_4_s1.c: Regenerate. * generated/maxloc1_4_s4.c: Regenerate. * generated/maxloc1_8_i1.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/maxloc1_8_i2.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r17.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/maxloc1_8_s1.c: Regenerate. * generated/maxloc1_8_s4.c: Regenerate. * generated/maxval1_s1.c: Regenerate. * generated/maxval1_s4.c: Regenerate. * generated/maxval_i1.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/maxval_i2.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/maxval_r17.c: Regenerate. * generated/maxval_r4.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/minloc1_16_i1.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/minloc1_16_i2.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/minloc1_16_r17.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/minloc1_16_s1.c: Regenerate. * generated/minloc1_16_s4.c: Regenerate. * generated/minloc1_4_i1.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc1_4_i2.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/minloc1_4_r17.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/minloc1_4_s1.c: Regenerate. * generated/minloc1_4_s4.c: Regenerate. * generated/minloc1_8_i1.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/minloc1_8_i2.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/minloc1_8_r17.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/minloc1_8_s1.c: Regenerate. * generated/minloc1_8_s4.c: Regenerate. * generated/minval1_s1.c: Regenerate. * generated/minval1_s4.c: Regenerate. * generated/minval_i1.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/minval_i2.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/minval_r17.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/minval_r8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/product_c17.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/product_i1.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/product_i2.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_r17.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/sum_c17.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/sum_i1.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/sum_i2.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/sum_r17.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/sum_r8.c: Regenerate. gcc/testsuite/ChangeLog: * gfortran.dg/bound_10.f90: New test. --- gcc/testsuite/gfortran.dg/bound_10.f90 | 207 +++++++++++++++++++++++++ libgfortran/generated/iall_i1.c | 4 +- libgfortran/generated/iall_i16.c | 4 +- libgfortran/generated/iall_i2.c | 4 +- libgfortran/generated/iall_i4.c | 4 +- libgfortran/generated/iall_i8.c | 4 +- libgfortran/generated/iany_i1.c | 4 +- libgfortran/generated/iany_i16.c | 4 +- libgfortran/generated/iany_i2.c | 4 +- libgfortran/generated/iany_i4.c | 4 +- libgfortran/generated/iany_i8.c | 4 +- libgfortran/generated/iparity_i1.c | 4 +- libgfortran/generated/iparity_i16.c | 4 +- libgfortran/generated/iparity_i2.c | 4 +- libgfortran/generated/iparity_i4.c | 4 +- libgfortran/generated/iparity_i8.c | 4 +- libgfortran/generated/maxloc1_16_i1.c | 4 +- libgfortran/generated/maxloc1_16_i16.c | 4 +- libgfortran/generated/maxloc1_16_i2.c | 4 +- libgfortran/generated/maxloc1_16_i4.c | 4 +- libgfortran/generated/maxloc1_16_i8.c | 4 +- libgfortran/generated/maxloc1_16_r10.c | 4 +- libgfortran/generated/maxloc1_16_r16.c | 4 +- libgfortran/generated/maxloc1_16_r17.c | 4 +- libgfortran/generated/maxloc1_16_r4.c | 4 +- libgfortran/generated/maxloc1_16_r8.c | 4 +- libgfortran/generated/maxloc1_16_s1.c | 4 +- libgfortran/generated/maxloc1_16_s4.c | 4 +- libgfortran/generated/maxloc1_4_i1.c | 4 +- libgfortran/generated/maxloc1_4_i16.c | 4 +- libgfortran/generated/maxloc1_4_i2.c | 4 +- libgfortran/generated/maxloc1_4_i4.c | 4 +- libgfortran/generated/maxloc1_4_i8.c | 4 +- libgfortran/generated/maxloc1_4_r10.c | 4 +- libgfortran/generated/maxloc1_4_r16.c | 4 +- libgfortran/generated/maxloc1_4_r17.c | 4 +- libgfortran/generated/maxloc1_4_r4.c | 4 +- libgfortran/generated/maxloc1_4_r8.c | 4 +- libgfortran/generated/maxloc1_4_s1.c | 4 +- libgfortran/generated/maxloc1_4_s4.c | 4 +- libgfortran/generated/maxloc1_8_i1.c | 4 +- libgfortran/generated/maxloc1_8_i16.c | 4 +- libgfortran/generated/maxloc1_8_i2.c | 4 +- libgfortran/generated/maxloc1_8_i4.c | 4 +- libgfortran/generated/maxloc1_8_i8.c | 4 +- libgfortran/generated/maxloc1_8_r10.c | 4 +- libgfortran/generated/maxloc1_8_r16.c | 4 +- libgfortran/generated/maxloc1_8_r17.c | 4 +- libgfortran/generated/maxloc1_8_r4.c | 4 +- libgfortran/generated/maxloc1_8_r8.c | 4 +- libgfortran/generated/maxloc1_8_s1.c | 4 +- libgfortran/generated/maxloc1_8_s4.c | 4 +- libgfortran/generated/maxval1_s1.c | 4 +- libgfortran/generated/maxval1_s4.c | 4 +- libgfortran/generated/maxval_i1.c | 4 +- libgfortran/generated/maxval_i16.c | 4 +- libgfortran/generated/maxval_i2.c | 4 +- libgfortran/generated/maxval_i4.c | 4 +- libgfortran/generated/maxval_i8.c | 4 +- libgfortran/generated/maxval_r10.c | 4 +- libgfortran/generated/maxval_r16.c | 4 +- libgfortran/generated/maxval_r17.c | 4 +- libgfortran/generated/maxval_r4.c | 4 +- libgfortran/generated/maxval_r8.c | 4 +- libgfortran/generated/minloc1_16_i1.c | 4 +- libgfortran/generated/minloc1_16_i16.c | 4 +- libgfortran/generated/minloc1_16_i2.c | 4 +- libgfortran/generated/minloc1_16_i4.c | 4 +- libgfortran/generated/minloc1_16_i8.c | 4 +- libgfortran/generated/minloc1_16_r10.c | 4 +- libgfortran/generated/minloc1_16_r16.c | 4 +- libgfortran/generated/minloc1_16_r17.c | 4 +- libgfortran/generated/minloc1_16_r4.c | 4 +- libgfortran/generated/minloc1_16_r8.c | 4 +- libgfortran/generated/minloc1_16_s1.c | 4 +- libgfortran/generated/minloc1_16_s4.c | 4 +- libgfortran/generated/minloc1_4_i1.c | 4 +- libgfortran/generated/minloc1_4_i16.c | 4 +- libgfortran/generated/minloc1_4_i2.c | 4 +- libgfortran/generated/minloc1_4_i4.c | 4 +- libgfortran/generated/minloc1_4_i8.c | 4 +- libgfortran/generated/minloc1_4_r10.c | 4 +- libgfortran/generated/minloc1_4_r16.c | 4 +- libgfortran/generated/minloc1_4_r17.c | 4 +- libgfortran/generated/minloc1_4_r4.c | 4 +- libgfortran/generated/minloc1_4_r8.c | 4 +- libgfortran/generated/minloc1_4_s1.c | 4 +- libgfortran/generated/minloc1_4_s4.c | 4 +- libgfortran/generated/minloc1_8_i1.c | 4 +- libgfortran/generated/minloc1_8_i16.c | 4 +- libgfortran/generated/minloc1_8_i2.c | 4 +- libgfortran/generated/minloc1_8_i4.c | 4 +- libgfortran/generated/minloc1_8_i8.c | 4 +- libgfortran/generated/minloc1_8_r10.c | 4 +- libgfortran/generated/minloc1_8_r16.c | 4 +- libgfortran/generated/minloc1_8_r17.c | 4 +- libgfortran/generated/minloc1_8_r4.c | 4 +- libgfortran/generated/minloc1_8_r8.c | 4 +- libgfortran/generated/minloc1_8_s1.c | 4 +- libgfortran/generated/minloc1_8_s4.c | 4 +- libgfortran/generated/minval1_s1.c | 4 +- libgfortran/generated/minval1_s4.c | 4 +- libgfortran/generated/minval_i1.c | 4 +- libgfortran/generated/minval_i16.c | 4 +- libgfortran/generated/minval_i2.c | 4 +- libgfortran/generated/minval_i4.c | 4 +- libgfortran/generated/minval_i8.c | 4 +- libgfortran/generated/minval_r10.c | 4 +- libgfortran/generated/minval_r16.c | 4 +- libgfortran/generated/minval_r17.c | 4 +- libgfortran/generated/minval_r4.c | 4 +- libgfortran/generated/minval_r8.c | 4 +- libgfortran/generated/product_c10.c | 4 +- libgfortran/generated/product_c16.c | 4 +- libgfortran/generated/product_c17.c | 4 +- libgfortran/generated/product_c4.c | 4 +- libgfortran/generated/product_c8.c | 4 +- libgfortran/generated/product_i1.c | 4 +- libgfortran/generated/product_i16.c | 4 +- libgfortran/generated/product_i2.c | 4 +- libgfortran/generated/product_i4.c | 4 +- libgfortran/generated/product_i8.c | 4 +- libgfortran/generated/product_r10.c | 4 +- libgfortran/generated/product_r16.c | 4 +- libgfortran/generated/product_r17.c | 4 +- libgfortran/generated/product_r4.c | 4 +- libgfortran/generated/product_r8.c | 4 +- libgfortran/generated/sum_c10.c | 4 +- libgfortran/generated/sum_c16.c | 4 +- libgfortran/generated/sum_c17.c | 4 +- libgfortran/generated/sum_c4.c | 4 +- libgfortran/generated/sum_c8.c | 4 +- libgfortran/generated/sum_i1.c | 4 +- libgfortran/generated/sum_i16.c | 4 +- libgfortran/generated/sum_i2.c | 4 +- libgfortran/generated/sum_i4.c | 4 +- libgfortran/generated/sum_i8.c | 4 +- libgfortran/generated/sum_r10.c | 4 +- libgfortran/generated/sum_r16.c | 4 +- libgfortran/generated/sum_r17.c | 4 +- libgfortran/generated/sum_r4.c | 4 +- libgfortran/generated/sum_r8.c | 4 +- libgfortran/m4/ifunction-s.m4 | 4 +- libgfortran/m4/ifunction-s2.m4 | 4 +- libgfortran/m4/ifunction.m4 | 4 +- 145 files changed, 495 insertions(+), 288 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/bound_10.f90 diff --git a/gcc/testsuite/gfortran.dg/bound_10.f90 b/gcc/testsuite/gfortran.dg/bound_10.f90 new file mode 100644 index 00000000000..cbe065cf2b6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bound_10.f90 @@ -0,0 +1,207 @@ +! { dg-do run } +! +! PR fortran/112371 +! The library used to not set the bounds and content of the resulting array +! of a reduction function if the input array had zero extent along the +! reduction dimension. + +program p + implicit none + call check_iall + call check_iany + call check_iparity + call check_minloc_int + call check_minloc_char + call check_maxloc_real + call check_maxloc_char + call check_minval_int + call check_minval_char + call check_maxval_real + call check_maxval_char + call check_sum + call check_product +contains + subroutine check_iall + integer :: a(3,0,2) + logical(kind=1) :: m(3,0,2) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ integer:: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 2 + r = iall(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 11 + if (any(ubound(r) /= (/ 3, 2 /))) stop 12 + if (any(shape(r) /= (/ 3, 2 /))) stop 13 + if (any(r /= int(z'FFFFFFFF'))) stop 14 + end subroutine + subroutine check_iany + integer(kind=8) :: a(2,3,0) + logical(kind=1) :: m(2,3,0) + integer :: i + integer(kind=8), allocatable :: r(:,:) + a = reshape((/ integer(kind=8):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 3 + r = iany(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 21 + if (any(ubound(r) /= (/ 2, 3 /))) stop 22 + if (any(shape(r) /= (/ 2, 3 /))) stop 23 + if (any(r /= 0)) stop 24 + end subroutine + subroutine check_iparity + integer(kind=2) :: a(0,2,3) + logical(kind=1) :: m(0,2,3) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ integer(kind=2):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 1 + r = iparity(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 31 + if (any(ubound(r) /= (/ 2, 3 /))) stop 32 + if (any(shape(r) /= (/ 2, 3 /))) stop 33 + if (any(r /= 0)) stop 34 + end subroutine + subroutine check_minloc_int + integer :: a(3,0,2) + logical(kind=1) :: m(3,0,2) + integer :: i, j + integer, allocatable :: r(:,:) + a = reshape((/ integer:: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 2 + r = minloc(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 41 + if (any(ubound(r) /= (/ 3, 2 /))) stop 42 + if (any(shape(r) /= (/ 3, 2 /))) stop 43 + if (any(r /= 0)) stop 44 + end subroutine + subroutine check_minloc_char + character :: a(2,3,0) + logical(kind=1) :: m(2,3,0) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ character:: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 3 + r = minloc(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 51 + if (any(ubound(r) /= (/ 2, 3 /))) stop 52 + if (any(shape(r) /= (/ 2, 3 /))) stop 53 + if (any(r /= 0)) stop 54 + end subroutine + subroutine check_maxloc_real + real :: a(0,2,3) + logical(kind=1) :: m(0,2,3) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ real:: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 1 + r = maxloc(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 61 + if (any(ubound(r) /= (/ 2, 3 /))) stop 62 + if (any(shape(r) /= (/ 2, 3 /))) stop 63 + if (any(r /= 0)) stop 64 + end subroutine + subroutine check_maxloc_char + character(len=2) :: a(3,0,2) + logical(kind=1) :: m(3,0,2) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ character(len=2):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 2 + r = maxloc(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 71 + if (any(ubound(r) /= (/ 3, 2 /))) stop 72 + if (any(shape(r) /= (/ 3, 2 /))) stop 73 + if (any(r /= 0)) stop 74 + end subroutine + subroutine check_minval_int + integer(kind=2) :: a(3,2,0) + logical(kind=1) :: m(3,2,0) + integer :: i, j + integer, allocatable :: r(:,:) + a = reshape((/ integer(kind=2):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 3 + r = minval(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 81 + if (any(ubound(r) /= (/ 3, 2 /))) stop 82 + if (any(shape(r) /= (/ 3, 2 /))) stop 83 + if (any(r /= huge(1_2))) stop 84 + end subroutine + subroutine check_minval_char + character(kind=4) :: a(0,3,2) + logical(kind=1) :: m(0,3,2) + integer :: i + character(kind=4), allocatable :: r(:,:) + a = reshape((/ character(kind=4):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 1 + r = minval(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 91 + if (any(ubound(r) /= (/ 3, 2 /))) stop 92 + if (any(shape(r) /= (/ 3, 2 /))) stop 93 + if (any(r /= char(int(z'FFFFFFFF', kind=8), kind=4))) stop 94 + end subroutine + subroutine check_maxval_real + real(kind=8) :: a(0,2,3) + logical(kind=1) :: m(0,2,3) + integer :: i + real(kind=8), allocatable :: r(:,:) + a = reshape((/ real(kind=8):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 1 + r = maxval(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 101 + if (any(ubound(r) /= (/ 2, 3 /))) stop 102 + if (any(shape(r) /= (/ 2, 3 /))) stop 103 + if (any(r /= -huge(1._8))) stop 104 + end subroutine + subroutine check_maxval_char + character(kind=4,len=2) :: a(3,0,2), e + logical(kind=1) :: m(3,0,2) + integer :: i + character(len=2,kind=4), allocatable :: r(:,:) + a = reshape((/ character(kind=4,len=2):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 2 + r = maxval(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 111 + if (any(ubound(r) /= (/ 3, 2 /))) stop 112 + if (any(shape(r) /= (/ 3, 2 /))) stop 113 + e = repeat(char(0, kind=4), len(a)) + if (any(r /= e)) stop 114 + end subroutine + subroutine check_sum + integer(kind=1) :: a(2,3,0) + logical(kind=1) :: m(2,3,0) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ integer:: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 3 + r = sum(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 121 + if (any(ubound(r) /= (/ 2, 3 /))) stop 122 + if (any(shape(r) /= (/ 2, 3 /))) stop 123 + if (any(r /= 0)) stop 124 + end subroutine + subroutine check_product + real(kind=8) :: a(0,2,3) + logical(kind=1) :: m(0,2,3) + integer :: i + integer, allocatable :: r(:,:) + a = reshape((/ real(kind=8):: /), shape(a)) + m = reshape((/ logical(kind=1):: /), shape(m)) + i = 1 + r = product(a, dim=i, mask=m) + if (any(lbound(r) /= 1)) stop 131 + if (any(ubound(r) /= (/ 2, 3 /))) stop 132 + if (any(shape(r) /= (/ 2, 3 /))) stop 133 + if (any(r /= 1.0_8)) stop 134 + end subroutine +end program diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index c9696c92485..2236f044e65 100644 --- a/libgfortran/generated/iall_i1.c +++ b/libgfortran/generated/iall_i1.c @@ -242,8 +242,8 @@ miall_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iall_i16.c b/libgfortran/generated/iall_i16.c index f0a1b3adcf2..96ca5a57c9c 100644 --- a/libgfortran/generated/iall_i16.c +++ b/libgfortran/generated/iall_i16.c @@ -242,8 +242,8 @@ miall_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iall_i2.c b/libgfortran/generated/iall_i2.c index 4d14d71cab2..4d895db2b35 100644 --- a/libgfortran/generated/iall_i2.c +++ b/libgfortran/generated/iall_i2.c @@ -242,8 +242,8 @@ miall_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iall_i4.c b/libgfortran/generated/iall_i4.c index cb7ce755bfc..673e9809483 100644 --- a/libgfortran/generated/iall_i4.c +++ b/libgfortran/generated/iall_i4.c @@ -242,8 +242,8 @@ miall_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iall_i8.c b/libgfortran/generated/iall_i8.c index c7dab3e2e56..4de6ff1782d 100644 --- a/libgfortran/generated/iall_i8.c +++ b/libgfortran/generated/iall_i8.c @@ -242,8 +242,8 @@ miall_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iany_i1.c b/libgfortran/generated/iany_i1.c index 539c5389561..ab191d6bdd2 100644 --- a/libgfortran/generated/iany_i1.c +++ b/libgfortran/generated/iany_i1.c @@ -242,8 +242,8 @@ miany_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iany_i16.c b/libgfortran/generated/iany_i16.c index d690dff60be..8fda0efea82 100644 --- a/libgfortran/generated/iany_i16.c +++ b/libgfortran/generated/iany_i16.c @@ -242,8 +242,8 @@ miany_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iany_i2.c b/libgfortran/generated/iany_i2.c index dd37c1e5b48..43080b85992 100644 --- a/libgfortran/generated/iany_i2.c +++ b/libgfortran/generated/iany_i2.c @@ -242,8 +242,8 @@ miany_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iany_i4.c b/libgfortran/generated/iany_i4.c index e9689904951..d8430ca4e90 100644 --- a/libgfortran/generated/iany_i4.c +++ b/libgfortran/generated/iany_i4.c @@ -242,8 +242,8 @@ miany_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iany_i8.c b/libgfortran/generated/iany_i8.c index 79f6c381a3f..7d3ac16412d 100644 --- a/libgfortran/generated/iany_i8.c +++ b/libgfortran/generated/iany_i8.c @@ -242,8 +242,8 @@ miany_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iparity_i1.c b/libgfortran/generated/iparity_i1.c index 8e0f4529d4d..53b15cbb73f 100644 --- a/libgfortran/generated/iparity_i1.c +++ b/libgfortran/generated/iparity_i1.c @@ -242,8 +242,8 @@ miparity_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iparity_i16.c b/libgfortran/generated/iparity_i16.c index 912ca591dda..848ac6284fb 100644 --- a/libgfortran/generated/iparity_i16.c +++ b/libgfortran/generated/iparity_i16.c @@ -242,8 +242,8 @@ miparity_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iparity_i2.c b/libgfortran/generated/iparity_i2.c index 6e7e60a5a2e..f435fd27edd 100644 --- a/libgfortran/generated/iparity_i2.c +++ b/libgfortran/generated/iparity_i2.c @@ -242,8 +242,8 @@ miparity_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iparity_i4.c b/libgfortran/generated/iparity_i4.c index 0bb1be1dedb..ea876bdd31a 100644 --- a/libgfortran/generated/iparity_i4.c +++ b/libgfortran/generated/iparity_i4.c @@ -242,8 +242,8 @@ miparity_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/iparity_i8.c b/libgfortran/generated/iparity_i8.c index e219d6e3dce..0fee2e5025d 100644 --- a/libgfortran/generated/iparity_i8.c +++ b/libgfortran/generated/iparity_i8.c @@ -242,8 +242,8 @@ miparity_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_i1.c b/libgfortran/generated/maxloc1_16_i1.c index e126c18bc80..bc0643cde1e 100644 --- a/libgfortran/generated/maxloc1_16_i1.c +++ b/libgfortran/generated/maxloc1_16_i1.c @@ -270,8 +270,8 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index 04ced535df9..5dca85c4bc0 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -270,8 +270,8 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_i2.c b/libgfortran/generated/maxloc1_16_i2.c index 9f7447e9de9..118d7c527a1 100644 --- a/libgfortran/generated/maxloc1_16_i2.c +++ b/libgfortran/generated/maxloc1_16_i2.c @@ -270,8 +270,8 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index 8663dfc7e24..858dfc0e850 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -270,8 +270,8 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index c0593a67f11..36469e49797 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -270,8 +270,8 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index a5e0665fccf..dfc55681b1f 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -270,8 +270,8 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index cbb20002665..17daa796afc 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -270,8 +270,8 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_r17.c b/libgfortran/generated/maxloc1_16_r17.c index 719ae09772d..46fd4ab320c 100644 --- a/libgfortran/generated/maxloc1_16_r17.c +++ b/libgfortran/generated/maxloc1_16_r17.c @@ -270,8 +270,8 @@ mmaxloc1_16_r17 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index 37a0657dab2..b52932f70bf 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -270,8 +270,8 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index 305613694b2..c26c4b4ed0a 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -270,8 +270,8 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index b9a8a639596..54f57238367 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -263,8 +263,8 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index fdaad7fd2dc..eb015eabef2 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -263,8 +263,8 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_i1.c b/libgfortran/generated/maxloc1_4_i1.c index b68d92ef44e..4b0bd56a60b 100644 --- a/libgfortran/generated/maxloc1_4_i1.c +++ b/libgfortran/generated/maxloc1_4_i1.c @@ -270,8 +270,8 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index 9221e22505b..d976d2d4b8e 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -270,8 +270,8 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_i2.c b/libgfortran/generated/maxloc1_4_i2.c index 3fa2e367898..ba8228925d4 100644 --- a/libgfortran/generated/maxloc1_4_i2.c +++ b/libgfortran/generated/maxloc1_4_i2.c @@ -270,8 +270,8 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index 5ef2abb98e1..644e48e547f 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -270,8 +270,8 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 102d394b309..fd5d31b5162 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -270,8 +270,8 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index 623204d792c..00c90fa3c66 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -270,8 +270,8 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index 92209ce79ce..92372b8d837 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -270,8 +270,8 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_r17.c b/libgfortran/generated/maxloc1_4_r17.c index 6ee34b52719..10c68752188 100644 --- a/libgfortran/generated/maxloc1_4_r17.c +++ b/libgfortran/generated/maxloc1_4_r17.c @@ -270,8 +270,8 @@ mmaxloc1_4_r17 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index ea6123a987c..b0750c19361 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -270,8 +270,8 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index ba83b4d6a6d..3be87685eed 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -270,8 +270,8 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index 7d2ab07915e..91628645d1c 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -263,8 +263,8 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index 7a4950d3e5c..7cb056ea10b 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -263,8 +263,8 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_i1.c b/libgfortran/generated/maxloc1_8_i1.c index d243e6e027c..42b113b1d0c 100644 --- a/libgfortran/generated/maxloc1_8_i1.c +++ b/libgfortran/generated/maxloc1_8_i1.c @@ -270,8 +270,8 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 5871aa52379..594c735ad77 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -270,8 +270,8 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_i2.c b/libgfortran/generated/maxloc1_8_i2.c index 9337f47c9ca..9e141af3ecd 100644 --- a/libgfortran/generated/maxloc1_8_i2.c +++ b/libgfortran/generated/maxloc1_8_i2.c @@ -270,8 +270,8 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index 747b9979fdc..b94c627dfd6 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -270,8 +270,8 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index adc0ebae28d..18e45033b40 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -270,8 +270,8 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index 4c8d00d937d..22cd8c26e1b 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -270,8 +270,8 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index df3edbe611b..646fe18a975 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -270,8 +270,8 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_r17.c b/libgfortran/generated/maxloc1_8_r17.c index 162806132f1..cc6bb86546c 100644 --- a/libgfortran/generated/maxloc1_8_r17.c +++ b/libgfortran/generated/maxloc1_8_r17.c @@ -270,8 +270,8 @@ mmaxloc1_8_r17 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index dee860a1a8f..2c482bc8ed4 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -270,8 +270,8 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 215d9668adb..32452d49ff3 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -270,8 +270,8 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index 7b1091d596c..96ac1ac0bd4 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -263,8 +263,8 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index a61c08c6f64..068c4ff7a72 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -263,8 +263,8 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval1_s1.c b/libgfortran/generated/maxval1_s1.c index fd65f4b62ec..6ad5366b8f3 100644 --- a/libgfortran/generated/maxval1_s1.c +++ b/libgfortran/generated/maxval1_s1.c @@ -258,8 +258,8 @@ mmaxval1_s1 (gfc_array_s1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval1_s4.c b/libgfortran/generated/maxval1_s4.c index 3558e61c76a..6337b043a3e 100644 --- a/libgfortran/generated/maxval1_s4.c +++ b/libgfortran/generated/maxval1_s4.c @@ -258,8 +258,8 @@ mmaxval1_s4 (gfc_array_s4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_i1.c b/libgfortran/generated/maxval_i1.c index bc52cd74a95..19feced6861 100644 --- a/libgfortran/generated/maxval_i1.c +++ b/libgfortran/generated/maxval_i1.c @@ -256,8 +256,8 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c index 1d9d33369d4..cd75603b066 100644 --- a/libgfortran/generated/maxval_i16.c +++ b/libgfortran/generated/maxval_i16.c @@ -256,8 +256,8 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c index fe3c6fecce7..9c7eb7702e3 100644 --- a/libgfortran/generated/maxval_i2.c +++ b/libgfortran/generated/maxval_i2.c @@ -256,8 +256,8 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 0412c7a7583..40bf1ce97ab 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -256,8 +256,8 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index 2037b96b3c5..0b6b9f671ee 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -256,8 +256,8 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c index 7c397eeea77..f83c4e9965a 100644 --- a/libgfortran/generated/maxval_r10.c +++ b/libgfortran/generated/maxval_r10.c @@ -256,8 +256,8 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c index 1f2144e5253..ec2d7a92be5 100644 --- a/libgfortran/generated/maxval_r16.c +++ b/libgfortran/generated/maxval_r16.c @@ -256,8 +256,8 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_r17.c b/libgfortran/generated/maxval_r17.c index f85460366aa..442e2b3a387 100644 --- a/libgfortran/generated/maxval_r17.c +++ b/libgfortran/generated/maxval_r17.c @@ -256,8 +256,8 @@ mmaxval_r17 (gfc_array_r17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index e2fd59e92bc..6c08b342752 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -256,8 +256,8 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index d3aadc62529..30d259f7708 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -256,8 +256,8 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_i1.c b/libgfortran/generated/minloc1_16_i1.c index 541d71fe214..80abb3cf8e0 100644 --- a/libgfortran/generated/minloc1_16_i1.c +++ b/libgfortran/generated/minloc1_16_i1.c @@ -280,8 +280,8 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index baaf02597b6..388a8f91208 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -280,8 +280,8 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_i2.c b/libgfortran/generated/minloc1_16_i2.c index e4f78b65de3..51ae92b91fb 100644 --- a/libgfortran/generated/minloc1_16_i2.c +++ b/libgfortran/generated/minloc1_16_i2.c @@ -280,8 +280,8 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index c561d71319e..675fc333d52 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -280,8 +280,8 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index ebdb68dd3c5..6a417880a12 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -280,8 +280,8 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index 98d3fb3879b..f5d9c347ef9 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -280,8 +280,8 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index ad445a42dfa..3405c0e4bef 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -280,8 +280,8 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_r17.c b/libgfortran/generated/minloc1_16_r17.c index 339d9ad9662..e3d0d417e5d 100644 --- a/libgfortran/generated/minloc1_16_r17.c +++ b/libgfortran/generated/minloc1_16_r17.c @@ -280,8 +280,8 @@ mminloc1_16_r17 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index 780bcc267fd..8af09702f5c 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -280,8 +280,8 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index 124587f5fb3..9397dc6ff91 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -280,8 +280,8 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index f4763dc6e64..c6d8861a5f4 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -263,8 +263,8 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index ba0475a9ca0..0f5eb2db869 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -263,8 +263,8 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_i1.c b/libgfortran/generated/minloc1_4_i1.c index 433a25a8ef8..4274e70dc92 100644 --- a/libgfortran/generated/minloc1_4_i1.c +++ b/libgfortran/generated/minloc1_4_i1.c @@ -280,8 +280,8 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index 9d2c606186b..ded68f0b0fb 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -280,8 +280,8 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_i2.c b/libgfortran/generated/minloc1_4_i2.c index 73737011e9a..a053dd352e5 100644 --- a/libgfortran/generated/minloc1_4_i2.c +++ b/libgfortran/generated/minloc1_4_i2.c @@ -280,8 +280,8 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index d18416ebcc4..6292fc2d9b7 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -280,8 +280,8 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 4f7dfdfdf73..9240e3fe5bd 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -280,8 +280,8 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index ff5af01130d..42a9de0b6d0 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -280,8 +280,8 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index 2d664467df3..06193f13598 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -280,8 +280,8 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_r17.c b/libgfortran/generated/minloc1_4_r17.c index 711fd841d34..d021d46b9fa 100644 --- a/libgfortran/generated/minloc1_4_r17.c +++ b/libgfortran/generated/minloc1_4_r17.c @@ -280,8 +280,8 @@ mminloc1_4_r17 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 0739d9bd178..e6990c6e70e 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -280,8 +280,8 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index d625195e432..fd1574f6413 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -280,8 +280,8 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index 13ebc76524d..5bbc844e196 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -263,8 +263,8 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index 5c9a5900237..4f2ab20ab9f 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -263,8 +263,8 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index fab5619979f..1b8b24064d9 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -280,8 +280,8 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index 742e2ea73b2..9561270e150 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -280,8 +280,8 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_i2.c b/libgfortran/generated/minloc1_8_i2.c index defef3c653c..979856579f9 100644 --- a/libgfortran/generated/minloc1_8_i2.c +++ b/libgfortran/generated/minloc1_8_i2.c @@ -280,8 +280,8 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index 3e696aafcac..1c303ed6dea 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -280,8 +280,8 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 9a017433ee6..6249f20ae62 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -280,8 +280,8 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index 18f294f2180..2c6a0fd8a58 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -280,8 +280,8 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index 1dd45dead26..f7d06648c37 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -280,8 +280,8 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_r17.c b/libgfortran/generated/minloc1_8_r17.c index 85dc6cb04fe..0cc70c439d0 100644 --- a/libgfortran/generated/minloc1_8_r17.c +++ b/libgfortran/generated/minloc1_8_r17.c @@ -280,8 +280,8 @@ mminloc1_8_r17 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index 6d7764a5eb7..b2ae3dfcc06 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -280,8 +280,8 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index e17d3c881c0..bafd72d0893 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -280,8 +280,8 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 0449575a5a3..8a40b52a188 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -263,8 +263,8 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index 682b89b2765..906d1df9a2e 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -263,8 +263,8 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval1_s1.c b/libgfortran/generated/minval1_s1.c index 9c577ed004c..d83fef19d3c 100644 --- a/libgfortran/generated/minval1_s1.c +++ b/libgfortran/generated/minval1_s1.c @@ -258,8 +258,8 @@ mminval1_s1 (gfc_array_s1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval1_s4.c b/libgfortran/generated/minval1_s4.c index 9a30bf0bfb5..5ef09cdeebb 100644 --- a/libgfortran/generated/minval1_s4.c +++ b/libgfortran/generated/minval1_s4.c @@ -258,8 +258,8 @@ mminval1_s4 (gfc_array_s4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_i1.c b/libgfortran/generated/minval_i1.c index 174161af4d4..544a996a01c 100644 --- a/libgfortran/generated/minval_i1.c +++ b/libgfortran/generated/minval_i1.c @@ -256,8 +256,8 @@ mminval_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c index b220391e4f8..1bcdf58792a 100644 --- a/libgfortran/generated/minval_i16.c +++ b/libgfortran/generated/minval_i16.c @@ -256,8 +256,8 @@ mminval_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_i2.c b/libgfortran/generated/minval_i2.c index 3a050c1eb82..61801f163f2 100644 --- a/libgfortran/generated/minval_i2.c +++ b/libgfortran/generated/minval_i2.c @@ -256,8 +256,8 @@ mminval_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index 194967d2f92..019a880e2ab 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -256,8 +256,8 @@ mminval_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index 07acc60d4a0..abbbd06da07 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -256,8 +256,8 @@ mminval_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c index d49244c1dff..d5b9d76d9e6 100644 --- a/libgfortran/generated/minval_r10.c +++ b/libgfortran/generated/minval_r10.c @@ -256,8 +256,8 @@ mminval_r10 (gfc_array_r10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c index 50305430d60..9fdde79f4fc 100644 --- a/libgfortran/generated/minval_r16.c +++ b/libgfortran/generated/minval_r16.c @@ -256,8 +256,8 @@ mminval_r16 (gfc_array_r16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_r17.c b/libgfortran/generated/minval_r17.c index 2479a864af3..3e75af04b2d 100644 --- a/libgfortran/generated/minval_r17.c +++ b/libgfortran/generated/minval_r17.c @@ -256,8 +256,8 @@ mminval_r17 (gfc_array_r17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index ceca490cfcd..f096473e5ad 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -256,8 +256,8 @@ mminval_r4 (gfc_array_r4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 091cb74d30d..8fafc3c1869 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -256,8 +256,8 @@ mminval_r8 (gfc_array_r8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c index b888769130d..7ecd80e3346 100644 --- a/libgfortran/generated/product_c10.c +++ b/libgfortran/generated/product_c10.c @@ -242,8 +242,8 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c index b783367ff05..e1d0c932a08 100644 --- a/libgfortran/generated/product_c16.c +++ b/libgfortran/generated/product_c16.c @@ -242,8 +242,8 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_c17.c b/libgfortran/generated/product_c17.c index e89e9eea0c3..2ed08b31f1e 100644 --- a/libgfortran/generated/product_c17.c +++ b/libgfortran/generated/product_c17.c @@ -242,8 +242,8 @@ mproduct_c17 (gfc_array_c17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index 08b2878930b..dbf00aacf7a 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -242,8 +242,8 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index cb721e50b65..1a3f27d329e 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -242,8 +242,8 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c index 8af7d63c654..35f4f6ec804 100644 --- a/libgfortran/generated/product_i1.c +++ b/libgfortran/generated/product_i1.c @@ -242,8 +242,8 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c index de9b7fb503a..3b815036f4f 100644 --- a/libgfortran/generated/product_i16.c +++ b/libgfortran/generated/product_i16.c @@ -242,8 +242,8 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c index bb0283286c1..e998c0d59c3 100644 --- a/libgfortran/generated/product_i2.c +++ b/libgfortran/generated/product_i2.c @@ -242,8 +242,8 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index 9491031c3a8..7dbc77aff9f 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -242,8 +242,8 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index 49d09318335..aaa688b69ff 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -242,8 +242,8 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c index 47af031fe90..8a7dba54fdd 100644 --- a/libgfortran/generated/product_r10.c +++ b/libgfortran/generated/product_r10.c @@ -242,8 +242,8 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c index 3ecafc170e3..38c9922ed9b 100644 --- a/libgfortran/generated/product_r16.c +++ b/libgfortran/generated/product_r16.c @@ -242,8 +242,8 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_r17.c b/libgfortran/generated/product_r17.c index 8f79c8c9c65..37ed80c9d3a 100644 --- a/libgfortran/generated/product_r17.c +++ b/libgfortran/generated/product_r17.c @@ -242,8 +242,8 @@ mproduct_r17 (gfc_array_r17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index f9b09b3c6dc..616fd5be89d 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -242,8 +242,8 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index ff6aa522176..c4b710dfc6f 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -242,8 +242,8 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c index 45018f88c6f..6de84a7e2ea 100644 --- a/libgfortran/generated/sum_c10.c +++ b/libgfortran/generated/sum_c10.c @@ -242,8 +242,8 @@ msum_c10 (gfc_array_c10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c index df4297c5a84..96fc8882902 100644 --- a/libgfortran/generated/sum_c16.c +++ b/libgfortran/generated/sum_c16.c @@ -242,8 +242,8 @@ msum_c16 (gfc_array_c16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_c17.c b/libgfortran/generated/sum_c17.c index 65322e78989..1472fe57733 100644 --- a/libgfortran/generated/sum_c17.c +++ b/libgfortran/generated/sum_c17.c @@ -242,8 +242,8 @@ msum_c17 (gfc_array_c17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index 11ce95d53c3..250aa416cb3 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -242,8 +242,8 @@ msum_c4 (gfc_array_c4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 16b9ed40e92..510a25847ac 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -242,8 +242,8 @@ msum_c8 (gfc_array_c8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c index c2df9619f98..974522b3bbf 100644 --- a/libgfortran/generated/sum_i1.c +++ b/libgfortran/generated/sum_i1.c @@ -242,8 +242,8 @@ msum_i1 (gfc_array_i1 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c index d4b3d970e51..00f644bff71 100644 --- a/libgfortran/generated/sum_i16.c +++ b/libgfortran/generated/sum_i16.c @@ -242,8 +242,8 @@ msum_i16 (gfc_array_i16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_i2.c b/libgfortran/generated/sum_i2.c index 044361c6167..448273594f4 100644 --- a/libgfortran/generated/sum_i2.c +++ b/libgfortran/generated/sum_i2.c @@ -242,8 +242,8 @@ msum_i2 (gfc_array_i2 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index b37393e4c70..529fb2e94a0 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -242,8 +242,8 @@ msum_i4 (gfc_array_i4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 235a98e5fb7..7b7ca72aa71 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -242,8 +242,8 @@ msum_i8 (gfc_array_i8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c index 4e2071fa570..71e71dd91f0 100644 --- a/libgfortran/generated/sum_r10.c +++ b/libgfortran/generated/sum_r10.c @@ -242,8 +242,8 @@ msum_r10 (gfc_array_r10 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c index 47571d9b010..813cc33dd90 100644 --- a/libgfortran/generated/sum_r16.c +++ b/libgfortran/generated/sum_r16.c @@ -242,8 +242,8 @@ msum_r16 (gfc_array_r16 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_r17.c b/libgfortran/generated/sum_r17.c index d479f200a80..8e82e871bb2 100644 --- a/libgfortran/generated/sum_r17.c +++ b/libgfortran/generated/sum_r17.c @@ -242,8 +242,8 @@ msum_r17 (gfc_array_r17 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index 227ea34124f..1b37711b99f 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -242,8 +242,8 @@ msum_r4 (gfc_array_r4 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index d0d0c111d4c..294211ba9be 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -242,8 +242,8 @@ msum_r8 (gfc_array_r8 * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index bc5ce55e81c..72793e435aa 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -244,8 +244,8 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/m4/ifunction-s2.m4 b/libgfortran/m4/ifunction-s2.m4 index 22ba00899d7..b936d7c392c 100644 --- a/libgfortran/m4/ifunction-s2.m4 +++ b/libgfortran/m4/ifunction-s2.m4 @@ -244,8 +244,8 @@ void } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index c80aa86c890..f3ab4ebd58d 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -232,8 +232,8 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, } len = GFC_DESCRIPTOR_EXTENT(array,dim); - if (len <= 0) - return; + if (len < 0) + len = 0; mbase = mask->base_addr; From patchwork Tue Nov 7 10:24:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 162438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp183426vqo; Tue, 7 Nov 2023 04:03:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHE/GOImI6L5Us44xTO8LOg6P9q8O9bRDgsAwCrla3DVPjqjSSbDSqpNpyYl/Oa0D9a47Dg X-Received: by 2002:a05:6214:daa:b0:671:e02a:8bfc with SMTP id h10-20020a0562140daa00b00671e02a8bfcmr29218058qvh.16.1699358610786; Tue, 07 Nov 2023 04:03:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699358610; cv=pass; d=google.com; s=arc-20160816; b=Bjwuxr+OdyslUde9RmxTk3tmQyHwCFrj6C7VodthEmT7uqOdZrHKTBgiFomo6livBJ XIpHYqwIB1Olndg9d/FiTe5Go7bH1X9As4OMLwD46BhgLALjiM7xCuiH7cksJ3VMJv8S Ie7DRZ2diTQ5Vx5/nf286RWDuChIYmCz4jAjZFcDv/Rv1+H3QkMRZ5VpMXkDaFkX4hDt sOZGCwT0DpLFxlTwQo2/lDus9Iy9uMIBqovtQ+COHLMKbah4mqxrmHlmbNblockH+FyB rnOHGbOURXKZr3l5TIh9pK6RDZNbjycmQzvXpcyh0yoyXdujQmqYU80W8JBMsf3H+WWe CFYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=FH54wmsQjCSVnUc4DdYvy2124hRuKoM2KFxY1dekaN8=; fh=zSP9Z/xOHj5SuUPPVSStTox2VGm+p0Uo644NtF/AZic=; b=Z+XOgVJ0+HGPVAaG45J05PjhZTuBaf5L8ATQhyZZyXTytoTUpAIdbwSkDrI9ng5Ybc XR0HzpzccJxjoGPVViKvidIzgE1+ujQdVE8EOGVzADzBShy4q89IpfY1Iv8AHkqASts5 QsYuCT+rMJzr9VWZu3D/Z6G6WH2P5tCmNFAsj+WOqiGLtGqG1669nVfr4tnOr9pp7Xuq U5/Uop2LA90pi2HOqBBUCB2C9qPQDCz1CEBhS2Hrd2mFjOSzoEWqDt2gpYLx0DVJZrl2 xhHWGtEwpJzMmHuuTR0UCgAceztu8rEPgGLC7PusX5BYTk51FUU1a+cavh0+y0N4MPFf Kh8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ckS4nXVr; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=UykPyd6O; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id cx10-20020a056214188a00b006708969628fsi6959985qvb.424.2023.11.07.04.03.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 04:03:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ckS4nXVr; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=UykPyd6O; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AC8A3857357 for ; Tue, 7 Nov 2023 10:28:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6AC8A3857357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699352912; bh=FH54wmsQjCSVnUc4DdYvy2124hRuKoM2KFxY1dekaN8=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ckS4nXVrc6UrmgySf455IXgaYbs0vxT3gYRLjMUqawuUST/oK2Rq8WVfDWQJR38v6 EmYLRQ4Hw8LgsW3yNDOmz6LPlcP/sJ7Hp4KxD3FUgl5n/ykgge3gzktCXUCZ9BGM0F xt+Qd190suhfu6krbZ645x3juBPvMB+TxgaAdA7g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.smtpout.orange.fr (smtp-29.smtpout.orange.fr [80.12.242.29]) by sourceware.org (Postfix) with ESMTPS id B11333865C15 for ; Tue, 7 Nov 2023 10:24:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B11333865C15 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gcc.gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B11333865C15 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352660; cv=none; b=VcOuQvP/RS651xyW65y3T+AV0fNiZriWQp4XO/yLPPqJEtzmBCMZpqK2DnpIO/gu5fTcCz0KeB81XOIO1L98UOfniDUkSND+x768P0mbZMr2v6zyGYz2A19USCQU/xPcTojblFkVNHZrTOO1xJ22WNjRjf4g0dIppSZjr3MO/7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699352660; c=relaxed/simple; bh=Dk2rpjLN1/dT3zinLQPJTGfpdxHs3VfTm9EJUzavNEQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UYp79xZBE8LEZGc8tIYZ4aGablWVnkwHE0iduJ5ixAKVkpKJi/UkAN3WPrXFnyJ4Eozy1ZQlny/IDqFoULG/a1dz4hUIU40u5wte8JMMKrDWRysW2J3ycA8J/FdRgXvkGTBeY1q0PbwZPF+kMx/dp++6BXoedSa9s8QPOa51/F8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from cyrano.home ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 0JFcrynXNF6ta0JFjrgDCy; Tue, 07 Nov 2023 11:24:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1699352651; bh=FH54wmsQjCSVnUc4DdYvy2124hRuKoM2KFxY1dekaN8=; h=From:To:Subject:Date:In-Reply-To:References; b=UykPyd6On0RFkExwmS4YoPDbmNTQpKwWfw3umi0UNX0EJISU7W74KdsKDz1Bu4xRH cvwVC4k1ZiGQChdb7ENI3ajvIfTgmED68Yu3P6Su7uR+FwcTFJRj0zTpHJOp5a3zJT hylUiavg7NTLjKUyGklJHkKmr9ZKkVmC0nh3kI3dATyz2IF7rgjZSirv8YoaAMe2zQ q9LfzU3uvnEzBII0kWRoPjB3AYfZNCvACw+kd0K8De7Ypy0pD6wBNAbUXLeQLFDDbt c/UptMQnfr3VTsflkQpGjMuqvxeTS/d4ZOZ8OQXX3TGIcEmky9wpN6cgnGuuiIYOvv l81mU7WNaIBaQ== X-ME-Helo: cyrano.home X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Tue, 07 Nov 2023 11:24:11 +0100 X-ME-IP: 86.215.161.51 From: Mikael Morin To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH v2 3/3] libgfortran: Remove empty array descriptor first dimension overwrite [PR112371] Date: Tue, 7 Nov 2023 11:24:04 +0100 Message-ID: <20231107102404.1723120-4-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107102404.1723120-1-mikael@gcc.gnu.org> References: <20231107102404.1723120-1-mikael@gcc.gnu.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781906654433024354 X-GMAIL-MSGID: 1781906654433024354 Remove the forced overwrite of the first dimension of the result array descriptor to set it to zero extent, in the function templates for transformational functions doing an array reduction along a dimension. This overwrite, which happened before early returning in case the result array was empty, was wrong because an array may have a non-zero extent in the first dimension and still be empty if it has a zero extent in a higher dimension. Overwriting the dimension was resulting in wrong array result upper bound for the first dimension in that case. The offending piece of code was present in several places, and this removes them all. More precisely, there is only one case to fix for logical reduction functions, and there are three cases for other reduction functions, corresponding to non-masked reduction, reduction with array mask, and reduction with scalar mask. The impacted m4 files are ifunction_logical.m4 for logical reduction functions, ifunction.m4 for regular functions and types, ifunction-s.m4 for character minloc and maxloc, ifunction-s2.m4 for character minval and maxval, and ifindloc1.m4 for findloc. PR fortran/112371 libgfortran/ChangeLog: * m4/ifunction.m4 (START_ARRAY_FUNCTION, START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Remove overwrite of the first dimension of the array descriptor. * m4/ifunction-s.m4 (START_ARRAY_FUNCTION, START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Ditto. * m4/ifunction-s2.m4 (START_ARRAY_FUNCTION, START_MASKED_ARRAY_FUNCTION, SCALAR_ARRAY_FUNCTION): Ditto. * m4/ifunction_logical.m4 (START_ARRAY_FUNCTION): Ditto. * m4/ifindloc1.m4: Ditto. * generated/all_l1.c: Regenerate. * generated/all_l16.c: Regenerate. * generated/all_l2.c: Regenerate. * generated/all_l4.c: Regenerate. * generated/all_l8.c: Regenerate. * generated/any_l1.c: Regenerate. * generated/any_l16.c: Regenerate. * generated/any_l2.c: Regenerate. * generated/any_l4.c: Regenerate. * generated/any_l8.c: Regenerate. * generated/count_16_l.c: Regenerate. * generated/count_1_l.c: Regenerate. * generated/count_2_l.c: Regenerate. * generated/count_4_l.c: Regenerate. * generated/count_8_l.c: Regenerate. * generated/findloc1_c10.c: Regenerate. * generated/findloc1_c16.c: Regenerate. * generated/findloc1_c17.c: Regenerate. * generated/findloc1_c4.c: Regenerate. * generated/findloc1_c8.c: Regenerate. * generated/findloc1_i1.c: Regenerate. * generated/findloc1_i16.c: Regenerate. * generated/findloc1_i2.c: Regenerate. * generated/findloc1_i4.c: Regenerate. * generated/findloc1_i8.c: Regenerate. * generated/findloc1_r10.c: Regenerate. * generated/findloc1_r16.c: Regenerate. * generated/findloc1_r17.c: Regenerate. * generated/findloc1_r4.c: Regenerate. * generated/findloc1_r8.c: Regenerate. * generated/findloc1_s1.c: Regenerate. * generated/findloc1_s4.c: Regenerate. * generated/iall_i1.c: Regenerate. * generated/iall_i16.c: Regenerate. * generated/iall_i2.c: Regenerate. * generated/iall_i4.c: Regenerate. * generated/iall_i8.c: Regenerate. * generated/iany_i1.c: Regenerate. * generated/iany_i16.c: Regenerate. * generated/iany_i2.c: Regenerate. * generated/iany_i4.c: Regenerate. * generated/iany_i8.c: Regenerate. * generated/iparity_i1.c: Regenerate. * generated/iparity_i16.c: Regenerate. * generated/iparity_i2.c: Regenerate. * generated/iparity_i4.c: Regenerate. * generated/iparity_i8.c: Regenerate. * generated/maxloc1_16_i1.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/maxloc1_16_i2.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/maxloc1_16_r17.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/maxloc1_16_s1.c: Regenerate. * generated/maxloc1_16_s4.c: Regenerate. * generated/maxloc1_4_i1.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/maxloc1_4_i2.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/maxloc1_4_r17.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/maxloc1_4_s1.c: Regenerate. * generated/maxloc1_4_s4.c: Regenerate. * generated/maxloc1_8_i1.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/maxloc1_8_i2.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r17.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/maxloc1_8_s1.c: Regenerate. * generated/maxloc1_8_s4.c: Regenerate. * generated/maxval1_s1.c: Regenerate. * generated/maxval1_s4.c: Regenerate. * generated/maxval_i1.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/maxval_i2.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/maxval_r17.c: Regenerate. * generated/maxval_r4.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/minloc1_16_i1.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/minloc1_16_i2.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/minloc1_16_r17.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/minloc1_16_s1.c: Regenerate. * generated/minloc1_16_s4.c: Regenerate. * generated/minloc1_4_i1.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc1_4_i2.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/minloc1_4_r17.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/minloc1_4_s1.c: Regenerate. * generated/minloc1_4_s4.c: Regenerate. * generated/minloc1_8_i1.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/minloc1_8_i2.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/minloc1_8_r17.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/minloc1_8_s1.c: Regenerate. * generated/minloc1_8_s4.c: Regenerate. * generated/minval1_s1.c: Regenerate. * generated/minval1_s4.c: Regenerate. * generated/minval_i1.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/minval_i2.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/minval_r17.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/minval_r8.c: Regenerate. * generated/norm2_r10.c: Regenerate. * generated/norm2_r16.c: Regenerate. * generated/norm2_r17.c: Regenerate. * generated/norm2_r4.c: Regenerate. * generated/norm2_r8.c: Regenerate. * generated/parity_l1.c: Regenerate. * generated/parity_l16.c: Regenerate. * generated/parity_l2.c: Regenerate. * generated/parity_l4.c: Regenerate. * generated/parity_l8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/product_c17.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/product_i1.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/product_i2.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_r17.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/sum_c17.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/sum_i1.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/sum_i2.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/sum_r17.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/sum_r8.c: Regenerate. gcc/testsuite/ChangeLog: * gfortran.dg/bound_11.f90: New test. --- gcc/testsuite/gfortran.dg/bound_11.f90 | 588 +++++++++++++++++++++++++ libgfortran/generated/all_l1.c | 6 +- libgfortran/generated/all_l16.c | 6 +- libgfortran/generated/all_l2.c | 6 +- libgfortran/generated/all_l4.c | 6 +- libgfortran/generated/all_l8.c | 6 +- libgfortran/generated/any_l1.c | 6 +- libgfortran/generated/any_l16.c | 6 +- libgfortran/generated/any_l2.c | 6 +- libgfortran/generated/any_l4.c | 6 +- libgfortran/generated/any_l8.c | 6 +- libgfortran/generated/count_16_l.c | 6 +- libgfortran/generated/count_1_l.c | 6 +- libgfortran/generated/count_2_l.c | 6 +- libgfortran/generated/count_4_l.c | 6 +- libgfortran/generated/count_8_l.c | 6 +- libgfortran/generated/findloc1_c10.c | 18 +- libgfortran/generated/findloc1_c16.c | 18 +- libgfortran/generated/findloc1_c17.c | 18 +- libgfortran/generated/findloc1_c4.c | 18 +- libgfortran/generated/findloc1_c8.c | 18 +- libgfortran/generated/findloc1_i1.c | 18 +- libgfortran/generated/findloc1_i16.c | 18 +- libgfortran/generated/findloc1_i2.c | 18 +- libgfortran/generated/findloc1_i4.c | 18 +- libgfortran/generated/findloc1_i8.c | 18 +- libgfortran/generated/findloc1_r10.c | 18 +- libgfortran/generated/findloc1_r16.c | 18 +- libgfortran/generated/findloc1_r17.c | 18 +- libgfortran/generated/findloc1_r4.c | 18 +- libgfortran/generated/findloc1_r8.c | 18 +- libgfortran/generated/findloc1_s1.c | 18 +- libgfortran/generated/findloc1_s4.c | 18 +- libgfortran/generated/iall_i1.c | 19 +- libgfortran/generated/iall_i16.c | 19 +- libgfortran/generated/iall_i2.c | 19 +- libgfortran/generated/iall_i4.c | 19 +- libgfortran/generated/iall_i8.c | 19 +- libgfortran/generated/iany_i1.c | 19 +- libgfortran/generated/iany_i16.c | 19 +- libgfortran/generated/iany_i2.c | 19 +- libgfortran/generated/iany_i4.c | 19 +- libgfortran/generated/iany_i8.c | 19 +- libgfortran/generated/iparity_i1.c | 19 +- libgfortran/generated/iparity_i16.c | 19 +- libgfortran/generated/iparity_i2.c | 19 +- libgfortran/generated/iparity_i4.c | 19 +- libgfortran/generated/iparity_i8.c | 19 +- libgfortran/generated/maxloc1_16_i1.c | 19 +- libgfortran/generated/maxloc1_16_i16.c | 19 +- libgfortran/generated/maxloc1_16_i2.c | 19 +- libgfortran/generated/maxloc1_16_i4.c | 19 +- libgfortran/generated/maxloc1_16_i8.c | 19 +- libgfortran/generated/maxloc1_16_r10.c | 19 +- libgfortran/generated/maxloc1_16_r16.c | 19 +- libgfortran/generated/maxloc1_16_r17.c | 19 +- libgfortran/generated/maxloc1_16_r4.c | 19 +- libgfortran/generated/maxloc1_16_r8.c | 19 +- libgfortran/generated/maxloc1_16_s1.c | 19 +- libgfortran/generated/maxloc1_16_s4.c | 19 +- libgfortran/generated/maxloc1_4_i1.c | 19 +- libgfortran/generated/maxloc1_4_i16.c | 19 +- libgfortran/generated/maxloc1_4_i2.c | 19 +- libgfortran/generated/maxloc1_4_i4.c | 19 +- libgfortran/generated/maxloc1_4_i8.c | 19 +- libgfortran/generated/maxloc1_4_r10.c | 19 +- libgfortran/generated/maxloc1_4_r16.c | 19 +- libgfortran/generated/maxloc1_4_r17.c | 19 +- libgfortran/generated/maxloc1_4_r4.c | 19 +- libgfortran/generated/maxloc1_4_r8.c | 19 +- libgfortran/generated/maxloc1_4_s1.c | 19 +- libgfortran/generated/maxloc1_4_s4.c | 19 +- libgfortran/generated/maxloc1_8_i1.c | 19 +- libgfortran/generated/maxloc1_8_i16.c | 19 +- libgfortran/generated/maxloc1_8_i2.c | 19 +- libgfortran/generated/maxloc1_8_i4.c | 19 +- libgfortran/generated/maxloc1_8_i8.c | 19 +- libgfortran/generated/maxloc1_8_r10.c | 19 +- libgfortran/generated/maxloc1_8_r16.c | 19 +- libgfortran/generated/maxloc1_8_r17.c | 19 +- libgfortran/generated/maxloc1_8_r4.c | 19 +- libgfortran/generated/maxloc1_8_r8.c | 19 +- libgfortran/generated/maxloc1_8_s1.c | 19 +- libgfortran/generated/maxloc1_8_s4.c | 19 +- libgfortran/generated/maxval1_s1.c | 19 +- libgfortran/generated/maxval1_s4.c | 19 +- libgfortran/generated/maxval_i1.c | 19 +- libgfortran/generated/maxval_i16.c | 19 +- libgfortran/generated/maxval_i2.c | 19 +- libgfortran/generated/maxval_i4.c | 19 +- libgfortran/generated/maxval_i8.c | 19 +- libgfortran/generated/maxval_r10.c | 19 +- libgfortran/generated/maxval_r16.c | 19 +- libgfortran/generated/maxval_r17.c | 19 +- libgfortran/generated/maxval_r4.c | 19 +- libgfortran/generated/maxval_r8.c | 19 +- libgfortran/generated/minloc1_16_i1.c | 19 +- libgfortran/generated/minloc1_16_i16.c | 19 +- libgfortran/generated/minloc1_16_i2.c | 19 +- libgfortran/generated/minloc1_16_i4.c | 19 +- libgfortran/generated/minloc1_16_i8.c | 19 +- libgfortran/generated/minloc1_16_r10.c | 19 +- libgfortran/generated/minloc1_16_r16.c | 19 +- libgfortran/generated/minloc1_16_r17.c | 19 +- libgfortran/generated/minloc1_16_r4.c | 19 +- libgfortran/generated/minloc1_16_r8.c | 19 +- libgfortran/generated/minloc1_16_s1.c | 19 +- libgfortran/generated/minloc1_16_s4.c | 19 +- libgfortran/generated/minloc1_4_i1.c | 19 +- libgfortran/generated/minloc1_4_i16.c | 19 +- libgfortran/generated/minloc1_4_i2.c | 19 +- libgfortran/generated/minloc1_4_i4.c | 19 +- libgfortran/generated/minloc1_4_i8.c | 19 +- libgfortran/generated/minloc1_4_r10.c | 19 +- libgfortran/generated/minloc1_4_r16.c | 19 +- libgfortran/generated/minloc1_4_r17.c | 19 +- libgfortran/generated/minloc1_4_r4.c | 19 +- libgfortran/generated/minloc1_4_r8.c | 19 +- libgfortran/generated/minloc1_4_s1.c | 19 +- libgfortran/generated/minloc1_4_s4.c | 19 +- libgfortran/generated/minloc1_8_i1.c | 19 +- libgfortran/generated/minloc1_8_i16.c | 19 +- libgfortran/generated/minloc1_8_i2.c | 19 +- libgfortran/generated/minloc1_8_i4.c | 19 +- libgfortran/generated/minloc1_8_i8.c | 19 +- libgfortran/generated/minloc1_8_r10.c | 19 +- libgfortran/generated/minloc1_8_r16.c | 19 +- libgfortran/generated/minloc1_8_r17.c | 19 +- libgfortran/generated/minloc1_8_r4.c | 19 +- libgfortran/generated/minloc1_8_r8.c | 19 +- libgfortran/generated/minloc1_8_s1.c | 19 +- libgfortran/generated/minloc1_8_s4.c | 19 +- libgfortran/generated/minval1_s1.c | 19 +- libgfortran/generated/minval1_s4.c | 19 +- libgfortran/generated/minval_i1.c | 19 +- libgfortran/generated/minval_i16.c | 19 +- libgfortran/generated/minval_i2.c | 19 +- libgfortran/generated/minval_i4.c | 19 +- libgfortran/generated/minval_i8.c | 19 +- libgfortran/generated/minval_r10.c | 19 +- libgfortran/generated/minval_r16.c | 19 +- libgfortran/generated/minval_r17.c | 19 +- libgfortran/generated/minval_r4.c | 19 +- libgfortran/generated/minval_r8.c | 19 +- libgfortran/generated/norm2_r10.c | 7 +- libgfortran/generated/norm2_r16.c | 7 +- libgfortran/generated/norm2_r17.c | 7 +- libgfortran/generated/norm2_r4.c | 7 +- libgfortran/generated/norm2_r8.c | 7 +- libgfortran/generated/parity_l1.c | 7 +- libgfortran/generated/parity_l16.c | 7 +- libgfortran/generated/parity_l2.c | 7 +- libgfortran/generated/parity_l4.c | 7 +- libgfortran/generated/parity_l8.c | 7 +- libgfortran/generated/product_c10.c | 19 +- libgfortran/generated/product_c16.c | 19 +- libgfortran/generated/product_c17.c | 19 +- libgfortran/generated/product_c4.c | 19 +- libgfortran/generated/product_c8.c | 19 +- libgfortran/generated/product_i1.c | 19 +- libgfortran/generated/product_i16.c | 19 +- libgfortran/generated/product_i2.c | 19 +- libgfortran/generated/product_i4.c | 19 +- libgfortran/generated/product_i8.c | 19 +- libgfortran/generated/product_r10.c | 19 +- libgfortran/generated/product_r16.c | 19 +- libgfortran/generated/product_r17.c | 19 +- libgfortran/generated/product_r4.c | 19 +- libgfortran/generated/product_r8.c | 19 +- libgfortran/generated/sum_c10.c | 19 +- libgfortran/generated/sum_c16.c | 19 +- libgfortran/generated/sum_c17.c | 19 +- libgfortran/generated/sum_c4.c | 19 +- libgfortran/generated/sum_c8.c | 19 +- libgfortran/generated/sum_i1.c | 19 +- libgfortran/generated/sum_i16.c | 19 +- libgfortran/generated/sum_i2.c | 19 +- libgfortran/generated/sum_i4.c | 19 +- libgfortran/generated/sum_i8.c | 19 +- libgfortran/generated/sum_r10.c | 19 +- libgfortran/generated/sum_r16.c | 19 +- libgfortran/generated/sum_r17.c | 19 +- libgfortran/generated/sum_r4.c | 19 +- libgfortran/generated/sum_r8.c | 19 +- libgfortran/m4/ifindloc1.m4 | 18 +- libgfortran/m4/ifunction-s.m4 | 19 +- libgfortran/m4/ifunction-s2.m4 | 19 +- libgfortran/m4/ifunction.m4 | 19 +- libgfortran/m4/ifunction_logical.m4 | 6 +- 189 files changed, 1100 insertions(+), 2714 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/bound_11.f90 diff --git a/gcc/testsuite/gfortran.dg/bound_11.f90 b/gcc/testsuite/gfortran.dg/bound_11.f90 new file mode 100644 index 00000000000..170eba4ddfd --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bound_11.f90 @@ -0,0 +1,588 @@ +! { dg-do run } +! +! PR fortran/112371 +! The library used to incorrectly set an extent of zero for the first +! dimension of the resulting array of a reduction function if that array was +! empty. + +program p + implicit none + call check_iparity + call check_sum + call check_minloc_int + call check_minloc_char + call check_maxloc_char4 + call check_minval_char + call check_maxval_char4 + call check_any + call check_count4 + call check_findloc_int + call check_findloc_char +contains + subroutine check_iparity + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = iparity(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 111 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 112 + i = 2 + r = iparity(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 113 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 114 + i = 3 + r = iparity(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 115 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 116 + i = 4 + r = iparity(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 117 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 118 + i = 1 + r = iparity(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 121 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 122 + i = 2 + r = iparity(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 123 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 124 + i = 3 + r = iparity(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 125 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 126 + i = 4 + r = iparity(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 127 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 128 + i = 1 + r = iparity(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 131 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 132 + i = 2 + r = iparity(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 133 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 134 + i = 3 + r = iparity(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 135 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 136 + i = 4 + r = iparity(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 137 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 138 + end subroutine + subroutine check_sum + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = sum(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 211 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 212 + i = 2 + r = sum(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 213 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 214 + i = 3 + r = sum(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 215 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 216 + i = 4 + r = sum(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 217 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 218 + i = 1 + r = sum(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 221 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 222 + i = 2 + r = sum(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 223 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 224 + i = 3 + r = sum(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 225 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 226 + i = 4 + r = sum(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 227 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 228 + i = 1 + r = sum(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 231 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 232 + i = 2 + r = sum(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 233 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 234 + i = 3 + r = sum(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 235 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 236 + i = 4 + r = sum(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 237 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 238 + end subroutine + subroutine check_minloc_int + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 311 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 312 + i = 2 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 313 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 314 + i = 3 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 315 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 316 + i = 4 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 317 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 318 + i = 1 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 321 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 322 + i = 2 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 323 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 324 + i = 3 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 325 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 326 + i = 4 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 327 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 328 + i = 1 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 331 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 332 + i = 2 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 333 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 334 + i = 3 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 335 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 336 + i = 4 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 337 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 338 + end subroutine + subroutine check_minloc_char + character :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ character:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 411 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 412 + i = 2 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 413 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 414 + i = 3 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 415 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 416 + i = 4 + r = minloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 417 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 418 + i = 1 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 421 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 422 + i = 2 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 423 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 424 + i = 3 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 425 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 426 + i = 4 + r = minloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 427 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 428 + i = 1 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 431 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 432 + i = 2 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 433 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 434 + i = 3 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 435 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 436 + i = 4 + r = minloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 437 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 438 + end subroutine + subroutine check_maxloc_char4 + character(kind=4) :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ character(kind=4):: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = maxloc(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 511 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 512 + i = 2 + r = maxloc(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 513 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 514 + i = 3 + r = maxloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 515 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 516 + i = 4 + r = maxloc(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 517 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 518 + i = 1 + r = maxloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 521 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 522 + i = 2 + r = maxloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 523 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 524 + i = 3 + r = maxloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 525 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 526 + i = 4 + r = maxloc(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 527 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 528 + i = 1 + r = maxloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 531 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 532 + i = 2 + r = maxloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 533 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 534 + i = 3 + r = maxloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 535 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 536 + i = 4 + r = maxloc(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 537 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 538 + end subroutine + subroutine check_minval_char + character :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + character, allocatable :: r(:,:,:) + a = reshape((/ character:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = minval(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 611 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 612 + i = 2 + r = minval(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 613 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 614 + i = 3 + r = minval(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 615 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 616 + i = 4 + r = minval(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 617 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 618 + i = 1 + r = minval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 621 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 622 + i = 2 + r = minval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 623 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 624 + i = 3 + r = minval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 625 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 626 + i = 4 + r = minval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 627 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 628 + i = 1 + r = minval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 631 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 632 + i = 2 + r = minval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 633 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 634 + i = 3 + r = minval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 635 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 636 + i = 4 + r = minval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 637 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 638 + end subroutine + subroutine check_maxval_char4 + character(kind=4) :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + character(kind=4), allocatable :: r(:,:,:) + a = reshape((/ character(kind=4):: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = maxval(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 711 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 712 + i = 2 + r = maxval(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 713 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 714 + i = 3 + r = maxval(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 715 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 716 + i = 4 + r = maxval(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 717 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 718 + i = 1 + r = maxval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 721 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 722 + i = 2 + r = maxval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 723 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 724 + i = 3 + r = maxval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 725 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 726 + i = 4 + r = maxval(a, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 727 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 728 + i = 1 + r = maxval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 731 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 732 + i = 2 + r = maxval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 733 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 734 + i = 3 + r = maxval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 735 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 736 + i = 4 + r = maxval(a, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 737 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 738 + end subroutine + subroutine check_any + logical :: a(9,3,0,7) + integer :: i + logical, allocatable :: r(:,:,:) + a = reshape((/ logical:: /), shape(a)) + i = 1 + r = any(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 811 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 812 + i = 2 + r = any(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 813 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 814 + i = 3 + r = any(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 815 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 816 + i = 4 + r = any(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 817 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 818 + end subroutine + subroutine check_count4 + logical(kind=4) :: a(9,3,0,7) + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ logical(kind=4):: /), shape(a)) + i = 1 + r = count(a, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 911 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 912 + i = 2 + r = count(a, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 913 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 914 + i = 3 + r = count(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 915 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 916 + i = 4 + r = count(a, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 917 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 918 + end subroutine + subroutine check_findloc_int + integer :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ integer:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = findloc(a, 10, dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1011 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1012 + i = 2 + r = findloc(a, 10, dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1013 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1014 + i = 3 + r = findloc(a, 10, dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1015 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1016 + i = 4 + r = findloc(a, 10, dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1017 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1018 + i = 1 + r = findloc(a, 10, dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1021 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1022 + i = 2 + r = findloc(a, 10, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1023 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1024 + i = 3 + r = findloc(a, 10, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1025 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1026 + i = 4 + r = findloc(a, 10, dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1027 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1028 + i = 1 + r = findloc(a, 10, dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1031 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1032 + i = 2 + r = findloc(a, 10, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1033 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1034 + i = 3 + r = findloc(a, 10, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1035 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1036 + i = 4 + r = findloc(a, 10, dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1037 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1038 + end subroutine + subroutine check_findloc_char + character :: a(9,3,0,7) + logical :: m1(9,3,0,7) + logical(kind=4) :: m4 + integer :: i + integer, allocatable :: r(:,:,:) + a = reshape((/ character:: /), shape(a)) + m1 = reshape((/ logical:: /), shape(m1)) + m4 = .false. + i = 1 + r = findloc(a, "a", dim=i) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1111 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1112 + i = 2 + r = findloc(a, "a", dim=i) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1113 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1114 + i = 3 + r = findloc(a, "a", dim=i) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1115 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1116 + i = 4 + r = findloc(a, "a", dim=i) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1117 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1118 + i = 1 + r = findloc(a, "a", dim=i, mask=m1) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1121 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1122 + i = 2 + r = findloc(a, "a", dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1123 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1124 + i = 3 + r = findloc(a, "a", dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1125 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1126 + i = 4 + r = findloc(a, "a", dim=i, mask=m1) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1127 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1128 + i = 1 + r = findloc(a, "a", dim=i, mask=m4) + if (any(shape(r) /= (/ 3, 0, 7 /))) stop 1131 + if (any(ubound(r) /= (/ 3, 0, 7 /))) stop 1132 + i = 2 + r = findloc(a, "a", dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 0, 7 /))) stop 1133 + if (any(ubound(r) /= (/ 9, 0, 7 /))) stop 1134 + i = 3 + r = findloc(a, "a", dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 7 /))) stop 1135 + if (any(ubound(r) /= (/ 9, 3, 7 /))) stop 1136 + i = 4 + r = findloc(a, "a", dim=i, mask=m4) + if (any(shape(r) /= (/ 9, 3, 0 /))) stop 1137 + if (any(ubound(r) /= (/ 9, 3, 0 /))) stop 1138 + end subroutine +end program diff --git a/libgfortran/generated/all_l1.c b/libgfortran/generated/all_l1.c index e4942811461..aacc5ac0793 100644 --- a/libgfortran/generated/all_l1.c +++ b/libgfortran/generated/all_l1.c @@ -103,11 +103,7 @@ all_l1 (gfc_array_l1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/all_l16.c b/libgfortran/generated/all_l16.c index 1fc45bfd97c..e1b2e157c37 100644 --- a/libgfortran/generated/all_l16.c +++ b/libgfortran/generated/all_l16.c @@ -103,11 +103,7 @@ all_l16 (gfc_array_l16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/all_l2.c b/libgfortran/generated/all_l2.c index f6dbf1c456d..045196eb13b 100644 --- a/libgfortran/generated/all_l2.c +++ b/libgfortran/generated/all_l2.c @@ -103,11 +103,7 @@ all_l2 (gfc_array_l2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c index 7f915ef9c61..7783d966697 100644 --- a/libgfortran/generated/all_l4.c +++ b/libgfortran/generated/all_l4.c @@ -103,11 +103,7 @@ all_l4 (gfc_array_l4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c index 3fa8147c1a1..a9571003b48 100644 --- a/libgfortran/generated/all_l8.c +++ b/libgfortran/generated/all_l8.c @@ -103,11 +103,7 @@ all_l8 (gfc_array_l8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/any_l1.c b/libgfortran/generated/any_l1.c index 236e4100ec2..ce38a9761cb 100644 --- a/libgfortran/generated/any_l1.c +++ b/libgfortran/generated/any_l1.c @@ -103,11 +103,7 @@ any_l1 (gfc_array_l1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/any_l16.c b/libgfortran/generated/any_l16.c index 7290d66667e..771c6fcbc2e 100644 --- a/libgfortran/generated/any_l16.c +++ b/libgfortran/generated/any_l16.c @@ -103,11 +103,7 @@ any_l16 (gfc_array_l16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/any_l2.c b/libgfortran/generated/any_l2.c index d54e78fda0c..69a0d474576 100644 --- a/libgfortran/generated/any_l2.c +++ b/libgfortran/generated/any_l2.c @@ -103,11 +103,7 @@ any_l2 (gfc_array_l2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c index a577bc58213..08e4cff945e 100644 --- a/libgfortran/generated/any_l4.c +++ b/libgfortran/generated/any_l4.c @@ -103,11 +103,7 @@ any_l4 (gfc_array_l4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c index 0af302746f5..259bd30f780 100644 --- a/libgfortran/generated/any_l8.c +++ b/libgfortran/generated/any_l8.c @@ -103,11 +103,7 @@ any_l8 (gfc_array_l8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/count_16_l.c b/libgfortran/generated/count_16_l.c index 89f4f753d1a..f7319d0e84b 100644 --- a/libgfortran/generated/count_16_l.c +++ b/libgfortran/generated/count_16_l.c @@ -103,11 +103,7 @@ count_16_l (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/count_1_l.c b/libgfortran/generated/count_1_l.c index 05b8b898e94..919388ff18a 100644 --- a/libgfortran/generated/count_1_l.c +++ b/libgfortran/generated/count_1_l.c @@ -103,11 +103,7 @@ count_1_l (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/count_2_l.c b/libgfortran/generated/count_2_l.c index 654b21589d0..493cd15e5d2 100644 --- a/libgfortran/generated/count_2_l.c +++ b/libgfortran/generated/count_2_l.c @@ -103,11 +103,7 @@ count_2_l (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/count_4_l.c b/libgfortran/generated/count_4_l.c index 8f40ea1c0be..a308bd7014f 100644 --- a/libgfortran/generated/count_4_l.c +++ b/libgfortran/generated/count_4_l.c @@ -103,11 +103,7 @@ count_4_l (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/count_8_l.c b/libgfortran/generated/count_8_l.c index ab64c085803..e23081d00ca 100644 --- a/libgfortran/generated/count_8_l.c +++ b/libgfortran/generated/count_8_l.c @@ -103,11 +103,7 @@ count_8_l (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_c10.c b/libgfortran/generated/findloc1_c10.c index 0b7905a101c..fa68971ff38 100644 --- a/libgfortran/generated/findloc1_c10.c +++ b/libgfortran/generated/findloc1_c10.c @@ -105,11 +105,7 @@ findloc1_c10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_c10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_c10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_c16.c b/libgfortran/generated/findloc1_c16.c index 1cbe1fc5b26..13e2209dc32 100644 --- a/libgfortran/generated/findloc1_c16.c +++ b/libgfortran/generated/findloc1_c16.c @@ -105,11 +105,7 @@ findloc1_c16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_c16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_c16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_c17.c b/libgfortran/generated/findloc1_c17.c index fea16286bf8..03c651e9c19 100644 --- a/libgfortran/generated/findloc1_c17.c +++ b/libgfortran/generated/findloc1_c17.c @@ -105,11 +105,7 @@ findloc1_c17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_c17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_c17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_c4.c b/libgfortran/generated/findloc1_c4.c index 2c800aa4a77..6c3fe7cd537 100644 --- a/libgfortran/generated/findloc1_c4.c +++ b/libgfortran/generated/findloc1_c4.c @@ -105,11 +105,7 @@ findloc1_c4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_c4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_c4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_c8.c b/libgfortran/generated/findloc1_c8.c index 9f14e631c9e..2b4b84b522c 100644 --- a/libgfortran/generated/findloc1_c8.c +++ b/libgfortran/generated/findloc1_c8.c @@ -105,11 +105,7 @@ findloc1_c8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_c8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_c8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_i1.c b/libgfortran/generated/findloc1_i1.c index 90896ac92a6..5175198a295 100644 --- a/libgfortran/generated/findloc1_i1.c +++ b/libgfortran/generated/findloc1_i1.c @@ -105,11 +105,7 @@ findloc1_i1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_i1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_i1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_i16.c b/libgfortran/generated/findloc1_i16.c index 699320dffcd..c3fcf8b5a2c 100644 --- a/libgfortran/generated/findloc1_i16.c +++ b/libgfortran/generated/findloc1_i16.c @@ -105,11 +105,7 @@ findloc1_i16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_i16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_i16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_i2.c b/libgfortran/generated/findloc1_i2.c index d3ebdab8f23..c00f7b5c244 100644 --- a/libgfortran/generated/findloc1_i2.c +++ b/libgfortran/generated/findloc1_i2.c @@ -105,11 +105,7 @@ findloc1_i2 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_i2 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_i2 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_i4.c b/libgfortran/generated/findloc1_i4.c index e030e6bee60..d1d0247b656 100644 --- a/libgfortran/generated/findloc1_i4.c +++ b/libgfortran/generated/findloc1_i4.c @@ -105,11 +105,7 @@ findloc1_i4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_i4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_i4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_i8.c b/libgfortran/generated/findloc1_i8.c index 678e6516105..02f219bcc1e 100644 --- a/libgfortran/generated/findloc1_i8.c +++ b/libgfortran/generated/findloc1_i8.c @@ -105,11 +105,7 @@ findloc1_i8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_i8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_i8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_r10.c b/libgfortran/generated/findloc1_r10.c index b416fdd0e00..1b824c7d78b 100644 --- a/libgfortran/generated/findloc1_r10.c +++ b/libgfortran/generated/findloc1_r10.c @@ -105,11 +105,7 @@ findloc1_r10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_r10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_r10 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_r16.c b/libgfortran/generated/findloc1_r16.c index d03b34fbc0b..9a42849c989 100644 --- a/libgfortran/generated/findloc1_r16.c +++ b/libgfortran/generated/findloc1_r16.c @@ -105,11 +105,7 @@ findloc1_r16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_r16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_r16 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_r17.c b/libgfortran/generated/findloc1_r17.c index 2b72e90506a..7b95da2b6e7 100644 --- a/libgfortran/generated/findloc1_r17.c +++ b/libgfortran/generated/findloc1_r17.c @@ -105,11 +105,7 @@ findloc1_r17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_r17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_r17 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_r4.c b/libgfortran/generated/findloc1_r4.c index fa216cca481..8b527728cb0 100644 --- a/libgfortran/generated/findloc1_r4.c +++ b/libgfortran/generated/findloc1_r4.c @@ -105,11 +105,7 @@ findloc1_r4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_r4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_r4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_r8.c b/libgfortran/generated/findloc1_r8.c index 7f1e044f8e1..0ac3fd6e73a 100644 --- a/libgfortran/generated/findloc1_r8.c +++ b/libgfortran/generated/findloc1_r8.c @@ -105,11 +105,7 @@ findloc1_r8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -293,11 +289,7 @@ mfindloc1_r8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +458,7 @@ sfindloc1_r8 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_s1.c b/libgfortran/generated/findloc1_s1.c index 2fb81c414af..85b13bd7c5f 100644 --- a/libgfortran/generated/findloc1_s1.c +++ b/libgfortran/generated/findloc1_s1.c @@ -107,11 +107,7 @@ findloc1_s1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -295,11 +291,7 @@ mfindloc1_s1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -468,11 +460,7 @@ sfindloc1_s1 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/findloc1_s4.c b/libgfortran/generated/findloc1_s4.c index 641ca7fa58a..7b5a020d314 100644 --- a/libgfortran/generated/findloc1_s4.c +++ b/libgfortran/generated/findloc1_s4.c @@ -107,11 +107,7 @@ findloc1_s4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -295,11 +291,7 @@ mfindloc1_s4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -468,11 +460,7 @@ sfindloc1_s4 (gfc_array_index_type * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index 2236f044e65..2a3e52b9983 100644 --- a/libgfortran/generated/iall_i1.c +++ b/libgfortran/generated/iall_i1.c @@ -106,12 +106,7 @@ iall_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iall_i16.c b/libgfortran/generated/iall_i16.c index 96ca5a57c9c..d7bdc55623a 100644 --- a/libgfortran/generated/iall_i16.c +++ b/libgfortran/generated/iall_i16.c @@ -106,12 +106,7 @@ iall_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miall_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siall_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iall_i2.c b/libgfortran/generated/iall_i2.c index 4d895db2b35..ceaaf153efe 100644 --- a/libgfortran/generated/iall_i2.c +++ b/libgfortran/generated/iall_i2.c @@ -106,12 +106,7 @@ iall_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miall_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siall_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iall_i4.c b/libgfortran/generated/iall_i4.c index 673e9809483..face5d95cc1 100644 --- a/libgfortran/generated/iall_i4.c +++ b/libgfortran/generated/iall_i4.c @@ -106,12 +106,7 @@ iall_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miall_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siall_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iall_i8.c b/libgfortran/generated/iall_i8.c index 4de6ff1782d..7e47c3b8663 100644 --- a/libgfortran/generated/iall_i8.c +++ b/libgfortran/generated/iall_i8.c @@ -106,12 +106,7 @@ iall_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miall_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siall_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iany_i1.c b/libgfortran/generated/iany_i1.c index ab191d6bdd2..e152ffe85da 100644 --- a/libgfortran/generated/iany_i1.c +++ b/libgfortran/generated/iany_i1.c @@ -106,12 +106,7 @@ iany_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miany_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siany_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iany_i16.c b/libgfortran/generated/iany_i16.c index 8fda0efea82..bd775b8216b 100644 --- a/libgfortran/generated/iany_i16.c +++ b/libgfortran/generated/iany_i16.c @@ -106,12 +106,7 @@ iany_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miany_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siany_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iany_i2.c b/libgfortran/generated/iany_i2.c index 43080b85992..956fbdb4797 100644 --- a/libgfortran/generated/iany_i2.c +++ b/libgfortran/generated/iany_i2.c @@ -106,12 +106,7 @@ iany_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miany_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siany_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iany_i4.c b/libgfortran/generated/iany_i4.c index d8430ca4e90..fef7d65b691 100644 --- a/libgfortran/generated/iany_i4.c +++ b/libgfortran/generated/iany_i4.c @@ -106,12 +106,7 @@ iany_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miany_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siany_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iany_i8.c b/libgfortran/generated/iany_i8.c index 7d3ac16412d..5ddca1f8642 100644 --- a/libgfortran/generated/iany_i8.c +++ b/libgfortran/generated/iany_i8.c @@ -106,12 +106,7 @@ iany_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miany_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siany_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iparity_i1.c b/libgfortran/generated/iparity_i1.c index 53b15cbb73f..8076d05ebd6 100644 --- a/libgfortran/generated/iparity_i1.c +++ b/libgfortran/generated/iparity_i1.c @@ -106,12 +106,7 @@ iparity_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miparity_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siparity_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iparity_i16.c b/libgfortran/generated/iparity_i16.c index 848ac6284fb..49907fe7cf4 100644 --- a/libgfortran/generated/iparity_i16.c +++ b/libgfortran/generated/iparity_i16.c @@ -106,12 +106,7 @@ iparity_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miparity_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siparity_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iparity_i2.c b/libgfortran/generated/iparity_i2.c index f435fd27edd..58703bc991b 100644 --- a/libgfortran/generated/iparity_i2.c +++ b/libgfortran/generated/iparity_i2.c @@ -106,12 +106,7 @@ iparity_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miparity_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siparity_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iparity_i4.c b/libgfortran/generated/iparity_i4.c index ea876bdd31a..051dd360c1a 100644 --- a/libgfortran/generated/iparity_i4.c +++ b/libgfortran/generated/iparity_i4.c @@ -106,12 +106,7 @@ iparity_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miparity_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siparity_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/iparity_i8.c b/libgfortran/generated/iparity_i8.c index 0fee2e5025d..90f444e6f96 100644 --- a/libgfortran/generated/iparity_i8.c +++ b/libgfortran/generated/iparity_i8.c @@ -106,12 +106,7 @@ iparity_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ miparity_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ siparity_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_i1.c b/libgfortran/generated/maxloc1_16_i1.c index bc0643cde1e..3a00cd538a0 100644 --- a/libgfortran/generated/maxloc1_16_i1.c +++ b/libgfortran/generated/maxloc1_16_i1.c @@ -109,12 +109,7 @@ maxloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index 5dca85c4bc0..bfb3e6f69e9 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -109,12 +109,7 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_i2.c b/libgfortran/generated/maxloc1_16_i2.c index 118d7c527a1..abe0b89df01 100644 --- a/libgfortran/generated/maxloc1_16_i2.c +++ b/libgfortran/generated/maxloc1_16_i2.c @@ -109,12 +109,7 @@ maxloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index 858dfc0e850..46507045035 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -109,12 +109,7 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index 36469e49797..83ac6a56a6e 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -109,12 +109,7 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index dfc55681b1f..0dec2116b15 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -109,12 +109,7 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index 17daa796afc..1f75f4471ef 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -109,12 +109,7 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_r17.c b/libgfortran/generated/maxloc1_16_r17.c index 46fd4ab320c..31ff83bab4d 100644 --- a/libgfortran/generated/maxloc1_16_r17.c +++ b/libgfortran/generated/maxloc1_16_r17.c @@ -109,12 +109,7 @@ maxloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index b52932f70bf..fea7580b82e 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -109,12 +109,7 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index c26c4b4ed0a..4f2acd645dd 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -109,12 +109,7 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index 54f57238367..44a27ca565a 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -121,12 +121,7 @@ maxloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index eb015eabef2..c4686a7d56f 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -121,12 +121,7 @@ maxloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_i1.c b/libgfortran/generated/maxloc1_4_i1.c index 4b0bd56a60b..0e4c644fc49 100644 --- a/libgfortran/generated/maxloc1_4_i1.c +++ b/libgfortran/generated/maxloc1_4_i1.c @@ -109,12 +109,7 @@ maxloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index d976d2d4b8e..4094c010342 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -109,12 +109,7 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_i2.c b/libgfortran/generated/maxloc1_4_i2.c index ba8228925d4..c552d902243 100644 --- a/libgfortran/generated/maxloc1_4_i2.c +++ b/libgfortran/generated/maxloc1_4_i2.c @@ -109,12 +109,7 @@ maxloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index 644e48e547f..76a71219ff5 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -109,12 +109,7 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index fd5d31b5162..49a05188db4 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -109,12 +109,7 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index 00c90fa3c66..4f1a8e88f16 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -109,12 +109,7 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index 92372b8d837..ecb9c2cca03 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -109,12 +109,7 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_r17.c b/libgfortran/generated/maxloc1_4_r17.c index 10c68752188..a0e43b50b96 100644 --- a/libgfortran/generated/maxloc1_4_r17.c +++ b/libgfortran/generated/maxloc1_4_r17.c @@ -109,12 +109,7 @@ maxloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index b0750c19361..f79c7ffc4e0 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -109,12 +109,7 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index 3be87685eed..c77b72074b3 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -109,12 +109,7 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index 91628645d1c..d1657b82cd8 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -121,12 +121,7 @@ maxloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index 7cb056ea10b..7727c21847c 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -121,12 +121,7 @@ maxloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_i1.c b/libgfortran/generated/maxloc1_8_i1.c index 42b113b1d0c..4ab9d741f15 100644 --- a/libgfortran/generated/maxloc1_8_i1.c +++ b/libgfortran/generated/maxloc1_8_i1.c @@ -109,12 +109,7 @@ maxloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 594c735ad77..817a7770130 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -109,12 +109,7 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_i2.c b/libgfortran/generated/maxloc1_8_i2.c index 9e141af3ecd..57d40b5b52c 100644 --- a/libgfortran/generated/maxloc1_8_i2.c +++ b/libgfortran/generated/maxloc1_8_i2.c @@ -109,12 +109,7 @@ maxloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index b94c627dfd6..451f860495c 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -109,12 +109,7 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index 18e45033b40..5f5dbd48311 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -109,12 +109,7 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index 22cd8c26e1b..78928f83937 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -109,12 +109,7 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index 646fe18a975..5eb1e51d6b2 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -109,12 +109,7 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_r17.c b/libgfortran/generated/maxloc1_8_r17.c index cc6bb86546c..3662425c36b 100644 --- a/libgfortran/generated/maxloc1_8_r17.c +++ b/libgfortran/generated/maxloc1_8_r17.c @@ -109,12 +109,7 @@ maxloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index 2c482bc8ed4..8d697713705 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -109,12 +109,7 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 32452d49ff3..72651d06676 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -109,12 +109,7 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -331,11 +326,7 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -537,11 +528,7 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index 96ac1ac0bd4..97fe4890df6 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -121,12 +121,7 @@ maxloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index 068c4ff7a72..519e4cb6c11 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -121,12 +121,7 @@ maxloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval1_s1.c b/libgfortran/generated/maxval1_s1.c index 6ad5366b8f3..19579023e29 100644 --- a/libgfortran/generated/maxval1_s1.c +++ b/libgfortran/generated/maxval1_s1.c @@ -121,12 +121,7 @@ maxval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -320,11 +315,7 @@ mmaxval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -496,11 +487,7 @@ smaxval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval1_s4.c b/libgfortran/generated/maxval1_s4.c index 6337b043a3e..501e605b033 100644 --- a/libgfortran/generated/maxval1_s4.c +++ b/libgfortran/generated/maxval1_s4.c @@ -121,12 +121,7 @@ maxval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -320,11 +315,7 @@ mmaxval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -496,11 +487,7 @@ smaxval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_i1.c b/libgfortran/generated/maxval_i1.c index 19feced6861..a500d5dd4ff 100644 --- a/libgfortran/generated/maxval_i1.c +++ b/libgfortran/generated/maxval_i1.c @@ -106,12 +106,7 @@ maxval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c index cd75603b066..9833337b553 100644 --- a/libgfortran/generated/maxval_i16.c +++ b/libgfortran/generated/maxval_i16.c @@ -106,12 +106,7 @@ maxval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c index 9c7eb7702e3..d3d4b6adbcb 100644 --- a/libgfortran/generated/maxval_i2.c +++ b/libgfortran/generated/maxval_i2.c @@ -106,12 +106,7 @@ maxval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 40bf1ce97ab..b6c6504825b 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -106,12 +106,7 @@ maxval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index 0b6b9f671ee..418b5b684eb 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -106,12 +106,7 @@ maxval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c index f83c4e9965a..486c16c2f29 100644 --- a/libgfortran/generated/maxval_r10.c +++ b/libgfortran/generated/maxval_r10.c @@ -106,12 +106,7 @@ maxval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c index ec2d7a92be5..dd9b4275494 100644 --- a/libgfortran/generated/maxval_r16.c +++ b/libgfortran/generated/maxval_r16.c @@ -106,12 +106,7 @@ maxval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_r17.c b/libgfortran/generated/maxval_r17.c index 442e2b3a387..feda95e35d0 100644 --- a/libgfortran/generated/maxval_r17.c +++ b/libgfortran/generated/maxval_r17.c @@ -106,12 +106,7 @@ maxval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index 6c08b342752..6e1b4fa61d5 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -106,12 +106,7 @@ maxval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index 30d259f7708..2f78627e5e8 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -106,12 +106,7 @@ maxval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_i1.c b/libgfortran/generated/minloc1_16_i1.c index 80abb3cf8e0..bf3daefbcf9 100644 --- a/libgfortran/generated/minloc1_16_i1.c +++ b/libgfortran/generated/minloc1_16_i1.c @@ -109,12 +109,7 @@ minloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index 388a8f91208..7a7e3433d64 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -109,12 +109,7 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_i2.c b/libgfortran/generated/minloc1_16_i2.c index 51ae92b91fb..c66d21fdc81 100644 --- a/libgfortran/generated/minloc1_16_i2.c +++ b/libgfortran/generated/minloc1_16_i2.c @@ -109,12 +109,7 @@ minloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index 675fc333d52..9138ec417d1 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -109,12 +109,7 @@ minloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index 6a417880a12..c974954e86b 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -109,12 +109,7 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index f5d9c347ef9..3f6c59a8532 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -109,12 +109,7 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index 3405c0e4bef..18cd4c6155e 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -109,12 +109,7 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_r17.c b/libgfortran/generated/minloc1_16_r17.c index e3d0d417e5d..02b252b64e7 100644 --- a/libgfortran/generated/minloc1_16_r17.c +++ b/libgfortran/generated/minloc1_16_r17.c @@ -109,12 +109,7 @@ minloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_r17 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index 8af09702f5c..b6d5e53c8fe 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -109,12 +109,7 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index 9397dc6ff91..6b879bf7c9d 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -109,12 +109,7 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index c6d8861a5f4..d6c41c967ab 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -121,12 +121,7 @@ minloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index 0f5eb2db869..ef67757329f 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -121,12 +121,7 @@ minloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_i1.c b/libgfortran/generated/minloc1_4_i1.c index 4274e70dc92..79843660216 100644 --- a/libgfortran/generated/minloc1_4_i1.c +++ b/libgfortran/generated/minloc1_4_i1.c @@ -109,12 +109,7 @@ minloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index ded68f0b0fb..0c1170a2234 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -109,12 +109,7 @@ minloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_i2.c b/libgfortran/generated/minloc1_4_i2.c index a053dd352e5..3bc567c44eb 100644 --- a/libgfortran/generated/minloc1_4_i2.c +++ b/libgfortran/generated/minloc1_4_i2.c @@ -109,12 +109,7 @@ minloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index 6292fc2d9b7..7d82a18d757 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -109,12 +109,7 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 9240e3fe5bd..cb6836bb32b 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -109,12 +109,7 @@ minloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index 42a9de0b6d0..e7f1a1cd446 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -109,12 +109,7 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index 06193f13598..c0938cd715e 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -109,12 +109,7 @@ minloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_r17.c b/libgfortran/generated/minloc1_4_r17.c index d021d46b9fa..a2b8ad2fb03 100644 --- a/libgfortran/generated/minloc1_4_r17.c +++ b/libgfortran/generated/minloc1_4_r17.c @@ -109,12 +109,7 @@ minloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_r17 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index e6990c6e70e..c55ab25d2f2 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -109,12 +109,7 @@ minloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index fd1574f6413..8c149a87ef6 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -109,12 +109,7 @@ minloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index 5bbc844e196..54a656e9649 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -121,12 +121,7 @@ minloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index 4f2ab20ab9f..fedddac374c 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -121,12 +121,7 @@ minloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index 1b8b24064d9..17f2e0cbab2 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -109,12 +109,7 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index 9561270e150..be829bc255b 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -109,12 +109,7 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_i2.c b/libgfortran/generated/minloc1_8_i2.c index 979856579f9..9a3c8e87858 100644 --- a/libgfortran/generated/minloc1_8_i2.c +++ b/libgfortran/generated/minloc1_8_i2.c @@ -109,12 +109,7 @@ minloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index 1c303ed6dea..47c8547bdb9 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -109,12 +109,7 @@ minloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 6249f20ae62..ca2546699f6 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -109,12 +109,7 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index 2c6a0fd8a58..e4103588f49 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -109,12 +109,7 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index f7d06648c37..db9c163dd14 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -109,12 +109,7 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_r17.c b/libgfortran/generated/minloc1_8_r17.c index 0cc70c439d0..65241e7b19e 100644 --- a/libgfortran/generated/minloc1_8_r17.c +++ b/libgfortran/generated/minloc1_8_r17.c @@ -109,12 +109,7 @@ minloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_r17 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index b2ae3dfcc06..f76e79d857a 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -109,12 +109,7 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index bafd72d0893..730774e910c 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -109,12 +109,7 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -341,11 +336,7 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -547,11 +538,7 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 8a40b52a188..188a8963a78 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -121,12 +121,7 @@ minloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index 906d1df9a2e..f7930de0643 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -121,12 +121,7 @@ minloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -324,11 +319,7 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -503,11 +494,7 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval1_s1.c b/libgfortran/generated/minval1_s1.c index d83fef19d3c..859530f16e5 100644 --- a/libgfortran/generated/minval1_s1.c +++ b/libgfortran/generated/minval1_s1.c @@ -121,12 +121,7 @@ minval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -320,11 +315,7 @@ mminval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -496,11 +487,7 @@ sminval1_s1 (gfc_array_s1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval1_s4.c b/libgfortran/generated/minval1_s4.c index 5ef09cdeebb..d6b5ab6d359 100644 --- a/libgfortran/generated/minval1_s4.c +++ b/libgfortran/generated/minval1_s4.c @@ -121,12 +121,7 @@ minval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -320,11 +315,7 @@ mminval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -496,11 +487,7 @@ sminval1_s4 (gfc_array_s4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_i1.c b/libgfortran/generated/minval_i1.c index 544a996a01c..5972e6c2164 100644 --- a/libgfortran/generated/minval_i1.c +++ b/libgfortran/generated/minval_i1.c @@ -106,12 +106,7 @@ minval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c index 1bcdf58792a..28053b9606b 100644 --- a/libgfortran/generated/minval_i16.c +++ b/libgfortran/generated/minval_i16.c @@ -106,12 +106,7 @@ minval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_i2.c b/libgfortran/generated/minval_i2.c index 61801f163f2..8284243db7f 100644 --- a/libgfortran/generated/minval_i2.c +++ b/libgfortran/generated/minval_i2.c @@ -106,12 +106,7 @@ minval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index 019a880e2ab..fb838536371 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -106,12 +106,7 @@ minval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index abbbd06da07..c43d13eef4f 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -106,12 +106,7 @@ minval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c index d5b9d76d9e6..b28522a60fa 100644 --- a/libgfortran/generated/minval_r10.c +++ b/libgfortran/generated/minval_r10.c @@ -106,12 +106,7 @@ minval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c index 9fdde79f4fc..75eb72b3347 100644 --- a/libgfortran/generated/minval_r16.c +++ b/libgfortran/generated/minval_r16.c @@ -106,12 +106,7 @@ minval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_r17.c b/libgfortran/generated/minval_r17.c index 3e75af04b2d..c3731489d8d 100644 --- a/libgfortran/generated/minval_r17.c +++ b/libgfortran/generated/minval_r17.c @@ -106,12 +106,7 @@ minval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index f096473e5ad..24d132ac0d1 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -106,12 +106,7 @@ minval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 8fafc3c1869..c44a273f79e 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -106,12 +106,7 @@ minval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -317,11 +312,7 @@ mminval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -508,11 +499,7 @@ sminval_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/norm2_r10.c b/libgfortran/generated/norm2_r10.c index c844ade8b21..8afad2fe16e 100644 --- a/libgfortran/generated/norm2_r10.c +++ b/libgfortran/generated/norm2_r10.c @@ -109,12 +109,7 @@ norm2_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/norm2_r16.c b/libgfortran/generated/norm2_r16.c index 0d4f8deb15d..88ed972d75f 100644 --- a/libgfortran/generated/norm2_r16.c +++ b/libgfortran/generated/norm2_r16.c @@ -117,12 +117,7 @@ norm2_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/norm2_r17.c b/libgfortran/generated/norm2_r17.c index 5a69e52bcd0..9cef5cb3cc0 100644 --- a/libgfortran/generated/norm2_r17.c +++ b/libgfortran/generated/norm2_r17.c @@ -115,12 +115,7 @@ norm2_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/norm2_r4.c b/libgfortran/generated/norm2_r4.c index 2e023f08668..16e0e962f74 100644 --- a/libgfortran/generated/norm2_r4.c +++ b/libgfortran/generated/norm2_r4.c @@ -109,12 +109,7 @@ norm2_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/norm2_r8.c b/libgfortran/generated/norm2_r8.c index 5494eaef284..5462f6186d2 100644 --- a/libgfortran/generated/norm2_r8.c +++ b/libgfortran/generated/norm2_r8.c @@ -109,12 +109,7 @@ norm2_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/parity_l1.c b/libgfortran/generated/parity_l1.c index e8ee6bd3bac..731b862091a 100644 --- a/libgfortran/generated/parity_l1.c +++ b/libgfortran/generated/parity_l1.c @@ -106,12 +106,7 @@ parity_l1 (gfc_array_l1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/parity_l16.c b/libgfortran/generated/parity_l16.c index 03707a234ad..3dd883e328b 100644 --- a/libgfortran/generated/parity_l16.c +++ b/libgfortran/generated/parity_l16.c @@ -106,12 +106,7 @@ parity_l16 (gfc_array_l16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/parity_l2.c b/libgfortran/generated/parity_l2.c index 00aa0245ed0..90cc272ffe0 100644 --- a/libgfortran/generated/parity_l2.c +++ b/libgfortran/generated/parity_l2.c @@ -106,12 +106,7 @@ parity_l2 (gfc_array_l2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/parity_l4.c b/libgfortran/generated/parity_l4.c index 08a1e433ad9..108755982bf 100644 --- a/libgfortran/generated/parity_l4.c +++ b/libgfortran/generated/parity_l4.c @@ -106,12 +106,7 @@ parity_l4 (gfc_array_l4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/parity_l8.c b/libgfortran/generated/parity_l8.c index a55e221c72c..8e3ddaae666 100644 --- a/libgfortran/generated/parity_l8.c +++ b/libgfortran/generated/parity_l8.c @@ -106,12 +106,7 @@ parity_l8 (gfc_array_l8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c index 7ecd80e3346..b97353e1de9 100644 --- a/libgfortran/generated/product_c10.c +++ b/libgfortran/generated/product_c10.c @@ -106,12 +106,7 @@ product_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c index e1d0c932a08..1538f605d58 100644 --- a/libgfortran/generated/product_c16.c +++ b/libgfortran/generated/product_c16.c @@ -106,12 +106,7 @@ product_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_c17.c b/libgfortran/generated/product_c17.c index 2ed08b31f1e..fba33932d71 100644 --- a/libgfortran/generated/product_c17.c +++ b/libgfortran/generated/product_c17.c @@ -106,12 +106,7 @@ product_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index dbf00aacf7a..d46eb696814 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -106,12 +106,7 @@ product_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index 1a3f27d329e..ffdc538f12f 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -106,12 +106,7 @@ product_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c index 35f4f6ec804..d2abb955c97 100644 --- a/libgfortran/generated/product_i1.c +++ b/libgfortran/generated/product_i1.c @@ -106,12 +106,7 @@ product_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c index 3b815036f4f..9217c1265f1 100644 --- a/libgfortran/generated/product_i16.c +++ b/libgfortran/generated/product_i16.c @@ -106,12 +106,7 @@ product_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c index e998c0d59c3..4287fa79868 100644 --- a/libgfortran/generated/product_i2.c +++ b/libgfortran/generated/product_i2.c @@ -106,12 +106,7 @@ product_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index 7dbc77aff9f..0c8d50901bd 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -106,12 +106,7 @@ product_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index aaa688b69ff..555b9cd26f8 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -106,12 +106,7 @@ product_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c index 8a7dba54fdd..5271f55a98e 100644 --- a/libgfortran/generated/product_r10.c +++ b/libgfortran/generated/product_r10.c @@ -106,12 +106,7 @@ product_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c index 38c9922ed9b..6a7c8506490 100644 --- a/libgfortran/generated/product_r16.c +++ b/libgfortran/generated/product_r16.c @@ -106,12 +106,7 @@ product_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_r17.c b/libgfortran/generated/product_r17.c index 37ed80c9d3a..2103ec4da7f 100644 --- a/libgfortran/generated/product_r17.c +++ b/libgfortran/generated/product_r17.c @@ -106,12 +106,7 @@ product_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index 616fd5be89d..f413cf0fc1e 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -106,12 +106,7 @@ product_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index c4b710dfc6f..6d98fcae2eb 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -106,12 +106,7 @@ product_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ sproduct_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c index 6de84a7e2ea..fa8d28d68b4 100644 --- a/libgfortran/generated/sum_c10.c +++ b/libgfortran/generated/sum_c10.c @@ -106,12 +106,7 @@ sum_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_c10 (gfc_array_c10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c index 96fc8882902..78dbb88ed79 100644 --- a/libgfortran/generated/sum_c16.c +++ b/libgfortran/generated/sum_c16.c @@ -106,12 +106,7 @@ sum_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_c16 (gfc_array_c16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_c17.c b/libgfortran/generated/sum_c17.c index 1472fe57733..a392a09da32 100644 --- a/libgfortran/generated/sum_c17.c +++ b/libgfortran/generated/sum_c17.c @@ -106,12 +106,7 @@ sum_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_c17 (gfc_array_c17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index 250aa416cb3..0da74be9a61 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -106,12 +106,7 @@ sum_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_c4 (gfc_array_c4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 510a25847ac..8d7e18c897c 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -106,12 +106,7 @@ sum_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_c8 (gfc_array_c8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c index 974522b3bbf..387fde4a473 100644 --- a/libgfortran/generated/sum_i1.c +++ b/libgfortran/generated/sum_i1.c @@ -106,12 +106,7 @@ sum_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_i1 (gfc_array_i1 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c index 00f644bff71..da33649514e 100644 --- a/libgfortran/generated/sum_i16.c +++ b/libgfortran/generated/sum_i16.c @@ -106,12 +106,7 @@ sum_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_i16 (gfc_array_i16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_i2.c b/libgfortran/generated/sum_i2.c index 448273594f4..9e49cf5586c 100644 --- a/libgfortran/generated/sum_i2.c +++ b/libgfortran/generated/sum_i2.c @@ -106,12 +106,7 @@ sum_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_i2 (gfc_array_i2 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index 529fb2e94a0..69e31f1d67b 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -106,12 +106,7 @@ sum_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_i4 (gfc_array_i4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 7b7ca72aa71..b8c86449df9 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -106,12 +106,7 @@ sum_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_i8 (gfc_array_i8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c index 71e71dd91f0..daba1023cb9 100644 --- a/libgfortran/generated/sum_r10.c +++ b/libgfortran/generated/sum_r10.c @@ -106,12 +106,7 @@ sum_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_r10 (gfc_array_r10 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c index 813cc33dd90..55a4c1f99ec 100644 --- a/libgfortran/generated/sum_r16.c +++ b/libgfortran/generated/sum_r16.c @@ -106,12 +106,7 @@ sum_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_r16 (gfc_array_r16 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_r17.c b/libgfortran/generated/sum_r17.c index 8e82e871bb2..519526f53ad 100644 --- a/libgfortran/generated/sum_r17.c +++ b/libgfortran/generated/sum_r17.c @@ -106,12 +106,7 @@ sum_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_r17 (gfc_array_r17 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_17)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index 1b37711b99f..b8cb0a88ca3 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -106,12 +106,7 @@ sum_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_r4 (gfc_array_r4 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index 294211ba9be..6299b5d32c9 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -106,12 +106,7 @@ sum_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -303,11 +298,7 @@ msum_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -466,11 +457,7 @@ ssum_r8 (gfc_array_r8 * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/m4/ifindloc1.m4 b/libgfortran/m4/ifindloc1.m4 index a1c5be6848d..68a39f326d4 100644 --- a/libgfortran/m4/ifindloc1.m4 +++ b/libgfortran/m4/ifindloc1.m4 @@ -97,11 +97,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -275,11 +271,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -438,11 +430,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index 72793e435aa..8275f6568c4 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -109,12 +109,7 @@ void retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -305,11 +300,7 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -467,11 +458,7 @@ s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/m4/ifunction-s2.m4 b/libgfortran/m4/ifunction-s2.m4 index b936d7c392c..4189dd9e2d8 100644 --- a/libgfortran/m4/ifunction-s2.m4 +++ b/libgfortran/m4/ifunction-s2.m4 @@ -111,12 +111,7 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -306,11 +301,7 @@ void retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -468,11 +459,7 @@ void retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index f3ab4ebd58d..8e32d49218b 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -96,12 +96,7 @@ name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - - } + return; } else { @@ -293,11 +288,7 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { @@ -455,11 +446,7 @@ void retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else { diff --git a/libgfortran/m4/ifunction_logical.m4 b/libgfortran/m4/ifunction_logical.m4 index cb576f3472e..5fd776368b3 100644 --- a/libgfortran/m4/ifunction_logical.m4 +++ b/libgfortran/m4/ifunction_logical.m4 @@ -93,11 +93,7 @@ name`'rtype_qual`_'atype_code (rtype * const restrict retarray, retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name)); if (alloc_size == 0) - { - /* Make sure we have a zero-sized array. */ - GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1); - return; - } + return; } else {