From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 120B83857706; Tue, 5 Dec 2023 10:57:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 120B83857706 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 120B83857706 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701773874; cv=none; b=O0w9wYbTu/JU4D9T5xsiJWHX+uvTyNo8MdykMSnTfTfc6MzILy1q2s2iFOsQg3W7jt8uvkK0e/nnj/XUT33IgrvuZvbyuIne6TFcOL3ygpdQYRH37SshRYx4jIUlJ89eCpYtsYU+jNiT88Z0mIDLsz2i/NNg4Sru/C5+G/nPQ2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701773874; c=relaxed/simple; bh=eIyW3c5/Pwgb4oZgvEa7MDGQftU3JiU1m35meQY9xn0=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=oGlZCf4+vYtA8UtRKxsrBQ3U0wYdh7y77bIOICg+4LFYK+y/Y+uNZtMX4d+hqTAUfO1g4TSk+kb13HT60rmsrFREKaG/mBKJdiZj7UJ3zzjWJvGwoN45CTjpQERR0y+Z816R5UTV5AOq/FOFMAPZ+jI1vg/IJ/q1PJZ/hMMPXr0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5AB15139F; Tue, 5 Dec 2023 02:58:39 -0800 (PST) Received: from [10.57.5.1] (unknown [10.57.5.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E02F33F5A1; Tue, 5 Dec 2023 02:57:51 -0800 (PST) Message-ID: <55c954b8-65c3-4df2-ac76-1ab77f42006f@foss.arm.com> Date: Tue, 5 Dec 2023 10:57:50 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] libgfortran: Fix -Wincompatible-pointer-types errors Content-Language: en-GB To: Jakub Jelinek Cc: Tobias Burnus , Florian Weimer , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org References: <9e40a64880a14cf27d788ecbaf23365b9a5ac069.1700473918.git.fweimer@redhat.com> <87zfypvv6t.fsf@oldenburg.str.redhat.com> <8ba09ce2-9b19-4fd2-9d3a-01c4add02c91@foss.arm.com> From: Richard Earnshaw In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3489.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On 05/12/2023 10:51, Jakub Jelinek wrote: > On Tue, Dec 05, 2023 at 10:47:34AM +0000, Richard Earnshaw wrote: >>> The following patch makes libgfortran build on i686-linux after hacking up >>> --- kinds.h.xx 2023-12-05 00:23:00.133365064 +0100 >>> +++ kinds.h 2023-12-05 11:19:24.409679808 +0100 >>> @@ -10,8 +10,8 @@ typedef GFC_INTEGER_2 GFC_LOGICAL_2; >>> #define HAVE_GFC_LOGICAL_2 >>> #define HAVE_GFC_INTEGER_2 >>> -typedef int32_t GFC_INTEGER_4; >>> -typedef uint32_t GFC_UINTEGER_4; >>> +typedef long GFC_INTEGER_4; >>> +typedef unsigned long GFC_UINTEGER_4; >> >> That doesn't look right for a 64-bit processor. Presumably 4 means 4 bytes, > > i686-linux is an ILP32 target, which I chose exactly because I regularly build > it, had a tree with it around and because unlike 64-bit targets there are 2 > standard 32-bit signed integer types. Though, normally int32_t there is > int rather than long int and so the errors only appeared after this hack. > My point is that on aarch64/x86_64 etc, this will make GFC_INTEGER_4 a 64-bit type, whereas previously it was 32-bit. R. > Jakub >