From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDB473858C60; Thu, 3 Mar 2022 15:34:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDB473858C60 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99708] __SIZEOF_FLOAT128__ not defined on powerpc64le-linux Date: Thu, 03 Mar 2022 15:34:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2022 15:35:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99708 --- Comment #8 from Jonathan Wakely --- It looks like trunk now defines __SIZEOF_FLOAT128__ on powerpc-ibm-aix* and powerpc64*-*-linux-gnu, but it seems to be defined unconditionally, even if= the __float128 type *isn't* available! On power8-aix (e.g. gcc119 in the cfarm): ./gcc/cc1plus -E -dM /dev/null -quiet -maix64 | fgrep FLOAT128#define __SIZEOF_FLOAT128__ 16 ./gcc/cc1plus - -quiet <<< '__float128 f;' :1:1: error: '__float128' does not name a type; did you mean '__int1= 28'? You need to add -mfloat128 -mvsx to be able to use the type. On power8 ppc64le linux (e.g. gcc112 in the cfarm): ./gcc/cc1plus -E -dM /dev/null -quiet | fgrep FLOAT128 #define __FLOAT128__ 1 #define __SIZEOF_FLOAT128__ 16 #define __FLOAT128_TYPE__ 1 That's fine, the type is usable. But for power7 ppc64 (BE) linux (e.g. gcc110 in the cfarm): ./gcc/cc1plus -E -dM /dev/null -quiet | fgrep FLOAT128 #define __SIZEOF_FLOAT128__ 16 That means __SIZEOF_FLOAT128__ still can't be used to detect whether a type called "__float128" is supported for the current target. On power it looks like we can use __FLOAT128__ for that purpose, but other targets such as x86 don't define that one, only __SIZEOF_FLOAT128__. So you have to use a different macro to detect __float128 depending on the target.=