https://gcc.gnu.org/g:e14cdc882183ab5ebf16cac774a05a54af4d789f
commit r16-9119-ge14cdc882183ab5ebf16cac774a05a54af4d789f Author: Carter Rennick <[email protected]> Date: Fri Apr 3 13:07:38 2026 +0000 mips: Fix ICE on mips64-elf by removing MAX_FIXED_MODE_SIZE override [PR120144] The definition of MAX_FIXED_MODE_SIZE did not account for MIPS supporting TImode, which causes an internal compiler error when building libstdc++. Upon further investigation, this definition appears to be a historical mistake. This patch removes the MAX_FIXED_MODE_SIZE override, which fixes the error. PR target/120144 gcc/ChangeLog: * config/mips/mips.h (MAX_FIXED_MODE_SIZE): Remove. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr120144.c: New test. Signed-off-by: Carter Rennick <[email protected]> (cherry picked from commit 224b7b1949234cc528947f73d3f9829d2df843ac) Diff: --- gcc/config/mips/mips.h | 4 ---- gcc/testsuite/gcc.dg/torture/pr120144.c | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index f52d0d2358cc..c461d8aea3d4 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1706,10 +1706,6 @@ FP_ASM_SPEC "\ doesn't support 128-bit integers for MIPS32 currently. */ #define LONG_LONG_ACCUM_TYPE_SIZE (TARGET_64BIT ? 128 : 64) -/* long double is not a fixed mode, but the idea is that, if we - support long double, we also want a 128-bit integer type. */ -#define MAX_FIXED_MODE_SIZE MIPS_LONG_DOUBLE_TYPE_SIZE - /* Width in bits of a pointer. */ #ifndef POINTER_SIZE #define POINTER_SIZE ((TARGET_LONG64 && TARGET_64BIT) ? 64 : 32) diff --git a/gcc/testsuite/gcc.dg/torture/pr120144.c b/gcc/testsuite/gcc.dg/torture/pr120144.c new file mode 100644 index 000000000000..e254771ea787 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr120144.c @@ -0,0 +1,8 @@ +/* PR target/120144 */ +/* { dg-do compile } */ +/* { dg-require-effective-target int128 } */ + +int f(unsigned __int128 t) +{ + return __builtin_clzg(t); +}
