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.