public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) Date: Fri, 22 Apr 2022 02:33:15 +0000 [thread overview] Message-ID: <bug-105334-4-7DqosIfo8z@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105334-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105334 --- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> --- Oops, sorry that I just verified the original case in PR103623 previously, missed to find it doesn't have pack bif. Maybe we could add one test case to cover both unpack and pack ICEs, such as: $cat gcc/testsuite/gcc.target/powerpc/pr105334.c /* { dg-skip-if "" { powerpc*-*-darwin* } } */ /* { dg-options "-mlong-double-128 -msoft-float" } */ /* Verify there is no ICE. */ #include <stddef.h> #include <stdlib.h> #include <math.h> #if defined(__LONG_DOUBLE_IEEE128__) /* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of long double, and to use the appropriate pack/unpack routines. We can't use __ibm128 on systems that don't support IEEE 128-bit floating point, because the type is not enabled on those systems. */ #define PACK __builtin_pack_ibm128 #define UNPACK __builtin_unpack_ibm128 #define LDOUBLE __ibm128 #elif defined(__LONG_DOUBLE_IBM128__) #define PACK __builtin_pack_longdouble #define UNPACK __builtin_unpack_longdouble #define LDOUBLE long double #else #error "long double must be either IBM 128-bit or IEEE 128-bit" #endif extern LDOUBLE bar (LDOUBLE); int main (void) { double high = pow (2.0, 60); double low = 2.0; LDOUBLE a = ((LDOUBLE) high) + ((LDOUBLE) low); double x0 = UNPACK (a, 0); double x1 = UNPACK (a, 1); LDOUBLE b = PACK (x0, x1); LDOUBLE c = bar (b); return c > a; } ------- I confirmed this case will ICE if without Segher's proposed patch and even also reverted Segher's r12-8091.
next prev parent reply other threads:[~2022-04-22 2:33 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-21 13:07 [Bug target/105334] New: " asolokha at gmx dot com 2022-04-21 18:02 ` [Bug target/105334] " segher at gcc dot gnu.org 2022-04-21 18:05 ` segher at gcc dot gnu.org 2022-04-21 22:54 ` segher at gcc dot gnu.org 2022-04-21 23:50 ` segher at gcc dot gnu.org 2022-04-22 2:33 ` linkw at gcc dot gnu.org [this message] 2022-04-22 5:58 ` rguenth at gcc dot gnu.org 2022-04-22 19:29 ` cvs-commit at gcc dot gnu.org 2022-04-22 19:54 ` segher at gcc dot gnu.org 2022-04-26 8:46 ` [Bug target/105334] " jakub at gcc dot gnu.org 2022-04-28 3:35 ` cvs-commit at gcc dot gnu.org 2022-04-28 3:39 ` linkw at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105334-4-7DqosIfo8z@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).