From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by sourceware.org (Postfix) with ESMTPS id 3BD5C3851406 for ; Wed, 12 Oct 2022 11:05:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BD5C3851406 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([86.215.174.255]) by smtp.orange.fr with ESMTPA id iZYZoGNvV94emiZYeo6Zbt; Wed, 12 Oct 2022 13:05:55 +0200 X-ME-Helo: [192.168.1.17] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Wed, 12 Oct 2022 13:05:55 +0200 X-ME-IP: 86.215.174.255 Message-ID: <93c0f66e-1eeb-3e3d-8345-48c17784e030@orange.fr> Date: Wed, 12 Oct 2022 13:05:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] Fortran: check types of operands of arithmetic binary operations [PR107217] To: Harald Anlauf , fortran , gcc-patches References: Content-Language: fr, 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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham 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 11/10/2022 à 22:23, Harald Anlauf via Fortran a écrit : > Dear all, > > we need to check that the operands of arithmetic binary operations > are consistent and of numeric type. > > The PR reported an issue for multiplication ("*"), but we better > extend this to the other binary operations. > > I chose the following solution: > - consistent types for +,-,*,/, keeping an internal error if any > unhandled type shows up, I thought it was insufficient for cases where types are consistent but invalid, for example: print *, [real :: ([.true.])] / [real :: ([.false.])] but this case is properly caught, and a few other as well, so no problem. > - numeric types for ** > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > Yes, thanks.