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 D99A53858D32; Tue, 5 Dec 2023 17:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D99A53858D32 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 D99A53858D32 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=1701797736; cv=none; b=Fbsew1hPR+Z7sd+srLHjU2ARz3QeS3hGdgvLodfsvF8YRK33m2bUGUwx8ixaVKJaXYbjgACp1AGwRz1vXgmIaB9BhDdjckGQjWWQQUMu9AYnV5UEr5SjZqhSdA6FavwWW62BcnUj59mJQMh4ffGiP+PrfpXzhMkuugQRjRB3FaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701797736; c=relaxed/simple; bh=Ak7S/o7SVGo9kxYBg5BdEMiB2UEY4MHG+i3JJy6WXe4=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=UdK7kWG98kHErCNzWAx+a+rqC12O0Pb1lPuFTxT4GyAUGDyMm/wFbaMmlCksRFgNrIuThp6lHY5EiBmEgCyJAMPUiREwNzePm9qzge/s3SGQuXA9k5FcjijLHhYKetBM6oeP1kFsiSIay5u5vyTaY3ItbwjbGVJpid6tqcC/Tys= 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 019E1139F; Tue, 5 Dec 2023 09:36:22 -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 5B8783F5A1; Tue, 5 Dec 2023 09:35:34 -0800 (PST) Message-ID: <13145eaf-fea2-4582-b8bb-39efee8a4a4e@foss.arm.com> Date: Tue, 5 Dec 2023 17:35:32 +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> <55c954b8-65c3-4df2-ac76-1ab77f42006f@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:59, Jakub Jelinek wrote: > On Tue, Dec 05, 2023 at 10:57:50AM +0000, Richard Earnshaw wrote: >> 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. > > Sure. The above patch is a hack for a generated header. I'm not proposing > that as a change, just explaining how I've verified the actual patch on > i686-linux with such a hack. > > Jakub > Ah, I understand now. I've successfully built arm and aarch64 cross toolchains with this patch (newlib). So LGTM, thanks. R.