From: Carter Rennick <[email protected]>
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)
---
gcc/config/mips/mips.h | 4 ----
gcc/testsuite/gcc.dg/torture/pr120144.c | 8 ++++++++
2 files changed, 8 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr120144.c
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index e224ade2a1a..800456c1dfb 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1685,10 +1685,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 00000000000..e254771ea78
--- /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);
+}
--
2.43.0