From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by sourceware.org (Postfix) with ESMTPS id 0FDAD38582BD for ; Fri, 1 Sep 2023 08:41:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FDAD38582BD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.15] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id bziXqMvi02RGjbzieqvR8r; Fri, 01 Sep 2023 10:41:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1693557693; bh=1W+UQZ/h8IGhr1z8ApR5icIHh48K1SeMp3Q0+9LTexY=; h=Date:Subject:To:References:From:In-Reply-To; b=EQDXYK75FL4W2g1chMSobK0nqlfQyG8OEnnF2wz3b9eBB2Jk0cSSg0JQ6DBZpSrIn adRbjY/eWoFezTaykOaRs5hP0ryvVawlfCdb3YNUhW7Ux3oi2KK2d699luevNx+KXb 0DrcQ6n1l2P+NgKuMNgmqfjHVDe62/vog44mF8guGC9JYiXlO6UcOWPJGBjs9H2318 uHMbqMQGJwFhElNkTXubK8t0zQCZi4YO8Pp/o1YacMHXVgj0uQVWvBfwX/KxzQKjje NGi5uqd/7F6b3px+SEVpWx7kqZ0V91DYJuGgw/JbmTctYUAgPhEUs5epxbCNV1vgau Hxsphzrk9D9nQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Fri, 01 Sep 2023 10:41:33 +0200 X-ME-IP: 86.215.161.51 Message-ID: Date: Fri, 1 Sep 2023 10:41:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fortran: runtime bounds-checking in presence of array constructors [PR31059] To: Harald Anlauf , fortran , gcc-patches References: Content-Language: en-US From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Le 31/08/2023 à 22:42, Harald Anlauf via Fortran a écrit : > Dear all, > > gfortran's array bounds-checking code does a mostly reasonable > job for array sections in expressions and assignments, but > forgot the case that (rank-1) expressions can involve array > constructors, which have a shape ;-) > > The attached patch walks over the loops generated by the > scalarizer, checks for the presence of a constructor, and > takes the first shape found as reference. (If several > constructors are present, discrepancies in their shape > seems to be already detected at compile time). > > For more details on what will be caught now see testcase. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > This is OK. May I suggest to handle functions the same way? Thanks. > Thanks, > Harald >