From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 00D76385802B for ; Mon, 11 Jan 2021 16:21:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 00D76385802B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: FA1nKSFvqFgCPOsHjTOmwpF4Jir6BiuZsPM6RviblkGvoup7s+pMGGkENr6Aq5WH841oQLEcpc 1F005UFhtLRPAc6xmdgJ7h/Oqy07wQzwqkfS0510ufynFohGQa4wECUDEG73V6f3noiBC8ukWg eCnPq3t779JjiqXjKHtlhTtHIaFy0YIY3tqava5PeOCNqkUZNmySpFggIjhamo9aKFnWFIITQk oQPx4tjxmmPQtoci0s4AHDCCavtdfSemRCTWWudiAeLCazBEoaBHqHa9dbEDbPvXI4d5Ftm+/D YhU= X-IronPort-AV: E=Sophos;i="5.79,338,1602576000"; d="scan'208";a="56952569" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 11 Jan 2021 08:21:20 -0800 IronPort-SDR: zh0SG07lffNRO4F/LVIYRrBO8wMfOhIUgmKwpUH8AQSV0WHzbV1YkesbegI3RJyKRbcyhxuoJn kmib1yiL52M4evx9jqaIPV5S7FiN4d+szrG2ZoFcg5EoLhvEW9ZhwPJbGN+ezOs3yD1cU/tEE7 HUi98ICeRJ6zqlHp9ECZcZsDdv2bzhGHAhbOqWQKyhB3Ccn+9wHGYHphl8hbd56CJoap46zNY/ wkU1/b/JWvV7EO7hii9iKYi6TBkfQ9laKFYiK53T1f1F6E++bGp50bPDsJ77UcUya8KjtTopKW iSs= Subject: Re: Possible bug re: ISO_Fortran_binding.h To: Harris Snyder CC: References: <9083d771-7ca5-472f-93a7-f6e4adc9687d@codesourcery.com> From: Tobias Burnus Message-ID: <9d207d0d-5ee9-5578-78fa-dc94373ab80e@codesourcery.com> Date: Mon, 11 Jan 2021 17:21:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 16:21:23 -0000 Hi Harris, On 11.01.21 16:42, Harris Snyder wrote: > As for the site of the issue, > libgfortran/runtime/ISO_Fortran_binding.c, circa line 348: > > if (type =3D=3D CFI_type_char || type =3D=3D CFI_type_ucs4_char || > type =3D=3D CFI_type_signed_char || type =3D=3D CFI_type_struct || > type =3D=3D CFI_type_other) > dv->elem_len =3D elem_len; > [...] > So we're clearly using elem_len for signed char types and therefore > int8_t. In light of your comments above about how signed char is > supposed to be an integer type, what about simply removing > CFI_type_signed_char from the alternates in the if statement? Seems as if you found the fix for issue yourself. I added a link to this thread to https://gcc.gnu.org/PR93524 Thanks for the testcase and digging. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstra=C3=9Fe 201, 80634 M=C3=BCnch= en / Germany Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas = Heurung, Alexander Walter