From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64A643858C3A; Wed, 6 Oct 2021 18:56:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64A643858C3A From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101104] test case gcc.c-torture/execute/ieee/cdivchkld.c fails Date: Wed, 06 Oct 2021 18:56:41 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: Wed, 06 Oct 2021 18:56:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101104 --- Comment #14 from Segher Boessenkool --- (In reply to Patrick McGehearty from comment #13) > I may be mistaken about the source of the issue being glibc. > Perhaps it is a system include file issue? Here are some > more details. >=20 > Here are some of the error messages I got when building with > __LIBGCC_KF_MAX__ of gcc135.fsffrance.org using the installed > gcc (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)) >=20 > - - - - - - > ../../../libgcc/config/rs6000/_divkc3.c: In function =E2=80=98__divkc3=E2= =80=99: > ../../../libgcc/config/rs6000/_divkc3.c:41:17: error:=20 > =E2=80=98__LIBGCC_KF_MAX__=E2=80=99 undeclared (first use in this functio= n) > =C2=A0=C2=A0 41 | #define RBIG=C2=A0=C2=A0 (__LIBGCC_KF_MAX__ / 2) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~~ > ../../../libgcc/config/rs6000/_divkc3.c:68:23: note: in expansion of=20 > macro =E2=80=98RBIG=E2=80=99 > =C2=A0=C2=A0 68 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (FABS (d) >=3D = RBIG) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ^~~~ > ... repeated for =E2=80=98__LIBGCC_KF_EPSILON__ and __LIBGCC_KF_MIN__ > - - - - - - This is defined be GCC itself. But not in the configuration you built. This requires VSX (currently). The problem is in the _divkc3.c code. > __LIBGCC_KF_MAX__ should have been defined in the file=20 > gcc/c-family/c-cppbuiltin.c > in the loop starting at line 1274: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Properties of floating-point modes for= libgcc2.c.=C2=A0 */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 opt_scalar_float_mode mode_iter; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 FOR_EACH_MODE_IN_CLASS (mode_iter, MODE_F= LOAT) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 scalar_float_mode= mode =3D mode_iter.require (); The mode does not exist in this config. The macro should not have been defined. > KF is not available with this particular compiler/glibc=20 > combination. KF is not available if you use -mno-vsx. This is the default in most configurations. > I did some digging in the latest sources and could not find a specific fi= le > which defined KF, TF, IF, etc. I assume it exists and I just did not=20 > look in the > right places. rs6000-modes.def . You need TARGET_FLOAT128_TYPE set to be able to use it; you normally get TARGET_FLOAT128_TYPE =3D TARGET_FLOAT128_ENABLE_TYPE && TARGET_VSX; > In any case, it is moot since Joseph Myers stated that I should not=20 > include the > "if compiling for ibm doubledouble" code in _divkc3.c because _divkc3.c=20 > is only > used for ieee128 code. Since he is the one who guided me in my changes=20 > to c-cppbuiltin.c, > I assume he knows more than I on this topic. Ah :-) That is essential context. I did not know you hadn't done this yet= .=