diff -Naur gcc-9.5.0/configure gcc-9.5.0-irix/configure
--- gcc-9.5.0/configure	2022-05-27 03:21:10.443377000 +0000
+++ gcc-9.5.0-irix/configure	2025-02-13 08:55:07.365200800 +0000
@@ -3205,7 +3205,7 @@
 	;;
     *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
 	;;
-    *-*-solaris2* | *-*-hpux11*)
+    *-*-solaris2* | *-*-hpux11* | mips*-*-irix6*)
 	;;
     *-*-darwin* | *-*-aix*)
 	;;
diff -Naur gcc-9.5.0/configure.ac gcc-9.5.0-irix/configure.ac
--- gcc-9.5.0/configure.ac	2022-05-27 03:21:10.443377000 +0000
+++ gcc-9.5.0-irix/configure.ac	2025-02-13 08:55:07.385592000 +0000
@@ -508,7 +508,7 @@
 	;;
     *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
 	;;
-    *-*-solaris2* | *-*-hpux11*)
+    *-*-solaris2* | *-*-hpux11* | mips*-*-irix6*)
 	;;
     *-*-darwin* | *-*-aix*)
 	;;
diff -Naur gcc-9.5.0/fixincludes/inclhack.def gcc-9.5.0-irix/fixincludes/inclhack.def
--- gcc-9.5.0/fixincludes/inclhack.def	2022-05-27 03:21:10.455377000 +0000
+++ gcc-9.5.0-irix/fixincludes/inclhack.def	2025-02-15 14:03:04.760408000 +0000
@@ -20,1036 +20,6 @@
 FIXINC_DEBUG = yes;
 #endif
 
-/* On AIX when _LARGE_FILES is defined stdio.h defines fopen to
- * fopen64 etc. and this causes problems when building with g++
- * because cstdio udefs everything from stdio.h, leaving us with
- * ::fopen has not been declared errors. This fixes stdio.h to
- * undef those defines and use __asm__ to alias the symbols if
- * building with g++ and -D_LARGE_FILES
- */
-fix = {
-    hackname  = AAB_aix_stdio;
-    files     = stdio.h;
-    select    = "define fopen fopen64";
-    mach      = "*-*-aix*";
-    test-text = ''; /* no way to test */
-
-    c_fix     = wrap;
-
-    c_fix_arg = "";
-
-    c_fix_arg = <<- _EOArg_
-
-	#if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus
-	#define __need__aix_stdio_h_fix
-	#ifdef __need__aix_stdio_h_fix
-	#undef fseeko
-	#undef ftello
-	#undef fgetpos
-	#undef fsetpos
-	#undef fopen
-	#undef freopen
-	/* Alias the symbols using asm */
-	extern "C" {
-	extern int fgetpos(FILE *, fpos64_t *) __asm__("fgetpos64");
-	extern FILE *fopen(const char *, const char *) __asm__("fopen64");
-	extern FILE *freopen(const char *, const char *, FILE *) __asm__("freopen64");
-	extern int fseeko(FILE *, off64_t, int) __asm__("fseeko64");
-	extern int fsetpos(FILE *, const fpos64_t *) __asm__("fsetpos64");
-	extern off64_t ftello(FILE *) __asm__("ftello64");
-	}
-	#endif
-	#endif
-
-	_EOArg_;
-};
-
-/* On AIX when _LARGE_FILES is defined fcntl.h defines open to
- * open64 and creat to creat64.  This fixes fcntl.h to
- * undef those defines and use __asm__ to alias the symbols if
- * building with g++ and -D_LARGE_FILES
- */
-fix = {
-    hackname  = AAB_aix_fcntl;
-    files     = fcntl.h;
-    select    = "define open[ \t]open64";
-    mach      = "*-*-aix*";
-    test-text = ''; /* no way to test */
-
-    c_fix     = wrap;
-
-    c_fix_arg = "";
-
-    c_fix_arg = <<- _EOArg_
-
-	#if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus
-	#define __need__aix_fcntl_h_fix
-	#ifdef __need__aix_fcntl_h_fix
-	#undef open
-	#undef creat
-	#undef openat
-	/* Alias the symbols using asm */
-	extern "C" {
-	extern int open(const char *, int, ...) __asm__("open64");
-	extern int creat(const char *, mode_t) __asm__("creat64");
-	#if (_XOPEN_SOURCE >= 700)
-	extern int openat(int, const char *, int, ...) __asm__("open64at");
-	#endif
-	}
-	#endif
-	#endif
-
-	_EOArg_;
-};
-
-/*
- *  On Mac OS 10.3.9, the 'long double' functions are available in
- *  libSystem, but are not prototyped in math.h.
- */
-fix = {
-  hackname  = AAB_darwin7_9_long_double_funcs;
-  mach      = "*-*-darwin7.9*";
-  files     = architecture/ppc/math.h;
-  bypass    = "powl";
-  replace = <<- _EndOfHeader_
-	/* This file prototypes the long double functions available on Mac OS
-	   10.3.9.  */
-	#ifndef __MATH__
-	# undef __APPLE_CC__
-	# define __APPLE_CC__  1345
-	# include_next <architecture/ppc/math.h>
-	# undef __APPLE_CC__
-	# define __APPLE_CC__ 1
-	# ifndef __LIBMLDBL_COMPAT
-	#  ifdef __LONG_DOUBLE_128__
-	#   define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128")
-	#  else
-	#   define __LIBMLDBL_COMPAT(sym)
-	#  endif /* __LONG_DOUBLE_128__ */
-	# endif /* __LIBMLDBL_COMPAT */
-	# ifdef __cplusplus
-	   extern "C" {
-	# endif
-	  extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);
-	  extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);
-	  extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);
-	  extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);
-	  extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);
-	  extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);
-	  extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);
-	  extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);
-	  extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);
-	  extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);
-	  extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);
-	  extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);
-	  extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);
-	  extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);
-	  extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);
-	  extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);
-	  extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);
-	  extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);
-	  extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);
-	  extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);
-	  extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);
-	  extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);
-	  extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);
-	  extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);
-	  extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);
-	  extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);
-	  extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);
-	  extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);
-	  extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);
-	  extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);
-	  extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);
-	  extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);
-	  extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);
-	  extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);
-	  extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);
-	  extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);
-	  extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);
-	  extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);
-	  extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);
-	  extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);
-	  extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);
-	  extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);
-	  extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);
-	  extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);
-	  extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);
-	  extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);
-	  extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);
-	  extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);
-	  extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);
-	  extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);
-	  extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);
-	  extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);
-	  extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);
-	  extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);
-	  extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);
-	  extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);
-	  extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);
-	# ifdef __cplusplus
-	   }
-	# endif
-	#endif /* __MATH__ */
-	_EndOfHeader_;
-};
-
-/*
- *  SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where
- *  __attribute__((availability)) is not supported.
- */
-fix = {
-    hackname  = darwin_api_availability;
-    mach      = "*-*-darwin*";
-    files     = os/availability.h;
-    bypass    = "__IPHONE_OS_VERSION_MIN_REQUIRED";
-    select    =
-    " *#define __API_AVAILABLE.*\n"
-    " *#define __API_DEPRECATED.*\n"
-    " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n"
-    " *#define __API_UNAVAILABLE.*\n";
-    c_fix     = format;
-    c_fix_arg =
-    "    #define API_AVAILABLE(...)\n"
-    "    #define API_DEPRECATED(...)\n"
-    "    #define API_DEPRECATED_WITH_REPLACEMENT(...)\n"
-    "    #define API_UNAVAILABLE(...)\n";
-    test_text =
-    "#define __API_AVAILABLE(...)\n"
-    "#define __API_DEPRECATED(...)\n"
-    "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n"
-    "#define __API_UNAVAILABLE(...)\n";
-};
-
-/*
- *  This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
- */
-fix = {
-    hackname = AAB_fd_zero_asm_posix_types_h;
-    files    = asm/posix_types.h;
-    mach     = 'i[34567]86-*-linux*';
-    bypass   = '} while';
-    bypass   = 'x86_64';
-    bypass   = 'posix_types_64';
-
-    /*
-     * Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
-     * the start, so that if #include_next gets another instance of
-     * the wrapper, this will follow the #include_next chain until
-     * we arrive at the real <asm/posix_types.h>.
-     */
-    replace  = <<-  _EndOfHeader_
-	/* This file fixes a bug in the __FD_ZERO macro
-	   for older versions of the Linux kernel. */
-	#ifndef _POSIX_TYPES_H_WRAPPER
-	#include <features.h>
-	 #include_next <asm/posix_types.h>
-	
-	#if defined(__FD_ZERO) && !defined(__GLIBC__)
-	#undef __FD_ZERO
-	#define __FD_ZERO(fdsetp) \
-	  do { \
-	    int __d0, __d1; \
-		__asm__ __volatile__("cld ; rep ; stosl" \
-			: "=&c" (__d0), "=&D" (__d1) \
-			: "a" (0), "0" (__FDSET_LONGS), \
-			  "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
-	  } while (0)
-	#endif
-	
-	#define _POSIX_TYPES_H_WRAPPER
-	#endif /* _POSIX_TYPES_H_WRAPPER */
-	_EndOfHeader_;
-};
-
-/*
- *  This fixes __FD_ZERO bug for glibc-1.x
- */
-fix = {
-    hackname = AAB_fd_zero_gnu_types_h;
-    files    = gnu/types.h;
-    mach     = 'i[34567]86-*-linux*';
-
-    /*
-     * Define _TYPES_H_WRAPPER at the end of the wrapper, not
-     * the start, so that if #include_next gets another instance of
-     * the wrapper, this will follow the #include_next chain until
-     * we arrive at the real <gnu/types.h>.
-     */
-    replace  = <<-  _EndOfHeader_
-	/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */
-	#ifndef _TYPES_H_WRAPPER
-	#include <features.h>
-	#include_next <gnu/types.h>
-
-	#if defined(__FD_ZERO) && !defined(__GLIBC__)
-	#undef __FD_ZERO
-	# define __FD_ZERO(fdsetp) \
-	  do { \
-	    int __d0, __d1; \
-	        __asm__ __volatile__("cld ; rep ; stosl" \
-	        : "=&c" (__d0), "=&D" (__d1) \
-	        : "a" (0), "0" (__FDSET_LONGS), \
-	          "1" ((__fd_set *) (fdsetp)) :"memory"); \
-	  } while (0)
-	#endif
-
-	#define _TYPES_H_WRAPPER
-	#endif /* _TYPES_H_WRAPPER */
-	_EndOfHeader_;
-};
-
-/*
- *  This fixes __FD_ZERO bug for glibc-2.0.x
- */
-fix = {
-    hackname = AAB_fd_zero_selectbits_h;
-    files    = selectbits.h;
-    mach     = 'i[34567]86-*-linux*';
-
-    /*
-     * Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not
-     * the start, so that if #include_next gets another instance of
-     * the wrapper, this will follow the #include_next chain until
-     * we arrive at the real <selectbits.h>.
-     */
-    replace  = <<-  _EndOfHeader_
-	/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */
-	#ifndef _SELECTBITS_H_WRAPPER
-	  #include <features.h>
-	  #include_next <selectbits.h>
-
-	  #if defined(__FD_ZERO) && defined(__GLIBC__) \\
-	  && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\
-	  && __GLIBC_MINOR__ == 0
-	     #undef __FD_ZERO
-	     #define __FD_ZERO(fdsetp) \\
-	     do { \\
-	        int __d0, __d1; \\
-	      __asm__ __volatile__ ("cld; rep; stosl" \\
-                        : "=&c" (__d0), "=&D" (__d1) \\
-                        : "a" (0), "0" (sizeof (__fd_set) \\
-                                        / sizeof (__fd_mask)), \\
-                          "1" ((__fd_mask *) (fdsetp)) \\
-                        : "memory"); \\
-	      } while (0)
-	  #endif
-
-	  #define _SELECTBITS_H_WRAPPER
-	#endif /* _SELECTBITS_H_WRAPPER */
-	_EndOfHeader_;
-};
-
-/*
- * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
- * the same interface as <stdarg.h>.  No idea why they couldn't have just
- * used the standard header.
- */
-fix = {
-    hackname = AAB_solaris_sys_varargs_h;
-    files    = "sys/varargs.h";
-    mach     = '*-*-solaris*';
-    replace  = <<-  _EndOfHeader_
-	#ifdef __STDC__
-	  #include <stdarg.h>
-	#else
-	  #include <varargs.h>
-	#endif
-	_EndOfHeader_;
-};
-
-/*
- *  Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
- *  declaration on Sun OS 4.x.  We must only fix this on Sun OS 4.x, because
- *  many other systems have similar text but correct versions of the file.
- *  To ensure only Sun's is fixed, we grep for a likely unique string.
- *  Fix also on sysV68 R3V7.1 (head/memory.h\t50.1\t )
- */
-fix = {
-    hackname = AAB_sun_memcpy;
-    files    = memory.h;
-    select   = "/\\*\t@\\(#\\)"
-             "(head/memory.h\t50.1\t "
-             "|memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2\t)\\*/";
-
-    replace = <<-  _EndOfHeader_
-	/* This file was generated by fixincludes */
-	#ifndef __memory_h__
-	  #define __memory_h__
-
-	  #ifdef __STDC__
-	    extern void *memccpy();
-	    extern void *memchr();
-	    extern void *memcpy();
-	    extern void *memset();
-	  #else
-	    extern char *memccpy();
-	    extern char *memchr();
-	    extern char *memcpy();
-	    extern char *memset();
-	  #endif /* __STDC__ */
-
-	  extern int memcmp();
-
-	#endif /* __memory_h__ */
-	_EndOfHeader_;
-};
-
-/*
- * Fix assert.h on VxWorks:
- */
-fix = {
-    hackname    = AAB_vxworks_assert;
-    files       = assert.h;
-    mach        = "*-*-vxworks*";
-        
-    replace     = <<- _EndOfHeader_
-	#ifdef _ASSERT_H
-	#undef _ASSERT_H
-	#undef assert
-	#endif
-
-	#define _ASSERT_H
-
-	#ifdef __cplusplus
-	extern "C" {
-	#endif
-
-	#if defined(__STDC__) || defined(__cplusplus)
-	extern void __assert (const char*);
-	#else
-	extern void __assert ();
-	#endif
-
-	#ifdef NDEBUG
-	#define assert(ign) ((void)0)
-	#else
-
-	#define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str)
-	#define ASSERT_STRINGIFY_HELPER(str) #str
-
-	#define assert(test) ((void) \
-	        ((test) ? ((void)0) : \
-	        __assert("Assertion failed: " #test ", file " \
-	        __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n")))
-
-	#endif
-
-	#ifdef __cplusplus
-	}
-	#endif
-	_EndOfHeader_;
-};
-
-/*
- * Add needed include to regs.h (NOT the gcc header) on VxWorks
- */
-
-fix = {
-    hackname    = AAB_vxworks_regs_vxtypes;
-    files       = regs.h;
-    mach        = "*-*-vxworks*";
-
-    replace     = <<- _EndOfHeader_
-	#ifndef _REGS_H
-	#define _REGS_H
-	/* regs.h depends on CPU_FAMILY being properly defined, which
-	   is done by vxCpu.h.  */
-	#include <types/vxCpu.h>
-	/* regs.h includes a CPU_FAMILY-specific header that requires
-	   vxTypesOld.h to already have been included.  Those headers
-	   contain proper _ASMLANGUAGE guards around their typedefs,
-	   but vxTypesOld.h itself does not. So we avoid including
-	   vxTypesOld.h from assembly.  */
-	#ifndef _ASMLANGUAGE
-	#include <types/vxTypesOld.h>
-	#endif
-	#include_next <arch/../regs.h>
-	#endif
-	_EndOfHeader_;
-};
-
-/*
- *  This hack makes makes unistd.h more POSIX-compliant on VxWorks
- */
-fix = {
-    hackname    = AAB_vxworks_unistd;
-    files       = unistd.h;
-    mach        = "*-*-vxworks*";
-        
-    replace     = <<- _EndOfHeader_
-	#ifndef _UNISTD_H
-	#define _UNISTD_H
-	#include_next <unistd.h>
-	#include <ioLib.h>
-	#ifndef STDIN_FILENO
-	#define STDIN_FILENO 0
-	#endif
-	#ifndef STDOUT_FILENO
-	#define STDOUT_FILENO 1
-	#endif
-	#ifndef STDERR_FILENO
-	#define STDERR_FILENO 2
-	#endif
-	#endif /* _UNISTD_H */
-	_EndOfHeader_;
-};
-
-/*
- * assert.h on AIX 7 redefines static_assert as _Static_assert without
- * protecting C++.
- */
-fix = {
-    hackname  = aix_assert;
-    mach      = "*-*-aix*";
-    files     = assert.h;
-    select    = "#define[ \t]static_assert[ \t]_Static_assert";
-    c_fix     = format;
-    c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
-    test_text = "#define static_assert _Static_assert";
-};
-
-/*
- * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
- * which only is provided by AIX xlc C99.
- */
-fix = {
-    hackname  = aix_complex;
-    mach      = "*-*-aix*";
-    files     = complex.h;
-    select    = "#define[ \t]_Complex_I[ \t]__I";
-    c_fix     = format;
-    c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)";
-    test_text = "#define _Complex_I	__I\n";
-};
-
-/*
- *  On AIX some headers are not properly guarded by 'extern "C"'.
- */
-fix = {
-  hackname  = aix_externc;
-  mach      = "*-*-aix*";
-  files     = ctype.h;
-  files     = fcntl.h;
-  files     = langinfo.h;
-  files     = ldfcn.h;
-  files     = sys/localedef.h;
-  files     = sys/times.h;
-  bypass    = "extern \"C\"";
-  c_fix     = wrap;
-  c_fix_arg = "#ifdef __cplusplus\n"
-              "extern \"C\" {\n"
-              "#endif\n";
-  c_fix_arg = "#ifdef __cplusplus\n"
-              "}\n"
-              "#endif\n";
-  test_text = "extern int __n_pthreads;\n";
-};
-
-/*
- *  On AIX sys/socket.h assumes C++.
- */
-fix = {
-  hackname  = aix_externcpp1;
-  mach      = "*-*-aix*";
-  files     = "sys/socket.h";
-  select    = "#ifdef __cplusplus";
-  c_fix     = format;
-  c_fix_arg = "#ifdef __cplusplus\n"
-              "extern \"C++\" {";
-  test_text = "#ifdef __cplusplus";
-
-};
-
-fix = {
-  hackname  = aix_externcpp2;
-  mach      = "*-*-aix*";
-  files     = "sys/socket.h";
-  select    = "#else  /\\* __cplusplus \\*/";
-  c_fix     = format;
-  c_fix_arg = "} /* extern \"C++\" */\n"
-              "#else  /* __cplusplus */";
-  test_text = "#else  /* __cplusplus */";
-
-};
-
-/*
- *  malloc.h on AIX6 uses XLC++ specific builtin syntax
- */
-fix = {
-    hackname  = aix_malloc;
-    mach      = "*-*-aix*";
-    files     = "malloc.h";
-    select    = "#ifdef __cplusplus";
-    c_fix     = format;
-    c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))";
-    test_text = "#ifdef __cplusplus";
-};
-
-/*
- * net/if_arp.h defines a variable fc_softc instead of adding a
- * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1
- */
-fix = {
-    hackname  = aix_net_if_arp;
-    mach      = "*-*-aix*";
-    files     = "net/if_arp.h";
-    select    = "^struct  fc_softc \\{";
-    c_fix     = format;
-    c_fix_arg = "typedef struct _fc_softc {";
-    test_text = "struct  fc_softc {\n  int a;\n};";
-};
-
-/*
- *  Fix AIX definition of NULL for G++.
- */
-fix = {
-    hackname  = aix_null;
-    mach      = "*-*-aix*";
-    files     = curses.h, dbm.h, locale.h, stdio.h, stdlib.h, string.h,
-    time.h, unistd.h, wchar.h, sys/dir.h, sys/param.h, sys/types.h;
-    bypass    = __null;
-    select    = "#define[ \t]+NULL[ \t]+\\(*0L*\\)*";
-    c_fix     = format;
-    c_fix_arg = <<- _EOFix_
-	#ifndef NULL
-	#ifdef __cplusplus
-	#ifdef __GNUG__
-	#define NULL __null
-	#else /* ! __GNUG__  */
-	#define NULL 0L
-	#endif /* __GNUG__  */
-	#else /* ! __cplusplus  */
-	#define NULL ((void *)0)
-	#endif /* __cplusplus  */
-	#endif /* !NULL  */
-	_EOFix_;
-    test_text = "# define\tNULL \t(0L)  /* typed NULL */";
-};
-
-/*
- *  pthread.h on AIX defines PTHREAD_ONCE_INIT, PTHREAD_MUTEX_INITIALIZER,
- *  PTHREAD_COND_INITIALIZER and PTHREAD_RWLOCK_INITIALIZER without enough
- *  braces.
- */
-fix = {
-    hackname  = aix_once_init_1;
-    mach      = "*-*-aix*";
-    files     = "pthread.h";
-    select    = "#define[ \t]PTHREAD_ONCE_INIT \\\\\n"
-		"\\{ \\\\\n";
-    c_fix     = format;
-    c_fix_arg = "#define PTHREAD_ONCE_INIT \\\n"
-		"{{ \\\n";
-    test_text = "#define PTHREAD_ONCE_INIT \\\\\n"
-		"{ \\\\\n";
-};
-
-fix = {
-    hackname  = aix_once_init_2;
-    mach      = "*-*-aix*";
-    files     = "pthread.h";
-    select    = "[ \t]0 \\\\\n"
-		"\\}\n";
-    c_fix     = format;
-    c_fix_arg = "	0 \\\n"
-		"}}\n";
-    test_text = "	0 \\\\\n"
-		"}\n";
-};
-
-fix = {
-    hackname  = aix_mutex_initializer_1;
-    mach      = "*-*-aix*";
-    files     = "pthread.h";
-    select    = "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n"
-		"\\{ \\\\\n";
-    c_fix     = format;
-    c_fix_arg = "#define PTHREAD_MUTEX_INITIALIZER \\\n"
-		"{{ \\\n";
-    test_text = "#define PTHREAD_MUTEX_INITIALIZER \\\\\n"
-		"{ \\\\\n";
-};
-
-fix = {
-    hackname  = aix_cond_initializer_1;
-    mach      = "*-*-aix*";
-    files     = "pthread.h";
-    select    = "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n"
-		"\\{ \\\\\n";
-    c_fix     = format;
-    c_fix_arg = "#define PTHREAD_COND_INITIALIZER \\\n"
-		"{{ \\\n";
-    test_text = "#define PTHREAD_COND_INITIALIZER \\\\\n"
-		"{ \\\\\n";
-};
-
-fix = {
-    hackname  = aix_rwlock_initializer_1;
-    mach      = "*-*-aix*";
-    files     = "pthread.h";
-    select    = "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n"
-		"\\{ \\\\\n";
-    c_fix     = format;
-    c_fix_arg = "#define PTHREAD_RWLOCK_INITIALIZER \\\n"
-		"{{ \\\n";
-    test_text = "#define PTHREAD_RWLOCK_INITIALIZER \\\\\n"
-		"{ \\\\\n";
-};
-
-/*
- *  pthread.h on AIX 4.3.3 tries to define a macro without whitspace
- *  which violates a requirement of ISO C.
- */
-fix = {
-    hackname  = aix_pthread;
-    files     = "pthread.h";
-    select    = "(#define[\t ][A-Za-z_0-9]+)(\\\\\n[^A-Za-z_0-9 \t\n(])";
-    c_fix     = format;
-    c_fix_arg = "%1 %2";
-    test_text = "#define PTHREAD_MUTEX_INITIALIZER\\\\\n"
-                "{...init stuff...}";
-};
-
-/*
- *  AIX stdint.h fixes.
- */
-fix = {
-    hackname  = aix_stdint_1;
-    mach      = "*-*-aix*";
-    files     = stdint-aix.h, stdint.h;
-    select    = "#define[ \t]UINT8_MAX[ \t]\\(255U\\)\n"
-		"#define[ \t]UINT16_MAX[ \t]\\(65535U\\)";
-    c_fix     = format;
-    c_fix_arg = "#define UINT8_MAX	(255)\n"
-		"#define UINT16_MAX	(65535)";
-    test_text = "#define UINT8_MAX	(255U)\n"
-		"#define UINT16_MAX	(65535U)";
-};
-
-/*
- * aix_stdint_2
- */
-fix = {
-    hackname  = aix_stdint_2;
-    mach      = "*-*-aix*";
-    files     = stdint-aix.h, stdint.h;
-    select    = "#define[ \t]INTPTR_MIN[ \t]INT64_MIN\n"
-		"#define[ \t]INTPTR_MAX[ \t]INT64_MAX\n"
-		"#define[ \t]UINTPTR_MAX[ \t]UINT64_MAX\n"
-		"#else\n"
-		"#define[ \t]INTPTR_MIN[ \t]INT32_MIN\n"
-		"#define[ \t]INTPTR_MAX[ \t]INT32_MAX\n"
-		"#define[ \t]UINTPTR_MAX[ \t]UINT32_MAX";
-    c_fix     = format;
-    c_fix_arg = "#define INTPTR_MIN	(-INTPTR_MAX-1)\n"
-		"#define INTPTR_MAX	9223372036854775807L\n"
-		"#define UINTPTR_MAX	18446744073709551615UL\n"
-		"#else\n"
-		"#define INTPTR_MIN	(-INTPTR_MAX-1)\n"
-		"#define INTPTR_MAX	2147483647L\n"
-		"#define UINTPTR_MAX	4294967295UL";
-    test_text = "#define INTPTR_MIN	INT64_MIN\n"
-		"#define INTPTR_MAX	INT64_MAX\n"
-		"#define UINTPTR_MAX	UINT64_MAX\n"
-		"#else\n"
-		"#define INTPTR_MIN	INT32_MIN\n"
-		"#define INTPTR_MAX	INT32_MAX\n"
-		"#define UINTPTR_MAX	UINT32_MAX";
-};
-
-/*
- * aix_stdint_3
- */
-fix = {
-    hackname  = aix_stdint_3;
-    mach      = "*-*-aix*";
-    files     = stdint-aix.h, stdint.h;
-    select    = "#define[ \t]PTRDIFF_MIN[ \t]INT64_MIN\n"
-		"#define[ \t]PTRDIFF_MAX[ \t]INT64_MAX\n"
-		"#else\n"
-		"#define[ \t]PTRDIFF_MIN[ \t]*INT32_MIN\n"
-		"#define[ \t]PTRDIFF_MAX[ \t]*INT32_MAX";
-    c_fix     = format;
-    c_fix_arg = "#define PTRDIFF_MIN	(-9223372036854775807L - 1)\n"
-		"#define PTRDIFF_MAX	9223372036854775807L\n"
-		"#else\n"
-		"#define PTRDIFF_MIN	(-2147483647L - 1)\n"
-		"#define PTRDIFF_MAX	2147483647L";
-    test_text = "#define PTRDIFF_MIN	INT64_MIN\n"
-		"#define PTRDIFF_MAX	INT64_MAX\n"
-		"#else\n"
-		"#define PTRDIFF_MIN     INT32_MIN\n"
-		"#define PTRDIFF_MAX	INT32_MAX";
-};
-
-/*
- * aix_stdint_4
- */
-fix = {
-    hackname  = aix_stdint_4;
-    mach      = "*-*-aix*";
-    files     = stdint-aix.h, stdint.h;
-    select    = "#define[ \t]SIZE_MAX[ \t]UINT64_MAX\n"
-		"#else\n"
-		"#define[ \t]SIZE_MAX[ \t]*UINT32_MAX";
-    c_fix     = format;
-    c_fix_arg = "#define SIZE_MAX	18446744073709551615UL\n"
-		"#else\n"
-		"#define SIZE_MAX	4294967295UL";
-    test_text = "#define SIZE_MAX	UINT64_MAX\n"
-		"#else\n"
-		"#define SIZE_MAX        UINT32_MAX";
-};
-
-/*
- * aix_stdint_5
- */
-fix = {
-    hackname  = aix_stdint_5;
-    mach      = "*-*-aix*";
-    files     = stdint-aix.h, stdint.h;
-    select    = "#define[ \t]UINT8_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)\n"
-		"#define[ \t]UINT16_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)";
-    c_fix     = format;
-    c_fix_arg = "#define UINT8_C(c)	c\n"
-		"#define UINT16_C(c)	c";
-    test_text = "#define UINT8_C(c)	__CONCAT__(c,U)\n"
-		"#define UINT16_C(c)	__CONCAT__(c,U)";
-};
-
-/*
- * stdio.h on AIX defines ferror, clearerr and feof as C++ inline, which
-   produces wrong code with G++.
- */
-fix = {
-    hackname  = aix_stdio_inline;
-    mach      = "*-*-aix*";
-    files     = stdio.h;
-    select    = "#ifdef __cplusplus\\\n"
-                "}\\\n\\\n"
-                "#ifdef ferror\\\n";
-    c_fix     = format;
-    c_fix_arg = "#ifdef __cplusplus\n"
-                "}\n"
-                "#endif\n\n"
-                "#if (defined(__cplusplus) && defined(__IBMCPP__))\n"
-                "#ifdef ferror\n";
-    test_text = "#ifdef __cplusplus\n}\n\n#ifdef ferror";
-};
-
-/*
- * stdlib.h on AIX uses #define on malloc and friends.
- */
-fix = {
-    hackname  = aix_stdlib_malloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+malloc[ \t]+__linux_malloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *malloc(size_t) __asm__(\"__linux_malloc\");";
-    test_text = "#define malloc __linux_malloc";
-};
-
-fix = {
-    hackname  = aix_stdlib_realloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+realloc[ \t]+__linux_realloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *realloc(void *, size_t) __asm__(\"__linux_realloc\");";
-    test_text = "#define realloc __linux_realloc";
-};
-
-fix = {
-    hackname  = aix_stdlib_calloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+calloc[ \t]+__linux_calloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"__linux_calloc\");";
-    test_text = "#define calloc __linux_calloc";
-};
-
-fix = {
-    hackname  = aix_stdlib_valloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+valloc[ \t]+__linux_valloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *valloc(size_t) __asm__(\"__linux_valloc\");";
-    test_text = "#define valloc __linux_valloc";
-};
-
-fix = {
-    hackname  = aix_stdlib_vec_malloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+malloc[ \t]+vec_malloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *malloc(size_t) __asm__(\"vec_malloc\");";
-    test_text = "#define malloc vec_malloc";
-};
-
-fix = {
-    hackname  = aix_stdlib_vec_calloc;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "#define[ \t]+calloc[ \t]+vec_calloc";
-    c_fix     = format;
-    c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"vec_calloc\");";
-    test_text = "#define calloc vec_calloc";
-};
-
-/*
- * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
- */
-fix = {
-    hackname  = aix_strtof_const;
-    mach      = "*-*-aix*";
-    files     = stdlib.h;
-    select    = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);";
-    c_fix     = format;
-    c_fix_arg = "%1(const char *, char **);";
-    test_text = "extern float    strtof(char *, char **);";
-};
-
-/*
- *  sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
- *  in an otherwise harmless (and #ifed out) macro definition
- */
-fix = {
-    hackname  = aix_sysmachine;
-    mach      = "*-*-aix*";
-    files     = sys/machine.h;
-    select    = "\\\\ +\n";
-    c_fix     = format;
-    c_fix_arg = "\\\n";
-    test_text = "#define FOO \\\n"
-    " bar \\ \n baz \\ \n bat";
-};
-
-/*
- *  sys/wait.h on AIX 5.2 defines macros that have both signed and
- *  unsigned types in conditional expressions.
- */
-fix = {
-    hackname  = aix_syswait_2;
-    mach      = "*-*-aix*";
-    files     = sys/wait.h;
-    select    = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)';
-    c_fix     = format;
-    c_fix_arg = "? (int)%1";
-    test_text = "#define WSTOPSIG(__x)    "
-        "(int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)";
-};
-
-/*
- *  sys/signal.h on some versions of AIX uses volatile in the typedef of
- *  sig_atomic_t, which causes gcc to generate a warning about duplicate
- *  volatile when a sig_atomic_t variable is declared volatile, as
- *  required by ANSI C.
- */
-fix = {
-    hackname  = aix_volatile;
-    mach      = "*-*-aix*";
-    files     = sys/signal.h;
-    select    = "typedef volatile int sig_atomic_t";
-    c_fix     = format;
-    c_fix_arg = "typedef int sig_atomic_t";
-    test_text = "typedef volatile int sig_atomic_t;";
-};
-
-/*
- *  AIX unistd.h defines a static function with an empty parameter list.
- */
-fix = {
-    hackname  = aix_unistd;
-    mach      = "*-*-aix*";
-    files     = unistd.h;
-
-    select    = "[ \t]+static[ \t]+int[ \t]+getdtablesize\\(\\)";
-    c_fix     = format;
-    c_fix_arg = "\tstatic int\t\tgetdtablesize(void)";
-    test_text = "	static int		getdtablesize()";
-};
-
-/*
- *  Fix __assert declaration in assert.h on Alpha OSF/1.
- */
-fix = {
-    hackname  = alpha___assert;
-    files     = "assert.h";
-    select    = '__assert\(char \*, char \*, int\)';
-    c_fix     = format;
-    c_fix_arg = "__assert(const char *, const char *, int)";
-    test_text = 'extern void __assert(char *, char *, int);';
-};
-
-/*
- *  Fix assert macro in assert.h on Alpha OSF/1.
- *  The superfluous int cast breaks C++.
- */
-fix = {
-    hackname  = alpha_assert;
-    files     = "assert.h";
-    select    = "(#[ \t]*" 'define assert\(EX\).*)\(\(int\) \(EX\)\)';
-    c_fix     = format;
-    c_fix_arg = "%1(EX)";
-    test_text = '#define assert(EX) (((int) (EX)) ? (void)0 '
-                ': __assert(#EX, __FILE__, __LINE__))';
-};
-
-/*
- *  Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
- */
-fix = {
-    hackname  = alpha_getopt;
-    files     = "stdio.h";
-    files     = "stdlib.h";
-    select    = 'getopt\(int, char \*\[\], *char \*\)';
-    c_fix     = format;
-    c_fix_arg = "getopt(int, char *const[], const char *)";
-    test_text = 'extern int getopt(int, char *[], char *);';
-};
-
-/*
- *  Fix missing semicolon on Alpha OSF/4 in <net/if.h>
- */
-fix = {
-    hackname  = alpha_if_semicolon;
-    files     = net/if.h;
-    select    = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\\*";
-    c_fix     = format;
-    c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
-    test_text = '     struct  sockaddr vmif_paddr     /* protocol address */';
-};
-
-/*
- * Remove erroneous parentheses in sym.h on Alpha OSF/1.
- */
-fix = {
-    hackname  = alpha_parens;
-    files     = sym.h;
-    select    = '#ifndef\(__mips64\)';
-    c_fix     = format;
-    c_fix_arg = "#ifndef __mips64";
-    test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif";
-};
-
-/*
- *  Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
- *  And OpenBSD.
- */
-fix = {
-    hackname = alpha_sbrk;
-    files    = unistd.h;
-    select   = "char[ \t]*\\*[\t ]*sbrk[ \t]*\\(";
-    c_fix     = format;
-    c_fix_arg = "void *sbrk(";
-    test_text = "extern char* sbrk(ptrdiff_t increment);";
-};
-
 /*
  *  For C++, avoid any typedef or macro definition of bool,
  *  and use the built in type instead.
@@ -1190,25 +160,6 @@
                 "extern double cabs ( _Complex z );";
 };
 
-/*
- * Fixup Darwin's broken check for __builtin_nanf.
- */    
-fix = {
-    hackname  = broken_nan;
-    /*
-     *  It is tempting to omit the first "files" entry.  Do not.
-     *  The testing machinery will take the first "files" entry as the name
-     *  of a test file to play with.  It would be a nuisance to have a directory
-     *  with the name "*".
-     */
-    files     = "architecture/ppc/math.h";
-    files     = "architecture/*/math.h";
-    select    = '#if defined\(__APPLE_CC__\) && \(__APPLE_CC__ >= 1345\)';
-    bypass    = "powl";
-    c_fix     = format; 
-    c_fix_arg = "#if 1";
-    test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
-};
 
 /*
  *  Various systems derived from BSD4.4 contain a macro definition
@@ -1299,1605 +250,6 @@
 };
 
 /*
- *  macOS 10.12 <AvailabilityInternal.h> uses __attribute__((availability))
- *  unconditionally.
- */
-fix = {
-    hackname  = darwin_availabilityinternal;
-    mach      = "*-*-darwin*";
-    files     = AvailabilityInternal.h;
-    select    = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*";
-    c_fix     = format;
-    c_fix_arg = <<- _EOFix_
-	#if defined(__has_attribute)
-	  #if __has_attribute(availability)
-	%0
-	  #else
-	    #define %1
-	  #endif
-	#else
-	    #define %1
-	#endif
-	_EOFix_;
-
-    test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n"
-		"#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))";
-};
-
-/*
- *  For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long)
- *  to be useful, the main math.h must use <> and not "" includes.
- */
-fix = {
-    hackname  = darwin_9_long_double_funcs_2;
-    mach      = "*-*-darwin*";
-    files     = math.h;
-    select    = '#include[ \t]+\"';
-    c_fix     = format;
-    c_fix_arg = "%1<%2.h>";
-  
-    c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"';
-  
-    test_text = '#include <architecture/ppc/math.h>';
-};
-
-/*
- *  On darwin8 and earlier, mach-o/swap.h isn't properly guarded
- *  by 'extern "C"'.  On darwin7 some mach/ headers aren't properly guarded.
- */
-fix = {
-  hackname  = darwin_externc;
-  mach      = "*-*-darwin*";
-  files     = mach-o/swap.h;
-  files     = mach/mach_time.h;
-  files     = mach/mach_traps.h;
-  files     = mach/message.h;
-  files     = mach/mig.h;
-  files     = mach/semaphore.h;
-  bypass    = "extern \"C\"";
-  bypass    = "__BEGIN_DECLS";
-  c_fix     = wrap;
-  c_fix_arg = "#ifdef __cplusplus\n"
-              "extern \"C\" {\n"
-              "#endif\n";
-  c_fix_arg = "#ifdef __cplusplus\n"
-              "}\n"
-              "#endif\n";
-  test_text = "extern void swap_fat_header();\n";
-};
-
-/*
- * AvailabilityMacros.h on Darwin breaks with GCC 4.0, because of
- * bad __GNUC__ tests.
- */
-fix = {
-  hackname  = darwin_gcc4_breakage;
-  mach      = "*-*-darwin*";
-  files     = AvailabilityMacros.h;
-  select    = "\\(__GNUC__ >= 3\\) && \\(__GNUC_MINOR__ >= 1\\)";
-  c_fix     = format;
-  c_fix_arg = "((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))";
-  test_text = "#if defined(__GNUC__) && (__GNUC__ >= 3) && "
-  	      "(__GNUC_MINOR__ >= 1)\n";
-};
-
-/*
- * math.h hides the long long functions that are available on the system for
- * 10.5 and 10.6 SDKs, we expect to use them in G++ without specifying a value
- * for __STDC_VERSION__, or switching __STRICT_ANSI__ off.
- */
-fix = {
-  hackname  = darwin_ll_funcs_avail;
-  mach      = "*-*-darwin*";
-  files     = architecture/ppc/math.h, architecture/i386/math.h;
-  select    = "#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^1]*199901L[^_]*"
-	      "__STRICT_ANSI__[^_]*__GNUC__[^\)]*";
-  sed       = "s/#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^_]*199901L[^_]*"
-	      "__STRICT_ANSI__[^_]*__GNUC__[^\\)]*\)/#if\ !\(__DARWIN_NO_LONG_LONG\)/";
-  test_text = "#if\ !(__DARWIN_NO_LONG_LONG)";
-};
-
-/*
- *  Before Mac OS X 10.8 <i386/setjmp.h> doesn't mark longjump noreturn.
- */
-fix = {
-    hackname  = darwin_longjmp_noreturn;
-    mach      = "*-*-darwin*";
-    files     = "i386/setjmp.h";
-    bypass    = "__dead2";
-    select    = "(.*longjmp\\(.*jmp_buf.*[^)]+\\));";
-    c_fix     = format;
-    c_fix_arg = "%1 __attribute__ ((__noreturn__));";
-
-    test_text = "void siglongjmp(sigjmp_buf, int);";
-};
-
-/*
- *  Mac OS X 10.11 <os/trace.h> uses attribute on function definition.
- */
-fix = {
-  hackname  = darwin_os_trace_1;
-  mach      = "*-*-darwin*";
-  files     = os/trace.h;
-  select    = "^(_os_trace_verify_printf.*) (__attribute__.*)";
-  c_fix     = format;
-  c_fix_arg = "%1";
-  test_text = "_os_trace_verify_printf(const char *msg, ...) __attribute__((format(printf, 1, 2)))";
-};
-
-/*
- *  Mac OS X 10.1[012] <os/trace.h> os_trace_payload_t typedef uses Blocks
- *  extension without guard.
- */
-fix = {
-  hackname  = darwin_os_trace_2;
-  mach      = "*-*-darwin*";
-  files     = os/trace.h;
-  select    = "typedef.*\\^os_trace_payload_t.*";
-  c_fix     = format;
-  c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
-  test_text = "typedef void (^os_trace_payload_t)(xpc_object_t xdict);";
-};
-
-/*
- *  In Mac OS X 10.1[012] <os/trace.h>, need to guard users of
- *  os_trace_payload_t typedef, too.
- */
-fix = {
-  hackname  = darwin_os_trace_3;
-  mach      = "*-*-darwin*";
-  files     = os/trace.h;
-  select    = <<- _EOSelect_
-	__(API|OSX)_.*
-	OS_EXPORT.*
-	.*
-	_os_trace.*os_trace_payload_t payload);
-	_EOSelect_;
-  c_fix     = format;
-  c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
-  test_text = <<- _EOText_
-	__API_AVAILABLE(macosx(10.10), ios(8.0), watchos(2.0), tvos(8.0))
-	OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
-	void
-	_os_trace_with_buffer(void *dso, const char *message, uint8_t type, const void *buffer, size_t buffer_size, os_trace_payload_t payload);
-
-	__OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0)
-	OS_EXPORT OS_NOTHROW
-	void
-	_os_trace_internal(void *dso, uint8_t type, const char *format, const uint8_t *buf, size_t buf_size, os_trace_payload_t payload);
-	_EOText_;
-};
-
-/*
- *  In macOS 10.10 <os/base.h>, doesn't have __has_extension guarded.
- */
-fix = {
-  hackname  = darwin_os_base_1;
-  mach      = "*-*-darwin*";
-  files     = os/base.h;
-  select    = <<- OS_BASE_1_SEL
-#define __has_attribute.*
-#endif
-OS_BASE_1_SEL;
-  c_fix     = format;
-  c_fix_arg = <<- OS_BASE_1_FIX
-%0
-#ifndef __has_extension
-#define __has_extension(x) 0
-#endif
-OS_BASE_1_FIX;
-  test_text = <<- OS_BASE_1_TEST
-#define __has_attribute(x) 0
-#endif
-
-#if __GNUC__
-OS_BASE_1_TEST;
-};
-
-/*
- *  In macOS 10.10 <dispatch/object.h>, has unguarded block syntax.
- */
-fix = {
-  hackname  = darwin_dispatch_object_1;
-  mach      = "*-*-darwin*";
-  files     = dispatch/object.h;
-  select    = "typedef void.*\\^dispatch_block_t.*";
-  c_fix     = format;
-  c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
-  test_text = <<- DISPATCH_OBJECT_1_TEST
-typedef void (^dispatch_block_t)(void);
-
-__BEGIN_DECLS
-DISPATCH_OBJECT_1_TEST;
-};
-
-/*
- *  __private_extern__ doesn't exist in FSF GCC.  Even if it did,
- *  why would you ever put it in a system header file?
- */
-fix = {
-  hackname  = darwin_private_extern;
-  mach      = "*-*-darwin*";
-  files     = mach-o/dyld.h;
-  select    = "__private_extern__ [a-z_]+ _dyld_";
-  c_fix     = format;
-  c_fix_arg = "extern";
-  c_fix_arg = "__private_extern__";
-  test_text = "__private_extern__ int _dyld_func_lookup(\n"
-	      "const char *dyld_func_name,\n"
-	      "unsigned long *address);\n";
-};
-
-/*
- * Darwin headers have a stdint.h that defines UINT8_C and UINT16_C to
- * unsigned constants.
- */
-fix = {
-    hackname  = darwin_stdint_1;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#define UINT8_C(v)\tv\n#define UINT16_C(v)\tv";
-    select    = "#define UINT8_C\\(v\\)[ \t]+\\(v ## U\\)\n"
-		"#define UINT16_C\\(v\\)[ \t]+\\(v ## U\\)";
-    test_text = "#define UINT8_C(v)   (v ## U)\n"
-		"#define UINT16_C(v)  (v ## U)";
-};
-
-/*
- * Darwin headers have a stdint.h that defines INTPTR_MIN and INTPTR_MAX
- * with wrong types.
- */
-fix = {
-    hackname  = darwin_stdint_2;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define INTPTR_MAX 9223372036854775807L\n"
-		"#define INTPTR_MIN (-INTPTR_MAX-1)\n"
-		"#else\n"
-		"#define INTPTR_MAX 2147483647L\n"
-		"#define INTPTR_MIN (-INTPTR_MAX-1)\n"
-		"#endif";
-    select    = "#if __WORDSIZE == 64\n"
-		"#define INTPTR_MIN[ \t]+INT64_MIN\n"
-		"#define INTPTR_MAX[ \t]+INT64_MAX\n"
-		"#else\n"
-		"#define INTPTR_MIN[ \t]+INT32_MIN\n"
-		"#define INTPTR_MAX[ \t]+INT32_MAX\n"
-		"#endif";
-    test_text = "#if __WORDSIZE == 64\n"
-		"#define INTPTR_MIN        INT64_MIN\n"
-		"#define INTPTR_MAX        INT64_MAX\n"
-		"#else\n"
-		"#define INTPTR_MIN        INT32_MIN\n"
-		"#define INTPTR_MAX        INT32_MAX\n"
-		"#endif";
-};
-
-/*
- * Darwin headers have a stdint.h that defines UINTPTR_MAX with a wrong type.
- */
-fix = {
-    hackname  = darwin_stdint_3;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define UINTPTR_MAX 18446744073709551615UL\n"
-		"#else\n"
-		"#define UINTPTR_MAX 4294967295UL\n"
-		"#endif";
-    select    = "#if __WORDSIZE == 64\n"
-		"#define UINTPTR_MAX[ \t]+UINT64_MAX\n"
-		"#else\n"
-		"#define UINTPTR_MAX[ \t]+UINT32_MAX\n"
-		"#endif";
-    test_text = "#if __WORDSIZE == 64\n"
-		"#define UINTPTR_MAX       UINT64_MAX\n"
-		"#else\n"
-		"#define UINTPTR_MAX       UINT32_MAX\n"
-		"#endif";
-};
-
-/*
- * Darwin headers have a stdint.h that defines SIZE_MAX with a wrong type.
- */
-fix = {
-    hackname  = darwin_stdint_4;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define SIZE_MAX 18446744073709551615UL\n"
-		"#else\n"
-		"#define SIZE_MAX 4294967295UL\n"
-		"#endif";
-    select    = "#if __WORDSIZE == 64\n"
-		"#define SIZE_MAX[ \t]+UINT64_MAX\n"
-		"#else\n"
-		"#define SIZE_MAX[ \t]+UINT32_MAX\n"
-		"#endif";
-    test_text = "#if __WORDSIZE == 64\n"
-		"#define SIZE_MAX          UINT64_MAX\n"
-		"#else\n"
-		"#define SIZE_MAX          UINT32_MAX\n"
-		"#endif";
-};
-
-/*
- * Darwin headers have a stdint.h that defines {U,}INTMAX_{MIN,MAX}
- * with a wrong type.
- */
-fix = {
-    hackname  = darwin_stdint_5;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define INTMAX_MIN   (-9223372036854775807L - 1)\n"
-		"#define INTMAX_MAX   9223372036854775807L\n"
-		"#define UINTMAX_MAX  18446744073709551615UL\n"
-		"#else\n"
-		"#define INTMAX_MIN   (-9223372036854775807LL - 1)\n"
-		"#define INTMAX_MAX   9223372036854775807LL\n"
-		"#define UINTMAX_MAX  18446744073709551615ULL\n"
-		"#endif";
-    select    = "#define INTMAX_MIN[ \t]+INT64_MIN\n"
-		"#define INTMAX_MAX[ \t]+INT64_MAX\n"
-		"\n"
-		"#define UINTMAX_MAX[ \t]+UINT64_MAX";
-    test_text = "#define INTMAX_MIN        INT64_MIN\n"
-		"#define INTMAX_MAX        INT64_MAX\n"
-		"\n"
-		"#define UINTMAX_MAX       UINT64_MAX";
-};
-
-/*
- * Darwin headers have a stdint.h that defines {U,}INTMAX_C
- * with a wrong type.
- */
-fix = {
-    hackname  = darwin_stdint_6;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define PTRDIFF_MIN (-9223372036854775807L - 1)\n"
-		"#define PTRDIFF_MAX 9223372036854775807L\n"
-		"#else\n"
-		"#define PTRDIFF_MIN (-2147483647 - 1)\n"
-		"#define PTRDIFF_MAX 2147483647\n"
-		"#endif";
-    select    = "#if __WORDSIZE == 64\n"
-		"#define PTRDIFF_MIN[ \t]+INT64_MIN\n"
-		"#define PTRDIFF_MAX[ \t]+INT64_MAX\n"
-		"#else\n"
-		"#define PTRDIFF_MIN[ \t]+INT32_MIN\n"
-		"#define PTRDIFF_MAX[ \t]+INT32_MAX\n"
-		"#endif";
-    test_text = "#if __WORDSIZE == 64\n"
-		"#define PTRDIFF_MIN       INT64_MIN\n"
-		"#define PTRDIFF_MAX       INT64_MAX\n"
-		"#else\n"
-		"#define PTRDIFF_MIN       INT32_MIN\n"
-		"#define PTRDIFF_MAX       INT32_MAX\n"
-		"#endif";
-};
-
-/*
- * Darwin headers have a stdint.h that defines {U,}INTMAX_C
- * with a wrong type.
- */
-fix = {
-    hackname  = darwin_stdint_7;
-    mach      = "*-*-darwin*";
-    files     = stdint-darwin.h, stdint.h;
-    c_fix     = format;
-    c_fix_arg = "#if __WORDSIZE == 64\n"
-		"#define INTMAX_C(v)  (v ## L)\n"
-		"#define UINTMAX_C(v) (v ## UL)\n"
-		"#else\n"
-		"#define INTMAX_C(v)  (v ## LL)\n"
-		"#define UINTMAX_C(v) (v ## ULL)\n"
-		"#endif";
-    select    = "#define INTMAX_C\\(v\\)[ \t]+\\(v ## LL\\)\n"
-		"#define UINTMAX_C\\(v\\)[ \t]+\\(v ## ULL\\)";
-    test_text = "#define INTMAX_C(v)  (v ## LL)\n"
-		"#define UINTMAX_C(v) (v ## ULL)";
-};
-
-/*  The SDK included with XCode 10.2 has the file <sys/ucred.h> that uses the
-    C11 _Atomic keyword (exposing it to C++ code).  The work-around here follows
-    the header in declaring the entity volatile when _Atomic is not available.
-*/
-fix = {
-    hackname  = darwin_ucred__Atomic;
-    mach      = "*-*-darwin*";
-    files     = sys/ucred.h;
-    select    = "_Atomic";
-    c_fix     = wrap;
-    c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n"
-		"# define _Atomic volatile\n"
-		"#endif\n";
-    c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n"
-		"# undef _Atomic\n"
-		"#endif\n";
-    test_text = ""; /* Don't provide this for wrap fixes.  */
-};
-
-/*
- *  Fix <c_asm.h> on Digital UNIX V4.0:
- *  It contains a prototype for a DEC C internal asm() function,
- *  clashing with gcc's asm keyword.  So protect this with __DECC.
- */
-fix = {
-    hackname = dec_intern_asm;
-    files    = c_asm.h;
-    sed = "/^[ \t]*float[ \t]*fasm/i\\\n#ifdef __DECC\n";
-    sed = "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n"
-          "#endif\n";
-    test_text =
-    "float fasm {\n"
-    "    ... asm stuff ...\n"
-    "};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/";
-};
-
-/*
- * Fix typo in <wchar.h> on DJGPP 2.03.
- */
-fix = {
-    hackname  = djgpp_wchar_h;
-    file      = wchar.h;
-    select    = "__DJ_wint_t";
-    bypass    = "sys/djtypes.h";
-    c_fix     = format;
-    c_fix_arg = "%0\n#include <sys/djtypes.h>";
-    c_fix_arg = "#include <stddef.h>";
-    test_text = "#include <stddef.h>\n"
-                "extern __DJ_wint_t x;\n";
-};
-
-/*
- * Fix these Sun OS files to avoid an invalid identifier in an #ifdef.
- */
-fix = {
-    hackname  = ecd_cursor;
-    files     = "sunwindow/win_lock.h";
-    files     = "sunwindow/win_cursor.h";
-    select    = 'ecd\.cursor';
-    c_fix     = format;
-    c_fix_arg = 'ecd_cursor';
-
-    test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */";
-};
-
-/*
- *  Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64
- *  that fails when compiling for SSE-less 32-bit x86.
- */
-fix = {
-    hackname  = feraiseexcept_nosse_divbyzero;
-    mach      = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*';
-    files     = bits/fenv.h, '*/bits/fenv.h';
-    select    = "^([\t ]*)__asm__ __volatile__ \\(\"divss %1, %0 *\" : "
-		": \"x\" \\(__f\\), \"x\" \\(__g\\)\\);$";
-    bypass    = "\"fdivp .*; fwait\"";
-    
-    c_fix     = format;
-    c_fix_arg = <<- _EOText_
-	# ifdef __SSE_MATH__
-	%0
-	# else
-	%1__asm__ __volatile__ ("fdivp %%%%st, %%%%st(1); fwait"
-	%1			: "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
-	# endif
-	_EOText_;
-
-    test_text = <<- _EOText_
-	  __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
-	_EOText_;
-};
-
-/*
- *  Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64
- *  that fails when compiling for SSE-less 32-bit x86.
- */
-fix = {
-    hackname  = feraiseexcept_nosse_invalid;
-    mach      = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*';
-    files     = bits/fenv.h, '*/bits/fenv.h';
-    select    = "^([\t ]*)__asm__ __volatile__ \\(\"divss %0, %0 *\" : "
-		": \"x\" \\(__f\\)\\);$";
-    bypass    = "\"fdiv .*; fwait\"";
-    
-    c_fix     = format;
-    c_fix_arg = <<- _EOText_
-	# ifdef __SSE_MATH__
-	%0
-	# else
-	%1__asm__ __volatile__ ("fdiv %%%%st, %%%%st(0); fwait"
-	%1			: "=t" (__f) : "0" (__f));
-	# endif
-	_EOText_;
-
-    test_text = <<- _EOText_
-	  __asm__ __volatile__ ("divss %0, %0" : : "x" (__f));
-	_EOText_;
-};
-
-/*
- *  Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
- *  neither the existence of GCC 3 nor its exact feature set yet break
- *  (by design?) when __GNUC__ is set beyond 2.
- */
-fix = {
-    hackname  = freebsd_gcc3_breakage;
-    mach      = "*-*-freebsd*";
-    files     = sys/cdefs.h;
-    select    = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
-    bypass    = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)';
-    c_fix     = format;
-    c_fix_arg = '%0 || __GNUC__ >= 3';
-    test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7';
-};
-
-/*
- *  Some releases of FreeBSD 4 and FreeBSD 5.0 and 5.1 system headers presume
- *  neither the existence of GCC 4 nor its exact feature set yet break
- *  (by design?) when __GNUC__ is set beyond 3.
- */
-fix = {
-    hackname  = freebsd_gcc4_breakage;
-    mach      = "*-*-freebsd*"; 
-    files     = sys/cdefs.h;
-    select    = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 \|\| __GNUC__ == 3$';
-    c_fix     = format;
-    c_fix_arg = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3';
-    test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3';
-};
-
-/*
- *  Some versions of glibc don't expect the C99 inline semantics.
- */
-fix = {
-    hackname  = glibc_c99_inline_1;
-    files     = features.h, '*/features.h';
-    select    = "^ *&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__$";
-    c_fix     = format;
-    c_fix_arg = "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)";
-    test_text = <<-EOT
-	#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
-	    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
-	# define __USE_EXTERN_INLINES	1
-	#endif
-	EOT;
-};
-
-/*
- *  Similar, but a version that didn't have __NO_INLINE__
- */
-fix = {
-    hackname  = glibc_c99_inline_1a;
-    files     = features.h, '*/features.h';
-    select    = "(\\) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__)\n"
-		"(#[ \t]*define[ \t]*__USE_EXTERN_INLINES[ \t]*1)";
-    c_fix     = format;
-    c_fix_arg = "%1 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)\n%2";
-    test_text = <<-EOT
-	#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
-	# define __USE_EXTERN_INLINES	1
-	#endif
-	EOT;
-};
-
-/*
- * The glibc_c99_inline_1 fix should have fixed everything.  Unfortunately
- * there are many glibc headers which do not respect __USE_EXTERN_INLINES.
- * The remaining glibc_c99_inline_* fixes deal with some of those headers.
- */
-fix = {
-    hackname  = glibc_c99_inline_2;
-    files     = sys/stat.h, '*/sys/stat.h';
-    select    = "extern __inline__ int";
-    sed     = "s/extern int \\(stat\\)/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int \\1/";
-    sed     = "s/extern int \\([lf]stat\\)/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int \\1/";
-    sed     = "s/extern int \\(mknod\\)/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int \\1/";
-    sed     = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int __REDIRECT\\1 (\\2/";
-    sed     = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int __REDIRECT\\1 (\\2/";
-    sed     = "s/^extern __inline__ int/"
-              "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
-              "__inline__ int/";
-    test_text = <<-EOT
-	extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
-	extern __inline__ int
-	__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
-	{}
-	EOT;
-};
-
-/*
- * glibc_c99_inline_3
- */
-fix = {
-    hackname  = glibc_c99_inline_3;
-    files     = bits/string2.h, '*/bits/string2.h';
-    select    = "extern __inline";
-    bypass    = "__extern_inline|__GNU_STDC_INLINE__";
-    c_fix     = format;
-    c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)";
-    c_fix_arg = "^# ifdef __cplusplus$";
-    test_text = <<-EOT
-	# ifdef __cplusplus
-	#  define __STRING_INLINE inline
-	# else
-	#  define __STRING_INLINE extern __inline
-	# endif
-	EOT;
-};
-
-/*
- * glibc_c99_inline_4
- */
-fix = {
-    hackname  = glibc_c99_inline_4;
-    files     = sys/sysmacros.h, '*/sys/sysmacros.h', wchar.h, '*/wchar.h',
-    pthread.h, '*/pthread.h';
-    bypass    = "__extern_inline|__gnu_inline__";
-    select    = "(^| )extern __inline";
-    c_fix     = format;
-    c_fix_arg = "%0 __attribute__ ((__gnu_inline__))";
-    test_text = <<-EOT
-	__extension__ extern __inline unsigned int
-	extern __inline unsigned int
-	EOT;
-};
-
-/*  glibc-2.3.5 defines pthread mutex initializers incorrectly,
- *  so we replace them with versions that correspond to the
- *  definition.
- */
-fix = {
-    hackname = glibc_mutex_init;
-    files    = pthread.h;
-    select   = '\{ *\{ *0, *\} *\}';
-    sed      = "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
-               "N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}";
-    sed      = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
-               "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/";
-    sed      = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
-               "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/";
-    sed      = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
-               "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
-    sed      = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
-               "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
-    sed      = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
-               "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/";
-    sed      = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
-               "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
-    sed      = "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
-               "N;s/^[ \t]*#[ \t]*"
-               "\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
-               "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n"
-               "#  \\1\\\n"
-               "  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
-               "# else\\\n"
-               "#  \\1\\\n"
-               "  { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
-               "# endif/";
-    sed      = "s/{ \\(0, 0, 0, 0, 0, 0, "
-               "PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
-    sed      = "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/"
-               "s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
-
-    test_text = <<- _EOText_
-	#define PTHREAD_MUTEX_INITIALIZER \\
-	  { { 0, } }
-	#ifdef __USE_GNU
-	# if __WORDSIZE == 64
-	#  define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-	#  define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-	#  define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-	# else
-	#  define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-	#  define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-	#  define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
-	  { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-	# endif
-	#endif
-	# define PTHREAD_RWLOCK_INITIALIZER \\
-	  { { 0, } }
-	# ifdef __USE_GNU
-	#  if __WORDSIZE == 64
-	#   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
-	  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,			      \\
-	      PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-	#  else
-	#   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
-	  { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-	#  endif
-	# endif
-	#define PTHREAD_COND_INITIALIZER { { 0, } }
-	_EOText_;
-};
-
-/* glibc versions before 2.5 have a version of stdint.h that defines
-   UINT8_C and UINT16_C to produce unsigned constants, as do uClibc
-   versions with stdint.h based on those glibc versions.  */
-fix = {
-    hackname  = glibc_stdint;
-    files     = stdint.h;
-    select    = "GNU C Library";
-    c_fix     = format;
-    c_fix_arg = "# define UINT8_C(c)\tc\n# define UINT16_C(c)\tc";
-    c_fix_arg = "# define UINT8_C\\(c\\)\tc ## U\n# define UINT16_C\\(c\\)\tc ## U";
-    test_text = "/* This file is part of the GNU C Library.  */\n"
-        "# define UINT8_C(c)\tc ## U\n"
-        "# define UINT16_C(c)\tc ## U";
-};
-
-/* Some versions of glibc have a version of bits/string2.h that
-   produces "value computed is not used" warnings from strncpy; fix
-   this definition by using __builtin_strncpy instead as in newer
-   versions.  */
-fix = {
-    hackname  = glibc_strncpy;
-    files     = bits/string2.h, '*/bits/string2.h';
-    bypass    = "__builtin_strncpy";
-    c_fix     = format;
-    c_fix_arg = "#  define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)";
-    c_fix_arg = "#  define strncpy([^\n]*\\\\\n)*[^\n]*";
-    test_text = <<-EOT
-	#  define strncpy(dest, src, n) \
-	  (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n)      \\
-			  ? (strlen (src) + 1 >= ((size_t) (n))			      \\
-			     ? (char *) memcpy (dest, src, n)			      \\
-			     : strncpy (dest, src, n))				      \\
-			  : strncpy (dest, src, n)))
-	EOT;
-
-};
-
-/* glibc's tgmath.h relies on an expression that is not an integer
-   constant expression being treated as it was by GCC 4.4 and
-   earlier.  */
-fix = {
-    hackname  = glibc_tgmath;
-    files     = tgmath.h;
-    select    = '\(\(\(type\) 0.25\) && \(\(type\) 0.25 - 1\)\)';
-    bypass    = "__floating_type\\(type\\) \\\\\n.*__builtin_classify_type";
-    c_fix     = format;
-    c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || "
-        "(__builtin_classify_type ((type) 0) == 9 && "
-            "__builtin_classify_type (__real__ ((type) 0)) == 8))";
-    test_text = "# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))";
-};
-
-/*
- * Fix these files to use the types we think they should for
- * ptrdiff_t, size_t, and wchar_t.
- *
- * This defines the types in terms of macros predefined by our 'cpp'.
- * This is supposedly necessary for glibc's handling of these types.
- * It's probably not necessary for anyone else, but it doesn't hurt.
- */
-fix = {
-    hackname  = gnu_types;
-    files  = "sys/types.h";
-    files  = "stdlib.h";
-    files  = "sys/stdtypes.h";
-    files  = "stddef.h";
-    files  = "memory.h";
-    files  = "unistd.h";
-    bypass    = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
-    select    = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
-    c_fix     = gnu_type;
-    /* The Solaris 10 headers already define these types correctly.  */
-    mach   = '*-*-solaris2.1[0-9]*';
-    not_machine = true;
-
-    test_text = "typedef long int ptrdiff_t; /* long int */\n"
-                "typedef uint_t size_t; /* uint_t */\n"
-                "typedef ushort_t wchar_t; /* ushort_t */";
-};
-
-/*
- *  Fix HP & Sony's use of "../machine/xxx.h"
- *  to refer to:  <machine/xxx.h>
- */
-fix = {
-    hackname  = hp_inline;
-    files     = sys/spinlock.h;
-    files     = machine/machparam.h;
-    select    = "[ \t]*#[ \t]*include[ \t]+"  '"\.\./machine/';
-
-    c_fix     = format;
-    c_fix_arg = "%1<machine/%2.h>";
-
-    c_fix_arg = "([ \t]*#[ \t]*include[ \t]+)"  '"\.\./machine/'
-                '([a-z]+)\.h"';
-
-    test_text = ' # include "../machine/mumble.h"';
-};
-
-/*
- *  Check for (...) in C++ code in HP/UX sys/file.h.
- */
-fix = {
-    hackname  = hp_sysfile;
-    files     = sys/file.h;
-    select    = "HPUX_SOURCE";
-
-    c_fix     = format;
-    c_fix_arg = "(struct file *, ...)";
-    c_fix_arg = '\(\.\.\.\)';
-
-    test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */";
-};
-
-/*
- *  Un-Hide a series of five FP defines from post-1999 compliance GCC:
- *  FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN
- */
-fix = {
-     hackname  = hppa_hpux_fp_macros;
-     mach      = "hppa*-hp-hpux11*";
-     files     = math.h;
-     select    = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
-		 "#[ \t]*define[ \t]*FP_ZERO.*\n"
-		 "#[ \t]*define[ \t]*FP_INFINITE.*\n"
-		 "#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
-		 "#[ \t]*define[ \t]*FP_NAN.*\n";
-     c_fix     = format;
-     c_fix_arg = <<- _EOFix_
-	#endif /* _INCLUDE_HPUX_SOURCE */
-
-	#if defined(_INCLUDE_HPUX_SOURCE) || \
-	   (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
-	%0#endif
-
-	#ifdef _INCLUDE_HPUX_SOURCE
-
-	_EOFix_;
-
-     test_text =
-            "#  define FP_NORMAL     0\n"
-            "#  define FP_ZERO       1\n"
-            "#  define FP_INFINITE   2\n"
-            "#  define FP_SUBNORMAL  3\n"
-            "#  define FP_NAN        4\n";
-};
-
-/*
- * Delete C++ double pow (double, int) inline function from HP-UX 10 & 11
- * math.h to prevent clash with define in c_std/bits/std_cmath.h.
- */
-fix = {
-    hackname  = hpux10_cpp_pow_inline;
-    files     = fixinc-test-limits.h, math.h;
-    select    = <<-	END_POW_INLINE
-	^# +ifdef +__cplusplus
-	 +\}
-	 +inline +double +pow\(double +__d,int +__expon\) +\{
-	[ 	]+return +pow\(__d,\(double\)__expon\);
-	 +\}
-	 +extern +"C" +\{
-	#else
-	# +endif
-	END_POW_INLINE;
- 
-    c_fix     = format;
-    c_fix_arg = "";
-
-    test_text =
-	"#    ifdef __cplusplus\n"
-	"     }\n"
-	"     inline double pow(double __d,int __expon) {\n"
-	"\t return pow(__d,(double)__expon);\n"
-	"     }\n"
-	'     extern "C"' " {\n"
-	"#else\n"
-	"#    endif";
-};
-
-fix = {
-     hackname  = hpux11_cpp_pow_inline;
-     files     = math.h;
-     select    = " +inline double pow\\(double d,int expon\\) \\{\n"
-                 " +return pow\\(d, \\(double\\)expon\\);\n"
-                 " +\\}\n";
-     c_fix     = format;
-     c_fix_arg = "";
-
-     test_text =
-            "   inline double pow(double d,int expon) {\n"
-            "     return pow(d, (double)expon);\n"
-            "   }\n";
-};
-
-/*
- *  Fix hpux 10.X missing ctype declarations 1
- */
-fix = {
-    hackname = hpux10_ctype_declarations1;
-    files    = ctype.h;
-    select   = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)";
-    bypass   = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\(";
-    c_fix     = format;
-    c_fix_arg = "#ifdef _PROTOTYPES\n"
-		"extern int __tolower(int);\n"
-		"extern int __toupper(int);\n"
-		"#else /* NOT _PROTOTYPES */\n"
-		"extern int __tolower();\n"
-		"extern int __toupper();\n"
-		"#endif /* _PROTOTYPES */\n\n"
-		"%0\n";
-
-    test_text = "#  define _toupper(__c)         __toupper(__c)\n";
-};
-
-/*
- *  Fix hpux 10.X missing ctype declarations 2
- */
-fix = {
-    hackname = hpux10_ctype_declarations2;
-    files    = ctype.h;
-    select   = "^#  if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)";
-    bypass   = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\(";
-    c_fix     = format;
-    c_fix_arg = "%0\n\n"
-		"#ifdef _PROTOTYPES\n"
-		"     extern int _isalnum(int);\n"
-		"     extern int _isalpha(int);\n"
-		"     extern int _iscntrl(int);\n"
-		"     extern int _isdigit(int);\n"
-		"     extern int _isgraph(int);\n"
-		"     extern int _islower(int);\n"
-		"     extern int _isprint(int);\n"
-		"     extern int _ispunct(int);\n"
-		"     extern int _isspace(int);\n"
-		"     extern int _isupper(int);\n"
-		"     extern int _isxdigit(int);\n"
-		"#  else /* not _PROTOTYPES */\n"
-		"     extern int _isalnum();\n"
-		"     extern int _isalpha();\n"
-		"     extern int _iscntrl();\n"
-		"     extern int _isdigit();\n"
-		"     extern int _isgraph();\n"
-		"     extern int _islower();\n"
-		"     extern int _isprint();\n"
-		"     extern int _ispunct();\n"
-		"     extern int _isspace();\n"
-		"     extern int _isupper();\n"
-		"     extern int _isxdigit();\n"
-		"#endif /* _PROTOTYPES */\n";
-
-    test_text = "#  if defined(_SB_CTYPE_MACROS) && !defined(__lint)\n"
-		"     extern unsigned int *__SB_masks;\n";
-};
-
-/*
- *  Fix hpux 10.X missing stdio declarations
- */
-fix = {
-    hackname = hpux10_stdio_declarations;
-    files    = stdio.h;
-    select   = "^#[ \t]*define _iob[ \t]*__iob";
-    bypass   = "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\(";
-    c_fix     = format;
-    c_fix_arg = "%0\n\n"
-	"#  if defined(__STDC__) || defined(__cplusplus)\n"
-	"     extern int snprintf(char *, size_t, const char *, ...);\n"
-	"     extern int vsnprintf(char *, size_t, const char *, __va_list);\n"
-	"#  else /* not __STDC__) || __cplusplus */\n"
-	"     extern int snprintf();\n"
-	"     extern int vsnprintf();\n"
-	"#  endif /* __STDC__) || __cplusplus */\n";
-
-    test_text = "#  define _iob __iob\n";
-};
-
-/*
- *  The HP-UX stddef.h is replaced by gcc's. It doesn't include sys/stdsyms.h.
- *  As a result, we need to include sys/stdsyms.h in alloca.h.
- */
-fix = {
-    hackname  = hppa_hpux11_alloca;
-    mach      = "hppa*-*-hpux11*";
-    files     = alloca.h;
-    select    = "#ifndef _STDDEF_INCLUDED";
-    c_fix     = format;
-    c_fix_arg = "#ifndef _SYS_STDSYMS_INCLUDED\n"
-		"#  include <sys/stdsyms.h>\n"
-		"#endif /* _SYS_STDSYMS_INCLUDED */\n\n"
-		"%0";
-
-    test_text = "#ifndef _STDDEF_INCLUDED";
-};
-
-/*
- *  Make sure hpux defines abs in header.
- */
-fix = {
-    hackname  = hpux11_abs;
-    mach      = "*-hp-hpux11*";
-    files     = stdlib.h;
-    select    = "ifndef _MATH_INCLUDED";
-    c_fix     = format;
-    c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)";
-    test_text = "#ifndef _MATH_INCLUDED";
-};
-
-/*
- *  Fix hpux11 __LWP_RWLOCK_VALID define
- */
-fix = {
-    hackname  = hpux11_lwp_rwlock_valid;
-    mach      = "*-hp-hpux11*";
-    files     = sys/pthread.h;
-    select    = "#define __LWP_RWLOCK_VALID[ \t]*0x8c91";
-    c_fix     = format;
-    c_fix_arg = "#define __LWP_RWLOCK_VALID              -29551";
-    test_text = "#define __LWP_RWLOCK_VALID 0x8c91";
-};
-
-/*
- * hpux sendfile()
- */
-fix = {
-    hackname  = hpux11_extern_sendfile;
-    mach      = "*-hp-hpux11.[12]*";
-    files     = sys/socket.h;
-    select    = "^[ \t]*extern sbsize_t sendfile.*\n.*, int\\)\\);\n";
-    c_fix     = format;
-    c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n";
-    test_text = "   extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n"
-        "                               const struct iovec *, int));\n";
-};
-
-/*
- * hpux sendpath()
- */
-fix = {
-    hackname  = hpux11_extern_sendpath;
-    mach      = "*-hp-hpux11.[12]*";
-    files     = sys/socket.h;
-    select    = "^[ \t]*extern sbsize_t sendpath.*\n.*, int\\)\\);\n";
-    c_fix     = format;
-    c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n";
-    test_text = "   extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n"
-        "                               const struct iovec *, int));\n";
-};
-
-/*
- *  Keep HP-UX 11 from stomping on C++ math namespace
- *  with defines for fabsf.
- */
-fix = {
-    hackname  = hpux11_fabsf;
-    mach      = "*-hp-hpux11*";
-    files     = math.h;
-    select    = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*";
-
-    c_fix     = format;
-    c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
-
-    test_text =
-    "#ifdef _PA_RISC\n"
-    "#  define fabsf(x) ((float)fabs((double)(float)(x)))\n"
-    "#endif";
-};
-
-/*
- *  The definitions for PTHREAD_MUTEX_INITIALIZER and similar initializers
- *  in pthread.h need to be constant expressions to be standard complient.
- *  As a result, we need to remove the void * casts in the initializers
- *  (see hpux11_pthread_const) and to change the __(M|C|RW)POINTER defines
- *  to use the long type.
- */
-fix = {
-    hackname  = hpux11_pthread_pointer;
-    mach      = "*-hp-hpux11.[0-3]*";
-    files     = sys/pthread.h;
-    select    = "(void[ \t]*\\*)(m|c|rw)(_ptr)";
-
-    c_fix     = format;
-    c_fix_arg = "long\t%2%3";
-    test_text = "#define __MPOINTER\t\tvoid\t *m_ptr";
-};
-
-/*
- *  Remove void pointer cast and fix C99 constant in __POINTER_SET defines.
- */
-fix = {
-    hackname  = hpux11_pthread_const;
-    mach      = "*-hp-hpux11.[0-3]*";
-    files     = sys/pthread.h;
-    select    = "^(#define[ \t]+__POINTER_SET[ \t0,]*)(.*\\))";
-
-    c_fix     = format;
-    c_fix_arg = "%11";
-    test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
-};
-
-/*
- * Prevent HP-UX 11 from defining __size_t and preventing size_t from
- * being defined by having it define _hpux_size_t instead.
- */
-fix = {
-    hackname  = hpux11_size_t;
-    mach      = "*-hp-hpux11*";
-    select    = "__size_t";
-
-    c_fix     = format;
-    c_fix_arg = "_hpux_size_t";
-
-    test_text =
-    "#define __size_t size_t\n"
-    "       extern int getpwuid_r( char *, __size_t, struct passwd **);\n";
-};
-
-/*
- *  Fix hpux 11.00 broken snprintf declaration
- *  (third argument is char *, needs to be const char * to prevent
- *  spurious warnings with -Wwrite-strings or in C++).
- */
-fix = {
-    hackname = hpux11_snprintf;
-    files    = stdio.h;
-    select   = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)'
-                                    ' *(char *\*, *\.\.\.\);)';
-    c_fix     = format;
-    c_fix_arg = '%1 const %3';
-
-    test_text = "extern int snprintf(char *, size_t, char *, ...);\n"
-                "extern int snprintf(char *, __size_t, char *, ...);\n"
-                "extern int snprintf(char *, _hpux_size_t, char *, ...);";
-};
-
-/*
- *  Fix hpux 11.00 broken vsnprintf declaration
- */
-fix = {
-    hackname = hpux11_vsnprintf;
-    files    = stdio.h;
-    select   = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, '
-                                     'const char \*,) __va__list\);';
-    c_fix     = format;
-    c_fix_arg = "%1 __va_list);";
-
-    test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,'
-                                     ' __va__list);';
-};
-
-/*
- *  Fix missing const in hpux vsscanf declaration
- */
-fix = {
-    hackname = hpux_vsscanf;
-    mach    = "*-*-hpux*";
-    files   = stdio.h;
-    select  = '(extern int vsscanf\()char';
-    c_fix   = format;
-    c_fix_arg = "%1const char";
-
-    test_text = 'extern int vsscanf(char *, const char *, __va_list);';
-};
-
-/*
- *  get rid of bogus inline definitions in HP-UX 8.0
- */
-fix = {
-    hackname = hpux8_bogus_inlines;
-    files    = math.h;
-    select   = inline;
-    bypass   = "__GNUG__";
-    sed = "s@inline int abs(int [a-z][a-z]*) {.*}"
-           "@extern \"C\" int abs(int);@";
-    sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
-    sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
-    sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
-    test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n"
-                "inline double sqr(double v) { return v**0.5; }";
-};
-
-/*
- * hpux intptr
- */
-fix = {
-    hackname  = hpux_c99_intptr;
-    mach      = "*-hp-hpux11.3*";
-    files     = stdint-hpux11.h, stdint.h;
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*"
-        "INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*"
-        "INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*"
-        "INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*"
-        "INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*"
-        "UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*"
-        "UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@";
-    test_text = "#define PTRDIFF_MAX	INT32_MAX\n"
-		"#define PTRDIFF_MIN	INT32_MIN\n"
-		"#define INTPTR_MAX	INT32_MAX\n"
-		"#define INTPTR_MIN	INT32_MIN\n"
-		"#define UINTPTR_MAX	UINT32_MAX\n"
-		"#define SIZE_MAX	UINT32_MAX\n";
-};
-
-/*
- * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
- */
-fix = {
-    hackname  = hpux_c99_inttypes;
-    mach      = "*-hp-hpux11.[23]*";
-    files     = inttypes.h;
-    files     = stdint-hpux11.h, stdint.h;
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*"
-        "__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*"
-        "__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*"
-        "__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@"
-        "#define UINT32_C(__c) __CONCAT__(__c,u)@";
-    test_text = "#define UINT8_C(__c)     __CONCAT_U__(__c)\n"
-                "#define UINT16_C(__c)    __CONCAT_U__(__c)\n"
-		"#define INT32_C(__c)     __CONCAT__(__c,l)\n"
-		"#define UINT32_C(__c)     __CONCAT__(__c,ul)\n";
-};
-
-/*
- * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
- */
-fix = {
-    hackname  = hpux_c99_inttypes2;
-    mach      = "*-hp-hpux11.2*";
-    files     = stdint-hpux11.h, stdint.h;
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*"
-        "((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*"
-        "((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*"
-        "((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@";
-    sed       = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*"
-        "((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@";
-    test_text = "#  define	INT8_C(__c)	((signed char)(__c))\n"
-                "#  define      UINT8_C(__c)    ((unsigned char)(__c))\n"
-		"#  define      INT16_C(__c)    ((short)(__c))\n"
-		"#  define	UINT16_C(__c)	((unsigned short)(__c))\n";
-};
-
-/*
- * Fix broken and missing defines in inttypes.h
- */
-fix = {
-    hackname  = hpux_c99_inttypes3;
-    mach      = "hppa*-hp-hpux11*";
-    files     = inttypes.h;
-    select    = "#define[ \t]INTPTR_MAX[ \t]*\n"
-		"#define[ \t]UINTPTR_MAX[ \t]*\n";
-    c_fix     = format;
-    c_fix_arg = "#undef SIZE_MAX\n"
-		"#define SIZE_MAX __SIZE_MAX__\n"
-		"#ifdef __INTPTR_MAX__\n"
-		"# undef INTPTR_MAX\n"
-		"# define INTPTR_MAX __INTPTR_MAX__\n"
-		"# undef INTPTR_MIN\n"
-		"# define INTPTR_MIN (-INTPTR_MAX - 1)\n"
-		"#endif\n"
-		"#ifdef __UINTPTR_MAX__\n"
-		"# undef UINTPTR_MAX\n"
-		"# define UINTPTR_MAX __UINTPTR_MAX__\n"
-		"#endif\n";
-    test_text = "#define INTPTR_MAX\n"
-		"#define UINTPTR_MAX\n";
-};
-
-/*
- *  Fix hpux broken ctype macros
- */
-fix = {
-    hackname = hpux_ctype_macros;
-    files    = ctype.h;
-    select   = '((: |\()__SB_masks \? )'
-	       '(__SB_masks\[__(alnum|c)\] & _IS)';
-    c_fix     = format;
-    c_fix_arg = "%1(int)%3";
-
-    test_text = ": __SB_masks ? __SB_masks[__alnum] & _ISCNTRL\n"
-		"# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _IS\n";
-};
-
-/*
- * hpux errno()
- */
-fix = {
-    hackname  = hpux_extern_errno;
-    mach      = "*-hp-hpux10.*";
-    mach      = "*-hp-hpux11.[0-2]*";
-    files     = errno.h;
-    select    = "^[ \t]*extern int errno;$";
-    c_fix     = format;
-    c_fix_arg = "#ifdef __cplusplus\n"
-        "extern \"C\" {\n"
-        "#endif\n"
-        "%0\n"
-        "#ifdef __cplusplus\n"
-        "}\n"
-        "#endif";
-    test_text = "   extern int errno;\n";
-};
-
-/*
- *  Fix hpux broken #ifndef _XOPEN_SOURCE_EXTENDED conditional on htonl etc.
- */
-fix = {
-    hackname = hpux_htonl;
-    files    = netinet/in.h;
-    select   = "#ifndef _XOPEN_SOURCE_EXTENDED[ \t]*\n"
-               "(/\\*\n"
-               " \\* Macros for number representation conversion\\.\n"
-               " \\*/\n"
-               "#ifndef ntohl)";
-    c_fix     = format;
-    c_fix_arg = "#if 1\n%1";
-
-    test_text = "#ifndef _XOPEN_SOURCE_EXTENDED\n"
-                "/*\n"
-                " * Macros for number representation conversion.\n"
-                " */\n"
-                "#ifndef ntohl\n"
-                "#define ntohl(x)        (x)\n"
-                "#define ntohs(x)        (x)\n"
-                "#define htonl(x)        (x)\n"
-                "#define htons(x)        (x)\n"
-                "#endif\n"
-                "#endif  /* ! _XOPEN_SOURCE_EXTENDED */";
-};
-
-/*
- * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
- */
-fix = {
-    hackname  = hpux_imaginary_i;
-    mach      = "ia64-hp-hpux11.*";
-    files     = complex.h;
-    select    = "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*";
-    c_fix     = format;
-    c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)";
-    test_text = "#define _Complex_I (0.f+_Imaginary_I)\n";
-};
-
-/*
- * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
- */
-fix = {
-    hackname  = hpux_inttype_int8_t;
-    mach      = "*-hp-hpux1[01].*";
-    files     = sys/_inttypes.h;
-    select    = "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*";
-    c_fix     = format;
-    c_fix_arg = "typedef signed char int%18_t;";
-    test_text = "typedef char int_least8_t;\n"
-                "typedef char int8_t;\n";
-};
-
-/*
- * HP-UX long_double
- */
-fix = {
-    hackname  = hpux_long_double;
-    mach      = "*-*-hpux10*";
-    mach      = "*-*-hpux11.[012]*";
-    files     = stdlib.h;
-    select    = "extern[ \t]long_double[ \t]strtold";
-    bypass    = "long_double_t";
-    sed       = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D";
-    sed       = "s/long_double/long double/g";
-
-    test_text = "#  ifndef _LONG_DOUBLE\n"
-		"#    define _LONG_DOUBLE\n"
-		"     typedef struct {\n"
-		"       unsigned int word1, word2, word3, word4;\n"
-		"     } long_double;\n"
-		"#  endif /* _LONG_DOUBLE */\n"
-		"extern long_double strtold(const char *, char **);\n";
-};
-
-/*
- * We cannot use the above rule on 11.31 because it removes the strtold
- * definition.  ia64 is OK with no hack, PA needs some help.
- */
-fix = {
-    hackname  = hpux_long_double_2;
-    mach      = "hppa*-*-hpux11.3*";
-    files     = stdlib.h;
-    select    = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| "
-        "defined\\(_PROTOTYPES\\) \\|\\| "
-        "defined\\(_LONG_DOUBLE_STRUCT\\)";
-    c_fix     = format;
-    c_fix_arg = "#  if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)";
-
-    test_text = "#  if !defined(__ia64) || "
-        "!defined(_PROTOTYPES) || "
-        "defined(_LONG_DOUBLE_STRUCT)\n";
-};
-
-/*
- *  Add missing braces to pthread initializer defines.
- */
-fix = {
-    hackname  = hpux_pthread_initializers;
-    mach      = "*-hp-hpux11.[0-3]*";
-    files     = sys/pthread.h;
-    sed       = "s@^[ \t]*1, 1, 1, 1,[ \t]*\\\\"
-		 "@\t{ 1, 1, 1, 1 },\t\t\t\t\t\t\t\\\\@";
-    sed       = "s@^[ \t]*1,[ \t]*\\\\"
-		 "@\t{ 1, 0 }@";
-    sed       = "/^[ \t]*0$/d";
-    sed       = "s@__PTHREAD_MUTEX_VALID, 0"
-		 "@{ __PTHREAD_MUTEX_VALID, 0 }@";
-    sed       = "s@^[ \t]*0, 0, -1, 0,[ \t]*\\\\"
-		 "@\t{ 0, 0, -1, 0 },\t\t\t\t\t\t\\\\@";
-    sed       = "s@0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
-		 "@{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
-    sed       = "s@^[ \t]*__LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
-		 "@\t{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
-    sed       = "s@^[ \t]*0, 0[ \t]*\\\\"
-		 "@\t{ 0, 0 }\t\t\t\t\t\t\t\\\\@";
-    sed       = "s@__PTHREAD_COND_VALID, 0"
-		 "@{ __PTHREAD_COND_VALID, 0 }@";
-    sed       = "s@__LWP_COND_VALID, 0,[ \t]*\\\\"
-		 "@{ __LWP_COND_VALID, 0 },\t\t\t\t\t\\\\@";
-    sed       = "s@__PTHREAD_RWLOCK_VALID, 0"
-		 "@{ __PTHREAD_RWLOCK_VALID, 0 }@";
-    sed       = "s@__LWP_RWLOCK_VALID, 0,[ \t]*\\\\"
-		 "@{ __LWP_RWLOCK_VALID, 0 },\t\t\t\t\t\\\\@";
-    sed       = "s@^[ \t]*0, 0, 0, 0, 0, 0, 0[ \t]*\\\\"
-		 "@\t{ 0, 0, 0, 0, 0 }, { 0, 0}\t\t\t\t\t\\\\@";
-    test_text = "#define PTHREAD_MUTEX_INITIALIZER  {\t\t\t\t\t\\\\\n"
-		"\t__PTHREAD_MUTEX_VALID, 0,\t\t\t\t\t\\\\\n"
-		"\t(PTHREAD_MUTEX_DEFAULT | PTHREAD_PROCESS_PRIVATE),\t\t\\\\\n"
-		"\t__SPNLCK_INITIALIZER,\t\t\t\t\t\t\\\\\n"
-		"\t0, 0, -1, 0,\t\t\t\t\t\t\t\\\\\n"
-		"\t0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,\t\t\t\t\\\\\n"
-		"\t0, 0\t\t\t\t\t\t\t\t\\\\\n"
-		"}\n";
-};
-
-/*
- *  Wrap spu_info in ifdef _KERNEL.  GCC cannot handle an array of unknown
- *  type and mpinfou is only defined when _KERNEL is set.
- */
-fix = {
-    hackname = hpux_spu_info;
-    mach     = "*-hp-hpux*";
-    /*
-     *  It is tempting to omit the first "files" entry.  Do not.
-     *  The testing machinery will take the first "files" entry as the name
-     *  of a test file to play with.  It would be a nuisance to have a directory
-     *  with the name "*".
-     */
-    files    = "ia64/sys/getppdp.h";
-    files    = "*/sys/getppdp.h";
-    select   = "^.*extern.*spu_info.*";
-
-    c_fix     = format;
-    c_fix_arg = "#ifdef _KERNEL\n%0\n#endif";
-
-    test_text = "extern union mpinfou spu_info[];";
-};
-
-/*
- * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
- */
-fix = {
-    hackname  = hpux_stdint_least_fast;
-    mach      = "*-hp-hpux11.2*";
-    files     = stdint-hpux11.h, stdint.h;
-    select    =
-        "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX";
-    c_fix     = format;
-    c-fix-arg = "#  define	UINT_%164_MAX	__UINT64_MAX__";
-    test-text = "#  define       UINT_FAST64_MAX        ULLONG_MAX\n"
-		"#  define       UINT_LEAST64_MAX        ULLONG_MAX\n";
-};
-
-/*
- *  Add noreturn attribute to longjmp declarations in hpux <setjmp.h>
- */
-fix = {
-    hackname = hpux_longjmp;
-    mach     = "*-hp-hpux*";
-    files    = setjmp.h;
-    select   = "^[ \t]*extern[ \t]+void[ \t]+.*longjmp[ \t]*\(__\\(\\(.*int\\)\\)|\\(.*int\\)|\\(\\)\)";
-
-    c_fix     = format;
-    c_fix_arg = "%0 __attribute__ ((__noreturn__))";
-
-    test_text = 'extern void	longjmp __((jmp_buf, int));';
-};
-
-/*
- *  Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
- */
-fix = {
-    hackname = hpux_systime;
-    files    = sys/time.h;
-    select   = "^extern struct sigevent;";
-
-    c_fix     = format;
-    c_fix_arg = "struct sigevent;";
-
-    test_text = 'extern struct sigevent;';
-};
-
-/*
- *  Fix glibc definition of HUGE_VAL in terms of hex floating point constant
- */
-fix = {
-    hackname  = huge_val_hex;
-    files     = bits/huge_val.h, '*/bits/huge_val.h';
-    select    = "^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*";
-    bypass    = "__builtin_huge_val";
-
-    c_fix     = format;
-    c_fix_arg = "#define HUGE_VAL (__builtin_huge_val())\n";
-
-    test_text = "# define HUGE_VAL\t(__extension__ 0x1.0p2047)";
-};
-
-/*
- *  Fix glibc definition of HUGE_VALF in terms of hex floating point constant
- */
-fix = {
-    hackname  = huge_valf_hex;
-    files     = bits/huge_val.h, '*/bits/huge_val.h';
-    select    = "^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*";
-    bypass    = "__builtin_huge_valf";
-
-    c_fix     = format;
-    c_fix_arg = "#define HUGE_VALF (__builtin_huge_valf())\n";
-
-    test_text = "#  define HUGE_VALF (__extension__ 0x1.0p255f)";
-};
-
-/*
- *  Fix glibc definition of HUGE_VALL in terms of hex floating point constant
- */
-fix = {
-    hackname  = huge_vall_hex;
-    files     = bits/huge_val.h, '*/bits/huge_val.h';
-    select    = "^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*";
-    bypass    = "__builtin_huge_vall";
-
-    c_fix     = format;
-    c_fix_arg = "#define HUGE_VALL (__builtin_huge_vall())\n";
-
-    test_text = "#  define HUGE_VALL (__extension__ 0x1.0p32767L)";
-};
-
-/*
  *  Fix return type of abort and free
  */
 fix = {
@@ -2974,25 +326,17 @@
     "}; /* mumbled struct */\n";
 };
 
-/*
- *  Non-traditional "const" declaration in Irix's limits.h.
- */
-fix = {
-    hackname    = irix_limits_const;
-    files       = fixinc-test-limits.h, limits.h;
-    select      = "^extern const ";
-    c_fix       = format;
-    c_fix_arg   = "extern __const ";
-    test_text   = "extern const char limit; /* test limits */";
-};
+/* REINTRODUCE */
 
 /*
- *  IRIX 5.x's stdio.h declares some functions that take a va_list as
+ *  IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare
+ *  some functions that take a va_list as
  *  taking char *.  However, GCC uses void * for va_list, so
  *  calling vfprintf with a va_list fails in C++.  */
 fix = {
     hackname  = irix_stdio_va_list;
     files     = stdio.h;
+    files     = internal/stdio_core.h;
 
     select = '/\* va_list \*/ char \*';
     c_fix  = format;
@@ -3002,83 +346,276 @@
 };
 
 /*
- * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3
- * use / * * / to concatenate tokens.
+ *  IRIX 6.5.1[89] <internal/sgimacros.h> unconditionally defines
+ *  __restrict as restrict iff __c99.  This is wrong for C++, which
+ *  needs many C99 features, but only supports __restrict.
  */
 fix = {
-    hackname = kandr_concat;
-    files  = "sparc/asm_linkage.h";
-    files  = "sun*/asm_linkage.h";
-    files  = "arm/as_support.h";
-    files  = "arm/mc_type.h";
-    files  = "arm/xcb.h";
-    files  = "dev/chardefmac.h";
-    files  = "dev/ps_irq.h";
-    files  = "dev/screen.h";
-    files  = "dev/scsi.h";
-    files  = "sys/tty.h";
-    files  = "Xm.acorn/XmP.h";
-    files  = bsd43/bsd43_.h;
-    select = '/\*\*/';
-    c_fix     = format;
-    c_fix_arg = '##';
-    test_text = "#define __CONCAT__(a,b) a/**/b";
+    hackname  = irix___restrict;
+    files     = internal/sgimacros.h;
+    select    = "(#ifdef __c99\n)(#[ \t]*define __restrict restrict)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix     = format;
+    c_fix_arg = "%1"
+		"#  ifndef __cplusplus\n%2\n#  endif";
+
+    test_text = "#ifdef __c99\n#  define __restrict restrict";
 };
 
 /*
- * The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines
- * an _SC_GR0_OFFSET macro using an idiom that isn't a compile time
- * constant on recent versions of g++.
- */
-fix = {
-    hackname = linux_ia64_ucontext;
-    files = "sys/ucontext.h";
-    mach = "ia64-*-linux*";
-    select = '\(\(\(char \*\) &\(\(struct sigcontext \*\) 0\)'
-             '->sc_gr\[0\]\) - \(char \*\) 0\)';
-    c_fix = format;
-    c_fix_arg = "__builtin_offsetof \(struct sigcontext, sc_gr[0]\)";
-    test_text = "# define _SC_GR0_OFFSET\t\\\\\n"
-	"\t(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)\n";
+ * IRIX 6.5.22 <internal/math_core.h> uses the SGI c99 __generic() intrinsic
+ * to define the fpclasify, isfinite, isinf, isnan, isnormal and signbit 
+ * functions.
+ *
+ * This was probably introduced around IRIX 6.5.18
+ */
+fix = {
+    hackname  = irix___generic1;
+    files     = internal/math_core.h;
+    mach      = "mips-sgi-irix6.5";
+    select    = "#define ([a-z]+)\\(x\\) *__generic.*";
+
+    c_fix     = format;
+    c_fix_arg = "extern int %1(double);\n"
+		"extern int %1f(float);\n"
+		"extern int %1l(long double);\n"
+	    "#if !defined(__cplusplus)\n"
+		"#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n"
+		"               : sizeof(x) == sizeof(float) ? _%1f(x) \\\n"
+		"               : _%1l(x))\n"
+	    "#else\n"
+	    "namespace std\n"
+	    "{\n"
+	    "    inline int %1(double x) { return _%1(x); };\n"
+	    "    inline int %1f(float x) { return _%1f(x); };\n"
+	    "    inline int %1l(long double x) { return _%1l(x); };\n"
+	    "}\n"
+        "#endif\n";
+
+    test_text = 
+      "#define isnan(x) __generic(x,,, _isnan, _isnanf, _isnanl,,,)(x)\n";
 };
 
-/* 
- *  Remove header file warning from sys/time.h.  Autoconf's
- *  AC_HEADER_TIME recommends to include both sys/time.h and time.h
- *  which causes warning on LynxOS.  Remove the warning.
- */
+/* Likewise <internal/math_core.h> on IRIX 6.5.19 and later uses the SGI
+   compiler's __generic intrinsic to define isgreater, isgreaterequal,
+   isless, islessequal, islessgreater and isunordered functions.  */
 fix = {
-    hackname  = lynxos_no_warning_in_sys_time_h;
-    files     = sys/time.h;
-    select    = "#warning[ \t]+Using <time.h> instead of <sys/time.h>";
+    hackname  = irix___generic2;
+    files     = internal/math_core.h;
+    mach      = "mips-sgi-irix6.5";
+    select    = "#define ([a-z]+)\\(x,y\\) *__generic.*";
+
     c_fix     = format;
-    c_fix_arg = "";
-    test_text = "#warning Using <time.h> instead of <sys/time.h>";
+    c_fix_arg = "#define %1(x,y) \\\n"
+		"  ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n"
+		"   : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n"
+		"   : _%1l(x,y))\n";
+
+    test_text = 
+      "#define isless(x,y)         __generic(x,y,, _isless, _islessf, _islessl,,,)(x,y)";
 };
 
-/* 
- *  Add missing declaration for putenv.
+
+/*
+ * IRIX 6.5 complex.h defines _Complex_I and _Imaginary_I in terms of __I__,
+ * which is a MIPSpro compiler builtin.  Remove _Imaginary_I and imaginary
+ * definitions which are not supported by GCC. 
  */
 fix = {
-    hackname  = lynxos_missing_putenv;
-    mach      = '*-*-lynxos*';
-    files     = stdlib.h;
-    bypass    = 'putenv[ \t]*\\(';
-    select    = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);";
+    hackname  = irix_complex;
+    mach      = "mips-sgi-irix6.5";
+    files     = complex.h;
+    select    = "#define[ \t]_Complex_I[ \t]\\(\\(float[ \t]_Complex\\)[ \t]\\(__I__\\)\\)";
+    sed	      = "s/#define[ \t]_Complex_I[ \t]((float[ \t]_Complex)[ \t](__I__))/"
+		"#define _Complex_I (__extension__ 1.0iF)/";
+    sed	      = "/#define[ \t]imaginary[ \t]_Imaginary/d";
+    sed	      = "/#define[ \t]_Imaginary_I/d";
+    sed       = "s/#define[ \t]I[ \t]_Imaginary_I/#define I _Complex_I/";
+    test_text = "#define _Complex_I ((float _Complex) (__I__))\n"
+		"#define imaginary _Imaginary\n"
+		"// #define _Imaginary_I ((float _Imaginary) 1)\n"
+		"#define _Imaginary_I __I__\n"
+		"#define I _Imaginary_I";
+};
+
+/*
+ *  Non-traditional "const" declaration in Irix's limits.h.
+ */
+fix = {
+    hackname    = irix_limits_const;
+    files       = fixinc-test-limits.h, limits.h;
+    select      = "^extern const ";
+    c_fix       = format;
+    c_fix_arg   = "extern __const ";
+    test_text   = "extern const char limit; /* test limits */";
+};
+
+/*
+ *  IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in
+ *  <pthread.h>.
+ */
+fix = {
+    hackname    = irix_pthread_init;
+    files       = pthread.h;
+    select      = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})";
+
+    mach	= "mips-sgi-irix6.5";
+    c_fix  = format;
+    c_fix_arg   = "%1{ %2 }";
+    test_text   = "#define PTHREAD_MUTEX_INITIALIZER	{ 0 }\n"
+		  "#define PTHREAD_COND_INITIALIZER	{ 0 }\n"
+		  "#define PTHREAD_RWLOCK_INITIALIZER	{ 0 }";
+};
+
+
+/*
+ *  IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t.
+ *  Various socket function prototypes use different types instead,
+ *  depending on the API in use (BSD, XPG4/5), but the socklen_t
+ *  definition doesn't reflect this (SGI Bug Id 864477, fixed in
+ *  IRIX 6.5.19).
+ */
+fix = {
+    hackname  = irix_socklen_t;
+    files     = sys/socket.h;
+    select    = "(#define _SOCKLEN_T\n)(typedef u_int32_t socklen_t;)";
+
+    mach      = "mips-sgi-irix6.5";
     c_fix     = format;
-    c_fix_arg = "%0\n"
-        "extern int putenv				_AP((char *));";
-    c_fix_arg = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);";
-    test_text = "extern char *getenv	_AP((const char *));";
+    c_fix_arg = "%1"
+    		"#if _NO_XOPEN4 && _NO_XOPEN5\n"
+    		"typedef int socklen_t;\n"
+		"#else\n"
+    		"%2\n"
+    		"#endif /* _NO_XOPEN4 && _NO_XOPEN5 */";
+
+    test_text = "#define _SOCKLEN_T\ntypedef u_int32_t socklen_t;";
 };
 
 /*
- * Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_.
- *
- * On NetBSD, machine is a symbolic link to an architecture specific
- * directory name, so we can't match a specific file name here.
+ *  IRIX 6.5 <stdint.h> only works with ISO C99 and errors out
+ *  otherwise.
  */
 fix = {
+    hackname  = irix_stdint_c99_mode;
+    files     = stdint.h;
+    select = "(#ifndef __c99\n)(#error This header file is to be used only for c99 mode compilations)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix  = format;
+    c_fix_arg = "#if 0\n"
+	        "%2";
+    test_text =
+    "#ifndef __c99\n#error This header file is to be used only for c99 mode compilations\n#else";
+};
+
+
+/*
+ *  IRIX 6.5 <stdint.h> has some *_MIN/MAX constants whose types don't
+ *  match the corresponding types, as required by ISO C99.
+ */
+fix = {
+    hackname  = irix_stdint_c99_types;
+    files     = stdint-irix65.h, stdint.h;
+    mach      = "mips-sgi-irix6.5";
+    sed       = "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@"
+                "#define INT64_MIN               (-0x7fffffffffffffffLL - 1)@";
+    sed       = "s@^#define INT64_MAX.*0x7fffffffffffffff$@"
+                "#define INT64_MAX               0x7fffffffffffffffLL@";
+    sed       = "s@^#define UINT32_MAX.*0xffffffff$@"
+                "#define UINT32_MAX              0xffffffffU@";
+    sed       = "s@^#define UINT64_MAX.*0xffffffffffffffff$@"
+                "#define UINT64_MAX              0xffffffffffffffffULL@";
+    sed       = "s@^#define INTPTR_MIN.*INT32_MIN$@"
+                "#define INTPTR_MIN              (-0x7fffffffL - 1)@";
+    sed       = "s@^#define INTPTR_MAX.*INT32_MAX$@"
+                "#define INTPTR_MAX              0x7fffffffL@";
+    sed       = "s@^#define UINTPTR_MAX.*UINT32_MAX$@"
+                "#define UINTPTR_MAX             0xffffffffUL@";
+    sed       = "s@^#define INTPTR_MIN.*INT64_MIN@"
+                "#define INTPTR_MIN              (-0x7fffffffffffffffL - 1)@";
+    sed       = "s@^#define INTPTR_MAX.*INT64_MAX$@"
+                "#define INTPTR_MAX              0x7fffffffffffffffL@";
+    sed       = "s@^#define UINTPTR_MAX.*UINT64_MAX$@"
+                "#define UINTPTR_MAX             0xffffffffffffffffUL@";
+    sed       = "s@^#define PTRDIFF_MIN.*INT64_MIN$@"
+                "#define PTRDIFF_MIN             (-0x7fffffffffffffffL - 1)@";
+    sed       = "s@^#define PTRDIFF_MAX.*INT64_MAX$@"
+                "#define PTRDIFF_MAX             0x7fffffffffffffffL@";
+    sed       = "s@^#define SIZE_MAX.*UINT64_MAX$@"
+                "#define SIZE_MAX                0xffffffffffffffffUL@";
+    test_text = "#define INT64_MIN               (-0x7fffffffffffffff - 1)\n"
+                "#define INT64_MAX               0x7fffffffffffffff\n"
+                "#define UINT32_MAX              0xffffffff\n"
+                "#define UINT64_MAX              0xffffffffffffffff\n"
+                "#define INTPTR_MIN              INT32_MIN\n"
+                "#define INTPTR_MAX              INT32_MAX\n"
+                "#define UINTPTR_MAX             UINT32_MAX\n"
+                "#define INTPTR_MIN              INT64_MIN\n"
+                "#define INTPTR_MAX              INT64_MAX\n"
+                "#define UINTPTR_MAX             UINT64_MAX\n"
+                "#define PTRDIFF_MIN             INT64_MIN\n"
+                "#define PTRDIFF_MAX             INT64_MAX\n"
+                "#define SIZE_MAX                UINT64_MAX";
+};
+
+
+/*
+ *  IRIX 6.5 <stdint.h> uses casts in some macros which cannot thus be used
+ *  in preprocessor tests, although ISO C99 requires this.
+ */
+fix = {
+    hackname  = irix_stdint_c99_macros;
+    files     = stdint-irix65.h, stdint.h;
+    mach      = "mips-sgi-irix6.5";
+    sed       = "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x)               (x)@";
+    sed       = "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x)              (x)@";
+    sed       = "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x)              (x)@";
+    sed       = "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x)              (x ## LL)@";
+    sed       = "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x)              (x)@";
+    sed       = "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x)             (x)@";
+    sed       = "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x)             (x ## U)@";
+    sed       = "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x)             (x ## ULL)@";
+    sed       = "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x)             (x ## LL)@";
+    sed       = "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x)            (x ## ULL)@";
+    test_text = "#define INT8_C(x)               (int_least8_t)(x)\n"
+                "#define INT16_C(x)              (int_least16_t)(x)\n"
+                "#define INT32_C(x)              (int_least32_t)(x)\n"
+                "#define INT64_C(x)              (int_least64_t)(x)\n"
+                "#define UINT8_C(x)              (uint_least8_t)(x)\n"
+                "#define UINT16_C(x)             (uint_least16_t)(x)\n"
+                "#define UINT32_C(x)             (uint_least32_t)(x)\n"
+                "#define UINT64_C(x)             (uint_least64_t)(x)\n"
+                "#define INTMAX_C(x)             (intmax_t)(x)\n"
+                "#define UINTMAX_C(x)            (uintmax_t)(x)";
+};
+
+
+/*
+ *  IRIX 6.5.19 <internal/wchar_core.h> provides the XPG4 variant of
+ *  wcsftime by default.  ISO C99 requires the XPG5 variant instead.
+ */
+fix = {
+    hackname  = irix_wcsftime;
+    files     = internal/wchar_core.h;
+    select    = "#if _NO_XOPEN5\n(extern size_t[ \t]+wcsftime.*const char \*.*)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix     = format;
+    c_fix_arg = "#if _NO_XOPEN5 && !defined(__c99)\n%1";
+
+    test_text = "#if _NO_XOPEN5\n"
+		"extern size_t wcsftime(wchar_t *, "
+		"__SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, "
+		"const struct tm *);";
+};
+
+
+
+/* END REINTRODUCE */
+
+fix = {
     hackname = machine_ansi_h_va_list;
     select   = "define[ \t]+_BSD_VA_LIST_[ \t]";
     bypass   = '__builtin_va_list';
@@ -3091,19 +628,6 @@
 };
 
 /*
- *  Fix non-ansi machine name defines
- */
-fix = {
-    hackname  = machine_name;
-    c_test    = machine_name;
-    c_fix     = machine_name;
-
-    test_text = "/* MACH_DIFF: */\n"
-    "#if defined( i386 ) || defined( sparc ) || defined( vax )"
-    "\n/* no uniform test, so be careful  :-) */";
-};
-
-/*
  *  Some math.h files define struct exception (it's in the System V
  *  Interface Definition), which conflicts with the class exception defined
  *  in the C++ file std/stdexcept.h.  We redefine it to __math_exception.
@@ -3188,61 +712,6 @@
 };
 
 /*
- *  Some versions of NetBSD don't expect the C99 inline semantics.
- */
-fix = {
-    hackname  = netbsd_c99_inline_1;
-    mach      = "*-*-netbsd*";
-    files     = signal.h;
-    select    = "extern __inline int";
-
-    c_fix     = format;
-    c_fix_arg = "extern\n"
-		"#ifdef __GNUC_STDC_INLINE__\n"
-		"__attribute__((__gnu_inline__))\n"
-		"#endif\n"
-		"__inline int";
-
-    test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}";
-};
-
-/*
- * netbsd_c99_inline_2
- */
-fix = {
-    hackname  = netbsd_c99_inline_2;
-    mach      = "*-*-netbsd*";
-    files     = signal.h;
-    select    = "#define _SIGINLINE extern __inline";
-
-    c_fix     = format;
-    c_fix_arg = <<- _EOArg_
-	#ifdef __GNUC_STDC_INLINE__
-	#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline
-	#else
-	%0
-	#endif
-	_EOArg_;
-
-    test_text = "#define _SIGINLINE extern __inline";
-};
-
-/*
- * NetBSD has a semicolon after the ending '}' for some extern "C".
- */
-fix = {
-    hackname  = netbsd_extra_semicolon;
-    mach      = "*-*-netbsd*";
-    files     = sys/cdefs.h;
-    select    = "#define[ \t]*__END_DECLS[ \t]*};";
-
-    c_fix     = format;
-    c_fix_arg = "#define __END_DECLS }";
-
-    test_text = "#define __END_DECLS };";
-};
-
-/*
  * newlib's stdint.h has several failures to conform to C99.  The fix
  *  for these removed a comment that can be matched to identify unfixed
  *  versions.
@@ -3309,73 +778,6 @@
                 "/** Macros for minimum-width integer constant expressions */";
 };
 
-/*
- *  NeXT 3.2 adds const prefix to some math functions.
- *  These conflict with the built-in functions.
- */
-fix = {
-    hackname  = next_math_prefix;
-    files     = ansi/math.h;
-    select    = "^extern[ \t]+double[ \t]+__const__[ \t]";
-
-    c_fix     = format;
-    c_fix_arg = "extern double %1(";
-    c_fix_arg = "^extern[ \t]+double[ \t]+__const__[ \t]+([a-z]+)\\(";
-
-    test_text = "extern\tdouble\t__const__\tmumble();";
-};
-
-/*
- *  NeXT 3.2 uses the word "template" as a parameter for some
- *  functions. GCC reports an invalid use of a reserved key word
- *  with the built-in functions.
- */
-fix = {
-    hackname = next_template;
-    files    = bsd/libc.h;
-    select   = "[ \t]template\\)";
-
-    c_fix     = format;
-    c_fix_arg = "(%1)";
-    c_fix_arg = "\\(([^)]*)[ \t]template\\)";
-    test_text = "extern mumble( char * template); /* fix */";
-};
-
-/*
- *  NeXT 3.2 includes the keyword volatile in the abort() and  exit()
- *  function prototypes. That conflicts with the  built-in functions.
- */
-fix = {
-    hackname = next_volitile;
-    files    = ansi/stdlib.h;
-    select   = "^extern[ \t]+volatile[ \t]+void[ \t]";
-
-    c_fix     = format;
-    c_fix_arg = "extern void %1(";
-    c_fix_arg = "^extern[ \t]+volatile[ \t]+void[ \t]+(exit|abort)\\(";
-
-    test_text = "extern\tvolatile\tvoid\tabort();";
-};
-
-/*
- *  NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1.
- *  Note that version 3 of the NeXT system has wait.h in a different directory,
- *  so that this code won't do anything.  But wait.h in version 3 has a
- *  conditional, so it doesn't need this fix.  So everything is okay.
- */
-fix = {
-    hackname  = next_wait_union;
-    files     = sys/wait.h;
-
-    select    = 'wait\(union wait';
-    c_fix     = format;
-    c_fix_arg = "wait(void";
-    test_text = "extern pid_d wait(union wait*);";
-};
-
-/*
- *  a missing semi-colon at the end of the nodeent structure definition.
- */
 fix = {
     hackname  = nodeent_syntax;
     files     = netdnet/dnetdb.h;
@@ -3385,44 +787,6 @@
     test_text = "char *na_addr\t";
 };
 
-/* 
- * Fix OpenBSD's NULL definition.
- */
-fix = {
-  hackname  = openbsd_null_definition;
-  mach      = "*-*-openbsd*";
-  files     = locale.h, stddef.h, stdio.h, string.h,
-  time.h, unistd.h, wchar.h, sys/param.h;
-  select    = "__GNUG__";
-  c_fix = format;
-  c_fix_arg = "#ifndef NULL\n"
-	      "#ifdef __cplusplus\n"
-	      "#ifdef __GNUG__\n"
-	      "#define NULL\t__null\n"
-	      "#else\t /* ! __GNUG__  */\n"
-	      "#define NULL\t0L\n"
-              "#endif\t /* __GNUG__  */\n"
-	      "#else\t /* ! __cplusplus  */\n"
-	      "#define NULL\t((void *)0)\n"
-              "#endif\t /* __cplusplus  */\n"
-              "#endif\t /* !NULL  */";
-
-  c_fix_arg = "^#ifndef[ \t]*NULL\n"
-	      "^#ifdef[ \t]*__GNUG__\n"
-  	      "^#define[ \t]*NULL[ \t]*__null\n"
-  	      "^#else\n"
-              "^#define[ \t]*NULL[ \t]*0L\n"
-              "^#endif\n"
-              "^#endif";
-  test_text = 
-	"#ifndef NULL\n"
-	"#ifdef  __GNUG__\n"
-	"#define NULL    __null\n"
-	"#else\n"
-	"#define NULL    0L\n"
-	"#endif\n"
-	"#endif\n";
-};
 
 /*
  *  obstack.h used casts as lvalues.
@@ -3448,79 +812,6 @@
     test_text = "*((void **) (h)->next_free)++ = (aptr)";
 };
 
-/* 
- * Fix OpenBSD's va_start define.
- */
-fix = {
-  hackname  = openbsd_va_start;
-  mach      = "*-*-openbsd*";
-  files     = stdarg.h;
-  select    = '__builtin_stdarg_start';
-  c_fix     = format;
-  c_fix_arg = __builtin_va_start;
-
-  test_text = "#define va_start(v,l)   __builtin_stdarg_start((v),l)";
-};
-
-/*
- *  sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
- *  defining regex.h related types.  This causes libg++ build and usage
- *  failures.  Fixing this correctly requires checking and modifying 3 files.
- */
-fix = {
-    hackname = osf_namespace_a;
-    files    = reg_types.h;
-    files    = sys/lc_core.h;
-    test     = " -r reg_types.h";
-    test     = " -r sys/lc_core.h";
-    test     = " -n \"`grep '} regex_t;' reg_types.h`\"";
-    test     = " -z \"`grep __regex_t regex.h`\"";
-
-    c_fix     = format;
-    c_fix_arg = "__%0";
-    c_fix_arg = "reg(ex|off|match)_t";
-
-    test_text = "`touch sys/lc_core.h`"
-    "typedef struct {\n  int stuff, mo_suff;\n} regex_t;\n"
-    "extern regex_t    re;\n"
-    "extern regoff_t   ro;\n"
-    "extern regmatch_t rm;\n";
-};
-
-fix = {
-    hackname = osf_namespace_c;
-    files    = regex.h;
-    test     = " -r reg_types.h";
-    test     = " -r sys/lc_core.h";
-    test     = " -n \"`grep '} regex_t;' reg_types.h`\"";
-    test     = " -z \"`grep __regex_t regex.h`\"";
-
-    select    = "#include <reg_types\.h>.*";
-    c_fix     = format;
-    c_fix_arg = "%0\n"
-                "typedef __regex_t\tregex_t;\n"
-                "typedef __regoff_t\tregoff_t;\n"
-                "typedef __regmatch_t\tregmatch_t;";
-
-    test_text = "#include <reg_types.h>";
-};
-
-/*
- * On broken glibc-2.3.3 systems an array of incomplete structures is
- * passed to __sigsetjmp.  Fix that to take a pointer instead.
- */
-fix = {
-    hackname  = pthread_incomplete_struct_argument;
-    files     = pthread.h;
-    select    = "struct __jmp_buf_tag";
-    c_fix     = format;
-    c_fix_arg = "%1 *%2%3";
-    c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) "
-        "(__env)\\[1\\](.*)$";
-    test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], "
-        "int __savemask);";
-};
-
 /*
  *  Fix return type of fread and fwrite on sysV68
  */
@@ -3561,611 +852,6 @@
                 "\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))";
 };
 
-/*
- *  function class(double x) conflicts with C++ keyword on rs/6000
- */
-fix = {
-    hackname  = rs6000_double;
-    files     = math.h;
-    select    = '[^a-zA-Z_]class\(';
-
-    c_fix     = format;
-    c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
-    c_fix_arg = '^.*[^a-zA-Z_]class\(.*';
-
-    test_text = "extern int class();";
-};
-
-/*
- *  Wrong fchmod prototype on RS/6000.
- */
-fix = {
-    hackname  = rs6000_fchmod;
-    files     = sys/stat.h;
-    select    = 'fchmod\(char \*';
-    c_fix     = format;
-    c_fix_arg = "fchmod(int";
-    test_text = "extern int fchmod(char *, mode_t);";
-};
-
-/*
- *  parameters conflict with C++ new on rs/6000
- */
-fix = {
-    hackname  = rs6000_param;
-    files     = "stdio.h";
-    files     = "unistd.h";
-
-    select    = 'rename\(const char \*old, const char \*new\)';
-    c_fix     = format;
-    c_fix_arg = 'rename(const char *_old, const char *_new)';
-
-    test_text = 'extern int rename(const char *old, const char *new);';
-};
-
-/*
- *  Solaris 10+ <sys/feature_tests.h> defines _RESTRICT_KYWD as restrict
- *  for C99.  This is wrong for C++, which needs many C99 features, but
- *  only supports __restrict.
- */
-fix = {
-    hackname  = solaris___restrict;
-    files     = sys/feature_tests.h;
-    select    = "#define[ \t]*_RESTRICT_KYWD[ \t]*restrict";
-    mach      = "*-*-solaris2*";
-    c_fix     = format;
-    c_fix_arg = "#ifdef __cplusplus\n#define\t_RESTRICT_KYWD\t__restrict\n"
-    	        "#else\n%0\n#endif";
-    test_text = "#define	_RESTRICT_KYWD	restrict";
-};
-
-/*
- * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of
- * themselves, which are Sun Studio compiler intrinsics.  Remove _Imaginary_I
- * and imaginary definitions which are not supported by GCC.
- */
-fix = {
-    hackname  = solaris_complex;
-    mach      = "*-*-solaris2.*";
-    files     = complex.h;
-    select    = "#define[ \t]_Complex_I[ \t]_Complex_I";
-    sed	      = "s/#define[ \t]_Complex_I[ \t]_Complex_I/"
-		"#define\t_Complex_I\t(__extension__ 1.0iF)/";
-    sed	      = "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d";
-    sed	      = "/#define[ \t]imaginary[ \t]_Imaginary/d";
-    sed       = "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/";
-    test_text = "#define	_Complex_I	_Complex_I\n"
-    		"#define	complex		_Complex\n"
-		"#define	_Imaginary_I	_Imaginary_I\n"
-		"#define	imaginary	_Imaginary\n"
-		"#undef	I\n"
-		"#define	I		_Imaginary_I";
-};
-
-/*
- * Solaris 10+ <complex.h> is wrapped in #ifndef __cplusplus.  Wrap in
- * extern "C" instead so libstdc++ can use it.
- */
-fix = {
-    hackname  = solaris_complex_cxx;
-    mach      = "*-*-solaris2.*";
-    files     = complex.h;
-    sed	      = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
-    		"#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
-    sed	      = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
-		"#ifdef\t__cplusplus\\\n}\\\n#endif";
-    test_text = "#if !defined(__cplusplus)\n"
-		"#endif	/* !defined(__cplusplus) */";
-};
-
-/*
- *  g++ rejects functions declared with both C and C++ linkage.
- */
-fix = {
-    hackname  = solaris_cxx_linkage;
-    mach      = '*-*-solaris2*';
-    files     = "iso/stdlib_iso.h";
-    select    = "(#if __cplusplus >= 199711L)\n"
-	        "(extern \"C\\+\\+\" \\{\n)"
-	        "(.*(bsearch|qsort).*)";
-    c_fix     = format;
-    c_fix_arg = "%1 && !__GNUG__\n%2%3";
-
-    test_text =
-    "#if __cplusplus >= 199711L\n"
-    "extern \"C++\" {\n"
-    "	void *bsearch(const void *, const void *, size_t, size_t,";
-};
-
-/*
- *  Solaris <iso/stdio_iso.h> doesn't declare getc for C++ with
- *  _STRICT_STDC, but uses it.
- */
-fix = {
-    hackname  = solaris_getc_strict_stdc;
-    mach      = "*-*-solaris2*";
-    files     = "iso/stdio_iso.h";
-    select    = "(.*&& )!defined\\(_STRICT_STDC\\)(.*)";
-    c_fix     = format;
-    c_fix_arg = "%1(!defined(_STRICT_STDC) || (__cplusplus >= 199711L))%2";
-
-    test_text =
-    "#if	!defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)";
-};
-
-/*
- *  Solaris <iso/stdio_iso.h> should deprecate gets before C11.
- */
-fix = {
-    hackname  = solaris_gets_c11;
-    mach      = "*-*-solaris2*";
-    files     = "iso/stdio_iso.h";
-    select    = "(extern char[ \t]*\\*gets\\(char \\*\\));";
-
-    c_fix     = format;
-    c_fix_arg = "#if __STDC_VERSION__ < 201112L && __cplusplus < 201402L\n"
-    		"%1 __attribute__((__deprecated__));\n"
-		"#endif";
-
-    test_text = "extern char	*gets(char *);";
-};
-
-/*
- *  Solaris <iso/stdio_iso.h> shouldn't declare gets for C++14.
- */
-fix = {
-    hackname  = solaris_gets_cxx14;
-    mach      = "*-*-solaris2*";
-    files     = "iso/stdio_iso.h";
-    select    = <<- _EOSelect_
-(#if __STDC_VERSION__ < 201112L)
-(extern char	\*gets\(char \*\) __ATTR_DEPRECATED;)
-_EOSelect_;
-    c_fix     = format;
-    c_fix_arg = "%1 && __cplusplus < 201402L\n%2";
-
-    test_text = <<- _EOText_
-#if __STDC_VERSION__ < 201112L
-extern char	*gets(char *) __ATTR_DEPRECATED;
-_EOText_;
-};
-
-/*
- * Sun Solaris 2 has a version of sys/int_const.h that defines
- * UINT8_C and UINT16_C to unsigned constants.
- */
-fix = {
-    hackname  = solaris_int_const;
-    files     = sys/int_const.h;
-    mach      = '*-*-solaris2*';
-    c_fix     = format;
-    c_fix_arg = "#define\tUINT8_C(c)\t(c)\n"
-                "%1\n"
-                "#define\tUINT16_C(c)\t(c)";
-    select    = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n"
-                "(/\*.*\*/)\n"
-                "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*";
-    test_text =
-    "#define	UINT8_C(c)	__CONCAT__(c,u)\n"
-    "/* CSTYLED */\n"
-    "#define	UINT16_C(c)	__CONCAT__(c,u)";
-};
-
-/*
- * Sun Solaris 2 has a version of sys/int_limits.h that defines
- * UINT8_MAX and UINT16_MAX to unsigned constants.
- */
-fix = {
-    hackname  = solaris_int_limits_1;
-    files     = sys/int_limits.h;
-    mach      = '*-*-solaris2*';
-    c_fix     = format;
-    c_fix_arg = "#define\tUINT8_MAX\t(255)\n"
-                "#define\tUINT16_MAX\t(65535)";
-    select    = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
-                "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)";
-    test_text =
-    "#define	UINT8_MAX	(255U)\n"
-    "#define	UINT16_MAX	(65535U)";
-};
-
-/*
- * Sun Solaris 2 has a version of sys/int_limits.h that defines
- * INT_FAST16 limits to wrong values for sys/int_types.h.
- */
-fix = {
-    hackname  = solaris_int_limits_2;
-    files     = sys/int_limits.h;
-    mach      = '*-*-solaris2*';
-    c_fix     = format;
-    c_fix_arg = "#define\t%1_FAST16_%2 %132_%2";
-    select    = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
-    test_text =
-    "#define	INT_FAST16_MAX INT16_MAX\n"
-    "#define	UINT_FAST16_MAX UINT16_MAX\n"
-    "#define	INT_FAST16_MIN	INT16_MIN";
-};
-
-/*
- * Sun Solaris 2 has a version of sys/int_limits.h that defines
- * SIZE_MAX as unsigned long.
- */
-fix = {
-    hackname  = solaris_int_limits_3;
-    files     = sys/int_limits.h;
-    mach      = '*-*-solaris2*';
-    c_fix     = format;
-    c_fix_arg = "#define\tSIZE_MAX\t4294967295U";
-    select    = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL";
-    test_text =
-    "#define	SIZE_MAX	4294967295UL";
-};
-
-/*
- * Sun Solaris 10 defines several C99 math macros in terms of
- * builtins specific to the Studio compiler, in particular not
- * compatible with the GNU compiler.
- */
-fix = {
-    hackname = solaris_math_1;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\tHUGE_VA%1\t(__builtin_huge_va%2())";
-    c_fix_arg = "^#define[ \t]+HUGE_VA([LF]+)[ \t]+__builtin_huge_va([lf]+)";
-    test_text =
-    '#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"'"\n"
-    "#undef	HUGE_VAL\n"
-    "#define	HUGE_VAL	__builtin_huge_val\n"
-    "#undef	HUGE_VALF\n"
-    "#define	HUGE_VALF	__builtin_huge_valf\n"
-    "#undef	HUGE_VALL\n"
-    "#define	HUGE_VALL	__builtin_huge_vall";
-};
-
-/*
- * On Solaris 11, if you do isinf(NaN) you'll get a floating point
- * exception.  Provide an alternative using GCC's builtin.
- */
-fix = {
-    hackname  = solaris_math_10;
-    select    = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    files     = iso/math_c99.h;
-    c_fix     = format;
-    c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)";
-    c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n"
-                "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);"
-                    "[ \t]*\\\\\n"
-                "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*"
-                    "INFINITY[ \t]*\\|\\|[ \t]*\\\\\n"
-                "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*"
-                    "\\(-INFINITY\\);[ \t]*\\}\\)";
-    test_text =
-    '#pragma ident	"@(#)math_c99.h	1.12	07/01/21 SMI"'"\n"
-    "#undef	isinf\n"
-    "#define	isinf(x)	__extension__( \\\\\n"
-    "			{ __typeof(x) __x_i = (x); \\\\\n"
-    "			__x_i == (__typeof(__x_i)) INFINITY || \\\\\n"
-    "			__x_i == (__typeof(__x_i)) (-INFINITY); })";
-};
-
-/*
- * Solaris math INFINITY
- */
-fix = {
-    hackname = solaris_math_2;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\tINFINITY\t(__builtin_inff())";
-    c_fix_arg = "^#define[ \t]+INFINITY[ \t]+__builtin_infinity";
-    test_text =
-    '#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"'"\n"
-    "#undef	INFINITY\n"
-    "#define	INFINITY	__builtin_infinity";
-};
-
-/*
- * Solaris math NAN
- */
-fix = {
-    hackname = solaris_math_3;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\tNAN\t\t(__builtin_nanf(\"\"))";
-    c_fix_arg = "^#define[ \t]+NAN[ \t]+__builtin_nan";
-    test_text =
-    '#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"'"\n"
-    "#undef	NAN\n"
-    "#define	NAN	__builtin_nan";
-};
-
-/*
- * Solaris math fpclassify
- */
-fix = {
-    hackname = solaris_math_4;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\tfpclassify(x) \\\n"
-                "  __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, "
-                    "FP_SUBNORMAL, FP_ZERO, (x))";
-    c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)";
-    test_text =
-    '#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"'"\n"
-    "#undef	fpclassify\n"
-    "#define	fpclassify(x)	__builtin_fpclassify(x)";
-};
-
-/*
- * Solaris math signbit
- */
-fix = {
-    hackname = solaris_math_8;
-    select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\tsignbit(x)\t(sizeof(x) == sizeof(float) \\\n"
-                "\t\t\t   ? __builtin_signbitf(x) \\\n"
-                "\t\t\t   : sizeof(x) == sizeof(long double) \\\n"
-                "\t\t\t     ? __builtin_signbitl(x) \\\n"
-                "\t\t\t     : __builtin_signbit(x))";
-    c_fix_arg = "^#define[ \t]+signbit\\(x\\)[ \t]+__builtin_signbit\\(x\\)";
-    test_text = <<- _EOText_
-	#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"
-	#undef	signbit
-	#define	signbit(x)	__builtin_signbit(x)
-	_EOText_;
-};
-
-/*
- * Solaris math comparison macros
- */
-fix = {
-    hackname = solaris_math_9;
-    select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    bypass = "__GNUC__";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = "#define\t%1(x, y)%2__builtin_%1(x, y)";
-    c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) "
-                    "__builtin_[a-z]+\\(y\\)\\)";
-    test_text =
-    '#ident	"@(#)math_c99.h	1.9	04/11/01 SMI"'"\n"
-    "#undef	isgreater\n"
-    "#define	isgreater(x, y)		((x) __builtin_isgreater(y))\n"
-    "#undef	isgreaterequal\n"
-    "#define	isgreaterequal(x, y)	((x) __builtin_isgreaterequal(y))\n"
-    "#undef	isless\n"
-    "#define	isless(x, y)		((x) __builtin_isless(y))\n"
-    "#undef	islessequal\n"
-    "#define	islessequal(x, y)	((x) __builtin_islessequal(y))\n"
-    "#undef	islessgreater\n"
-    "#define	islessgreater(x, y)	((x) __builtin_islessgreater(y))\n"
-    "#undef	isunordered\n"
-    "#define	isunordered(x, y)	((x) __builtin_isunordered(y))";
-};
-
-/*
- * Newer Solaris 10/11 GCC signbit implementations cause strict-aliasing
- * warnings.
- */
-fix = {
-    hackname = solaris_math_11;
-    select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ ";
-    files = iso/math_c99.h;
-    c_fix = format;
-    c_fix_arg = << _EOArg_
-#undef	signbit
-#define	signbit(x)	(sizeof(x) == sizeof(float) \
-			   ? __builtin_signbitf(x) \
-			   : sizeof(x) == sizeof(long double) \
-			     ? __builtin_signbitl(x) \
-			     : __builtin_signbit(x))
-_EOArg_;
-    c_fix_arg = << _EOArg_
-^#undef[ 	]+signbit
-#if defined\(__sparc\)
-#define[ 	]+signbit\(x\)[ 	]+__extension__\( \\
-[ 	]+\{[ 	]*__typeof\(x\)[ 	]*__x_s[ 	]*=[ 	]*\(x\);[ 	]*\\
-[ 	]+\(int\)[ 	]*\(\*\(unsigned[ 	]*\*\)[ 	]*\&__x_s[ 	]*>>[ 	]*31\);[ 	]*\}\)
-#elif defined\(__i386\) \|\| defined\(__amd64\)
-#define[ 	]+signbit\(x\)[ 	]+__extension__\( \\
-[ 	]+\{ __typeof\(x\) __x_s = \(x\); \\
-[ 	]+\(sizeof \(__x_s\) == sizeof \(float\) \? \\
-[ 	]+\(int\) \(\*\(unsigned \*\) \&__x_s >> 31\) : \\
-[ 	]+sizeof \(__x_s\) == sizeof \(double\) \? \\
-[ 	]+\(int\) \(\(\(unsigned \*\) \&__x_s\)\[1\] >> 31\) : \\
-[ 	]+\(int\) \(\(\(unsigned short \*\) \&__x_s\)\[4\] >> 15\)\); \}\)
-#endif
-_EOArg_;
-    test_text = << _EOText_
-/* @(#)math_c99.h	1.14	13/03/27 */
-#undef	signbit
-#if defined(__sparc)
-#define	signbit(x)	__extension__( \\
-				{ __typeof(x) __x_s = (x); \\
-				(int) (*(unsigned *) &__x_s >> 31); })
-#elif defined(__i386) || defined(__amd64)
-#define	signbit(x)	__extension__( \\
-			{ __typeof(x) __x_s = (x); \\
-			(sizeof (__x_s) == sizeof (float) ? \\
-			(int) (*(unsigned *) &__x_s >> 31) : \\
-			sizeof (__x_s) == sizeof (double) ? \\
-			(int) (((unsigned *) &__x_s)[1] >> 31) : \\
-			(int) (((unsigned short *) &__x_s)[4] >> 15)); })
-#endif
-_EOText_;
-};
-
-/*
- * Some versions of Solaris 10+ <math.h> #undef libstdc++-internal macros.
- */
-fix = {
-    hackname  = solaris_math_12;
-    files     = math.h;
-    mach      = '*-*-solaris2*';
-    select    = '#undef.*_GLIBCXX_USE_C99_MATH';
-    sed       = "/#undef[ \t]*_GLIBCXX_USE_C99_MATH/d";
-    test_text = << _EOText_
-#if __cplusplus >= 201103L
-#undef  _GLIBCXX_USE_C99_MATH
-#undef  _GLIBCXX_USE_C99_MATH_TR1
-#endif
-_EOText_;
-};
-
-/*
- * Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a
- * structure.  As such, it need two levels of brackets, but only
- * contains one.  Wrap the macro definition in an extra layer.
- */
-fix = {
-    hackname = solaris_once_init_1;
-    select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    files = pthread.h;
-    mach = '*-*-solaris*';
-    c_fix = format;
-    c_fix_arg = "%1{%2}%3";
-    c_fix_arg = "(^#define[ \t]+PTHREAD_ONCE_INIT[ \t]+\\{)([^}]+)(\\})[ \t]*$";
-    test_text =
-    '#pragma ident	"@(#)pthread.h	1.37	04/09/28 SMI"'"\n"
-    "#define PTHREAD_ONCE_INIT\t{0, 0, 0, PTHREAD_ONCE_NOTDONE}";
-};
-
-/*
- * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the
- * posix_spawn declarations, which doesn't work with C++.
- */
-fix = {
-    hackname  = solaris_posix_spawn_restrict;
-    files     = spawn.h;
-    mach      = '*-*-solaris2*';
-    c_fix     = format;
-    c_fix_arg = "%1*_RESTRICT_KYWD %2%3";
-    select    = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)";
-    test_text =
-    "char *const argv[_RESTRICT_KYWD],\n"
-    "char *const envp[_RESTRICT_KYWD]);";
-};
-
-/*
- *  The pow overloads with int were removed in C++ 2011 DR 550.
- */
-fix = {
-    hackname  = solaris_pow_int_overload;
-    mach      = '*-*-solaris2*';
-    files     = "iso/math_iso.h";
-    select    = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
-		" *\\{[^{}]*\n[^{}]*\\}";
-    c_fix     = format;
-    c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif";
-
-    test_text =
-    "	inline long double pow(long double __X, int __Y) { return\n"
-    "		__powl(__X, (long double) (__Y)); }";
-};
-
-/*
- * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some
- *  fields of the pthread_rwlock_t structure, which are of type
- *  upad64_t, which itself is typedef'd to int64_t, but with __STDC__
- *  defined (e.g. by -ansi) it is a union. So change the initializer
- *  to "{0}" instead.
- */
-fix = {
-    hackname = solaris_rwlock_init_1;
-    select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
-    files = pthread.h;
-    mach = '*-*-solaris*';
-    c_fix = format;
-    c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
-                "%0\n"
-                "#else\n"
-                "%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n"
-                "#endif";
-    c_fix_arg = "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)"
-                "\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$";
-
-    test_text =
-    '#ident "@(#)pthread.h  1.26  98/04/12 SMI"'"\n"
-    "#define PTHREAD_RWLOCK_INITIALIZER\t{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
-};
-
-/*
- * Before Solaris 10, <stdio.h> lacks declarations of std::__filbuf and
- * std::__flsbuf, but <iso/stdio_iso.h> uses them.
- */
-fix = {
-    hackname  = solaris_std___filbuf;
-    files     = stdio.h;
-    mach      = '*-*-solaris2*';
-    bypass    = "using std::__filbuf";
-    select    = "(using std::perror;\n)(#endif)";
-    c_fix     = format;
-    c_fix_arg = "%1#ifndef _LP64\n"
-		"using std::__filbuf;\n"
-		"using std::__flsbuf;\n"
-		"#endif\n%2";
-
-    test_text = "using std::perror;\n"
-		"#endif";
-};
-
-/*
- *  Solaris <stdio.h> shouldn't use std::gets for C++14.
- */
-fix = {
-    hackname  = solaris_std_gets_cxx14;
-    mach      = "*-*-solaris2*";
-    files     = "stdio.h";
-    select    = "using std::gets;";
-
-    c_fix     = format;
-    c_fix_arg = "#if __cplusplus < 201402L\n%0\n#endif";
-
-    test_text = "using std::gets;";
-};
-
-/*
- * Sun Solaris 8 has what appears to be some gross workaround for
- * some old version of their c++ compiler.  G++ doesn't want it
- * either, but doesn't want to be tied to SunPRO version numbers.
- */
-fix = {
-    hackname = solaris_stdio_tag;
-    files    = stdio_tag.h;
-
-    select   = '__cplusplus < 54321L';
-    /* In Solaris 10, the code in stdio_tag.h is conditionalized on 
-       "!defined(__GNUC__)" so we no longer need to fix it.  */
-    bypass   = '__GNUC__';
-    sed      = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
-
-    test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
-};
-
-/*
- *  Solaris <stdlib.h> shouldn't use _Noreturn, breaks with C++.
- */
-fix = {
-    hackname  = solaris_stdlib_noreturn;
-    mach      = "*-*-solaris2*";
-    files     = "iso/stdlib_c99.h";
-    select    = "(extern) _Noreturn (void quick_exit\\(int\\));";
-
-    c_fix     = format;
-    c_fix_arg = "%1 %2 __attribute__((__noreturn__));";
-
-    test_text = "extern _Noreturn void quick_exit(int);";
-};
 
 /*
  *  a missing semi-colon at the end of the statsswtch structure definition.
@@ -5057,7 +1743,7 @@
 
     c_fix       = format;
     c_fix_arg   = "%0\n"
-        "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n";
+        "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n";
     c_fix_arg   = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);";
         
     test_text   = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";
@@ -5172,22 +1858,6 @@
 };
 
 /*
- *  This hack ensures the include_next in the fixed unistd.h actually
- *  finds the system's unistd.h and not the fixed unistd.h again.
- */
-fix = {
-    hackname    = vxworks_iolib_include_unistd;
-    files       = ioLib.h;
-    mach        = "*-*-vxworks*";
-    select      = "#include \"unistd.h\"";
-
-    c_fix       = format;
-    c_fix_arg   = "#include <unistd.h>";
-
-    test_text       = "#include \"unistd.h\"";
-};
-
-/*
  *  There are several name conflicts with C++ reserved words in X11 header
  *  files.  These are fixed in some versions, so don't do the fixes if
  *  we find __cplusplus in the file.  These were found on the RS/6000.
diff -Naur gcc-9.5.0/gcc/config/mips/iris6.h gcc-9.5.0-irix/gcc/config/mips/iris6.h
--- gcc-9.5.0/gcc/config/mips/iris6.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/iris6.h	2025-02-13 08:55:07.388956000 +0000
@@ -0,0 +1,387 @@
+/* Definitions of target machine for GNU compiler.  IRIX 6.5 version.
+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+/* We are compiling for IRIX 6 now.  */
+#undef TARGET_IRIX6
+#define TARGET_IRIX6 1
+
+/* we use GNU binutils here */
+#define IRIX_USING_GNU_LD 1
+
+/* Default to -mabi=n32 and -mips3.  */
+#undef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS { "mabi=n32" }
+
+/* -march=native handling only makes sense with compiler running on
+   a MIPS chip.  */
+#if defined(__mips__)
+extern const char *host_detect_local_cpu (int argc, const char **argv);
+# define EXTRA_SPEC_FUNCTIONS \
+  { "local_cpu_detect", host_detect_local_cpu },
+
+# define MARCH_MTUNE_NATIVE_SPECS				\
+  " %{march=native:%<march=native %:local_cpu_detect(arch)}"	\
+  " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
+#else
+# define MARCH_MTUNE_NATIVE_SPECS ""
+#endif
+
+#define PREFERRRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+/* Force the default ABI onto the command line in order to make the specs
+   easier to write.  */
+#undef DRIVER_SELF_SPECS
+#define DRIVER_SELF_SPECS 			\
+  "%{!mabi=*: -mabi=n32}", 			\
+  /* Configuration-independent MIPS rules.  */	\
+  BASE_DRIVER_SELF_SPECS,			\
+  MARCH_MTUNE_NATIVE_SPECS
+
+/* IRIX 6.5 has the float and long double forms of math functions.  */
+#undef TARGET_LIBC_HAS_FUNCTION
+#define TARGET_LIBC_HAS_FUNCTION default_libc_has_function
+/* MIPS specific debugging info */
+/* #define MIPS_DEBUGGING_INFO 1 */
+#define SGUG_DEBUGGING_INFO 1
+
+/* Force the generation of dwarf .debug_frame sections even if not
+   compiling -g.  This guarantees that we can unwind the stack.  */
+#define DWARF2_FRAME_INFO 1
+
+/* The system unwinder in libexc requires a specific dwarf return address
+   column to work.  */
+#undef  DWARF_FRAME_RETURN_COLUMN
+#define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
+
+/* The size in bytes of a DWARF field indicating an offset or length
+   relative to a debug info section, specified to be 4 bytes in the DWARF-2
+   specification.  The SGI/MIPS ABI defines it to be the same as PTR_SIZE.  */
+#define DWARF_OFFSET_SIZE PTR_SIZE
+
+/* The size in bytes of the initial length field in a debug info
+   section.  The DWARF 3 (draft) specification defines this to be
+   either 4 or 12 (with a 4-byte "escape" word when it's 12), but the
+   SGI/MIPS ABI predates this standard and defines it to be the same
+   as DWARF_OFFSET_SIZE.  */
+#define DWARF_INITIAL_LENGTH_SIZE DWARF_OFFSET_SIZE
+
+/* MIPS assemblers don't have the usual .set foo,bar construct;
+   .set is used for assembler options instead.  */
+#undef SET_ASM_OP
+#define ASM_OUTPUT_DEF(FILE, LABEL1, LABEL2)			\
+  do								\
+    {								\
+      fputc ('\t', FILE);					\
+      assemble_name (FILE, LABEL1);				\
+      fputs (" = ", FILE);					\
+      assemble_name (FILE, LABEL2);				\
+      fputc ('\n', FILE);					\
+    }								\
+  while (0)
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
+#undef ASM_DECLARE_OBJECT_NAME
+#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
+
+#undef ASM_FINISH_DECLARE_OBJECT
+#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
+
+/* The native IRIX 6 linker does not support merging without a special
+   elspec(5) file.  */
+#ifndef IRIX_USING_GNU_LD
+#undef HAVE_GAS_SHF_MERGE
+#define HAVE_GAS_SHF_MERGE 0
+#endif
+
+/* Specify wchar_t types.  */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE (Pmode == DImode ? "int" : "long int")
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
+
+/* Same for wint_t.  */
+#undef WINT_TYPE
+#define WINT_TYPE (Pmode == DImode ? "int" : "long int")
+
+#undef WINT_TYPE_SIZE
+#define WINT_TYPE_SIZE INT_TYPE_SIZE
+
+#ifndef USED_FOR_TARGET
+/* Use long for intmax_t, uintmax_t?  */
+extern int long_intmax;
+#endif
+
+/* C99 stdint.h types.  */
+#define INT8_TYPE "signed char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE "long long int"
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE "long long unsigned int"
+
+#define INT_LEAST8_TYPE "signed char"
+#define INT_LEAST16_TYPE "short int"
+#define INT_LEAST32_TYPE "int"
+#define INT_LEAST64_TYPE "long long int"
+#define UINT_LEAST8_TYPE "unsigned char"
+#define UINT_LEAST16_TYPE "short unsigned int"
+#define UINT_LEAST32_TYPE "unsigned int"
+#define UINT_LEAST64_TYPE "long long unsigned int"
+
+#define INT_FAST8_TYPE "signed char"
+#define INT_FAST16_TYPE "short int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE "long long int"
+#define UINT_FAST8_TYPE "unsigned char"
+#define UINT_FAST16_TYPE "short unsigned int"
+#define UINT_FAST32_TYPE "unsigned int"
+#define UINT_FAST64_TYPE "long long unsigned int"
+
+#define INTMAX_TYPE (long_intmax ? "long int" : "long long int")
+#define UINTMAX_TYPE (long_intmax ? "long unsigned int" : "long long unsigned int")
+
+#define INTPTR_TYPE "long int"
+#define UINTPTR_TYPE "long unsigned int"
+
+#define SIG_ATOMIC_TYPE "int"
+
+/* Plain char is unsigned in the SGI compiler.  */
+#undef DEFAULT_SIGNED_CHAR
+#define DEFAULT_SIGNED_CHAR 0
+
+#define TARGET_OS_CPP_BUILTINS()				\
+  do								\
+    {								\
+      builtin_define_std ("host_mips");				\
+      builtin_define_std ("sgi");				\
+      builtin_define_std ("unix");				\
+      builtin_define_std ("SYSTYPE_SVR4");			\
+      builtin_define ("_MODERN_C");				\
+      builtin_define ("_SVR4_SOURCE");				\
+      builtin_define ("__DSO__");				\
+      builtin_assert ("system=unix");				\
+      builtin_assert ("system=svr4");				\
+      builtin_assert ("machine=sgi");				\
+								\
+      if (!ISA_MIPS1 && !ISA_MIPS2)				\
+	builtin_define ("_COMPILER_VERSION=601");		\
+								\
+      /* We must always define _LONGLONG, even when -ansi is	\
+	 used, because IRIX 5 system header files require it.	\
+	 This is OK, because gcc never warns when long long	\
+	 is used in system header files.			\
+								\
+	 An alternative would be to support the SGI builtin	\
+	 type __long_long.  */					\
+      builtin_define ("_LONGLONG");				\
+								\
+      /* IRIX 6.5.18 and above provide many ISO C99		\
+	 features protected by the __c99 macro.			\
+	 libstdc++ v3 needs them as well.  */			\
+      if (flag_isoc99 || c_dialect_cxx ())			\
+	builtin_define ("__c99");				\
+								\
+      /* The GNU C++ standard library requires that		\
+	 __EXTENSIONS__ and _SGI_SOURCE be defined on at	\
+	 least IRIX 6.2 and probably all IRIX 6 prior to 6.5.	\
+	 We don't need this on IRIX 6.5 itself, but it		\
+	 shouldn't hurt other than the namespace pollution.  */	\
+      if (!flag_iso || c_dialect_cxx ())			\
+	{							\
+	  builtin_define ("__EXTENSIONS__");			\
+	  builtin_define ("_SGI_SOURCE");			\
+	}							\
+    }								\
+  while (0)
+
+/* SUBTARGET_OVERRIDE_OPTIONS is run after C_COMMON_OVERRIDE_OPTIONS, so
+   only set long_intmax if uninitialized.  */
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS 		\
+  do						\
+    {						\
+      if (long_intmax == -1)			\
+	long_intmax = mips_abi == ABI_64;	\
+    }						\
+  while (0)
+
+/*
+      if (!global_options_set.x_dwarf_strict)	\
+	dwarf_strict = 1;			\
+      if (!global_options_set.x_dwarf_version)	\
+	dwarf_version = 2;			\
+*/
+
+extern void irix6_c_common_override_options (void);
+#define C_COMMON_OVERRIDE_OPTIONS irix6_c_common_override_options()
+/*
+#undef SUBTARGET_CC1_SPEC
+#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
+*/
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC "%{pthread:-D_REENTRANT}"
+
+#undef INIT_SECTION_ASM_OP
+#define INIT_SECTION_ASM_OP "\t.section\t.gcc_init,\"ax\",@progbits"
+
+#undef FINI_SECTION_ASM_OP
+#define FINI_SECTION_ASM_OP "\t.section\t.gcc_fini,\"ax\",@progbits"
+
+#ifdef IRIX_USING_GNU_LD
+#define IRIX_NO_UNRESOLVED ""
+#else
+#define IRIX_NO_UNRESOLVED "-no_unresolved"
+#endif
+
+#ifdef IRIX_USING_GNU_LD
+#define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
+#define SUBTARGET_WARN_UNUSED_SPEC ""
+#else
+#define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
+#define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
+#endif
+
+/* Profiling is supported via libprof1.a not -lc_p as in IRIX 3.  */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+  "%{!shared: \
+     %{mabi=n32: \
+       %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
+         %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
+           %{!p:/usr/lib32/mips4/crt1.o%s}}} \
+       %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
+         %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
+           %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
+     %{mabi=64: \
+       %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
+         %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
+           %{!p:/usr/lib64/mips4/crt1.o}}} \
+       %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
+         %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
+           %{!p:/usr/lib64/mips3/crt1.o}}}}} \
+  irix-crti.o%s crtbegin.o%s"
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+  "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
+     -L/usr/lib32} \
+   %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
+     -L/usr/lib64} \
+   %{!shared:" \
+     SUBTARGET_DONT_WARN_UNUSED_SPEC \
+     " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
+     SUBTARGET_WARN_UNUSED_SPEC "}"
+
+/* Avoid getting two warnings for libgcc.a everytime we link.  libgcc.a
+   contains references to copysignl, so link with libm to resolve them.  */
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC \
+  SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc -lm " SUBTARGET_WARN_UNUSED_SPEC
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+   crtend.o%s irix-crtn.o%s \
+   %{!shared: \
+     %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
+       %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
+     %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
+       %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
+
+/* Generic part of the LINK_SPEC.  */
+#undef LINK_SPEC
+#define LINK_SPEC "\
+%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
+%{bestGnum} %{shared} %{non_shared} \
+%{call_shared} %{no_archive} %{exact_version} \
+%{!shared: \
+  %{!non_shared: %{!call_shared:%{!r: -call_shared " IRIX_NO_UNRESOLVED "}}}} \
+%{rpath} %{!r: -init __gcc_init -fini __gcc_fini} " IRIX_SUBTARGET_LINK_SPEC
+
+#ifdef IRIX_USING_GNU_LD
+#define IRIX_SUBTARGET_LINK_SPEC \
+  "%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
+#else
+  /* Explicitly hide crt symbols that would normally be marked with
+     a "hidden" visibility attribute.
+     
+     We have traditionally disabled this attribute when using the
+     native linker because the native linker's visibility support is
+     not fully-compatible with the GNU linker's.  In particular, the
+     native linker does not pull in archive objects purely to resolve
+     references to the object's hidden symbols, whereas the GNU
+     linker does.
+     
+     The gcc build system currently hides symbols in some static
+     libraries (typically libgcov.a or libgcc.a) whenever visibility
+     attributes are supported.  On targets with GNU semantics, this
+     makes sure that uses of libx.so symbols in one dynamic object are
+     not resolved to libx.a symbols in another dynamic object.  But
+     on targets with IRIX semantics, hiding the symbols prevents the
+     static archive from working at all.
+     
+     It would probably be better to enable visiblity attributes for
+     IRIX ld and disable the static archives versioning.  It shouldn't
+     make anything worse, since libx.a symbols are global by default
+     anyway.  However, no-one has volunteered to do this yet.  */
+
+#define IRIX_SUBTARGET_LINK_SPEC \
+  "%{w} -_SYSTYPE_SVR4 -woff 131 \
+   %{shared:-hidden_symbol __dso_handle} \
+   %{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
+#endif
+
+/* A linker error can empirically be avoided by removing duplicate
+   library search directories.  */
+/* #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1 */
+
+/* The SGI linker doesn't understand constructor priorities.  */
+#ifndef IRIX_USING_GNU_LD
+#define SUPPORTS_INIT_PRIORITY 0
+#endif
+
+/* Add -g to mips.h default to avoid confusing gas with local symbols
+   generated from stabs info.  */
+#undef NM_FLAGS
+#define NM_FLAGS "-Bng"
+
+/* The system header files are C++ aware.  */
+/* ??? Unfortunately, most but not all of the headers are C++ aware.
+   Specifically, curses.h is not, and as a consequence, defining this
+   used to prevent libg++ building.  This is no longer the case so
+   define it again to prevent other problems, e.g. with getopt in
+   unistd.h.  We still need some way to fix just those files that need
+   fixing.  */
+/*
+#define NO_IMPLICIT_EXTERN_C 1
+*/
+
+/* -G is incompatible with -KPIC which is the default, so only allow objects
+   in the small data section if the user explicitly asks for it.  */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
+
+#define MIPS_TFMODE_FORMAT mips_extended_format
diff -Naur gcc-9.5.0/gcc/config/mips/iris6.opt gcc-9.5.0-irix/gcc/config/mips/iris6.opt
--- gcc-9.5.0/gcc/config/mips/iris6.opt	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/iris6.opt	2025-02-13 08:55:07.390915200 +0000
@@ -0,0 +1,45 @@
+; IRIX 6.5 options.
+
+; Copyright (C) 2011
+; Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+; See the GCC internals manual (options.texi) for a description of
+; this file's format.
+
+; Please try to keep this file in ASCII collating order.
+
+bestGnum
+Driver
+
+call_shared
+Driver
+
+exact_version
+Driver
+
+no_archive
+Driver
+
+non_shared
+Driver
+
+pthread
+Driver
+
+; This comment is to ensure we retain the blank line above.
diff -Naur gcc-9.5.0/gcc/config/mips/irix6-c.c gcc-9.5.0-irix/gcc/config/mips/irix6-c.c
--- gcc-9.5.0/gcc/config/mips/irix6-c.c	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/irix6-c.c	2025-02-13 08:55:07.392820800 +0000
@@ -0,0 +1,38 @@
+/* IRIX 6 support needed only by C/C++ frontends.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tree.h"
+#include "tm.h"
+#include "c-family/c-common.h"
+
+/* For C99, intmax_t, uintmax_t are always long long int, otherwise the
+   type differs between 32-bit and 64-bit compilations.  */
+void
+irix6_c_common_override_options (void)
+{
+  if (flag_isoc99 || c_dialect_cxx ())
+    long_intmax = 0;
+  else
+    /* Cannot use LONG_TYPE_SIZE == 64.  LONG_TYPE_SIZE is only set in
+       mips_option_override after C_COMMON_OVERRIDE_OPTIONS.  */
+    long_intmax = mips_abi == ABI_64;
+}
diff -Naur gcc-9.5.0/gcc/config/mips/mips.c gcc-9.5.0-irix/gcc/config/mips/mips.c
--- gcc-9.5.0/gcc/config/mips/mips.c	2022-05-27 03:21:11.007379000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/mips.c	2025-02-13 08:55:07.482792800 +0000
@@ -474,6 +474,12 @@
 enum processor mips_arch;
 const struct mips_cpu_info *mips_arch_info;
 
+#if TARGET_IRIX6
+/* On IRIX 6, intmax_t and uintmax_t depend on __c99, which is only
+   available in C-family compilers.  See irix6_c_common_override_options.  */
+int long_intmax = -1;
+#endif
+
 /* The processor that we should tune the code for.  */
 enum processor mips_tune;
 const struct mips_cpu_info *mips_tune_info;
@@ -6682,6 +6688,9 @@
       layout_type (record);
       return record;
     }
+  else if (TARGET_IRIX6)
+    /* On IRIX 6, this type is 'char *'.  */
+    return build_pointer_type (char_type_node);
   else
     /* Otherwise, we use 'void *'.  */
     return ptr_type_node;
@@ -9883,6 +9892,8 @@
   /* Generate a special section to describe the ABI switches used to
      produce the resultant binary.  */
 
+  if (!TARGET_IRIX6)    {
+
   /* Record the ABI itself.  Modern versions of binutils encode
      this information in the ELF header flags, but GDB needs the
      information in order to correctly debug binaries produced by
@@ -9967,6 +9978,7 @@
   }
 #endif
 #endif
+  }
 
   /* If TARGET_ABICALLS, tell GAS to generate -KPIC code.  */
   if (TARGET_ABICALLS)
@@ -20174,6 +20186,10 @@
       REAL_MODE_FORMAT (TFmode) = &mips_quad_format;
     }
 
+#ifdef MIPS_TFMODE_FORMAT
+  REAL_MODE_FORMAT (TFmode) = &MIPS_TFMODE_FORMAT;
+#endif
+
   /* Make sure that the user didn't turn off paired single support when
      MIPS-3D support is requested.  */
   if (TARGET_MIPS3D
diff -Naur gcc-9.5.0/gcc/config/mips/mips.h gcc-9.5.0-irix/gcc/config/mips/mips.h
--- gcc-9.5.0/gcc/config/mips/mips.h	2022-05-27 03:21:11.007379000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/mips.h	2025-02-13 08:55:07.501182400 +0000
@@ -201,7 +201,9 @@
 
 /* True if .gpword or .gpdword should be used for switch tables.  */
 #define TARGET_GPWORD				\
-  (TARGET_ABICALLS && !TARGET_ABSOLUTE_ABICALLS)
+  (TARGET_ABICALLS				\
+   && !TARGET_ABSOLUTE_ABICALLS			\
+   && !(mips_abi == ABI_64 && TARGET_IRIX6))
 
 /* True if the output must have a writable .eh_frame.
    See ASM_PREFERRED_EH_DATA_FORMAT for details.  */
diff -Naur gcc-9.5.0/gcc/config/mips/t-irix6 gcc-9.5.0-irix/gcc/config/mips/t-irix6
--- gcc-9.5.0/gcc/config/mips/t-irix6	2022-05-27 03:21:11.011379000 +0000
+++ gcc-9.5.0-irix/gcc/config/mips/t-irix6	2025-02-13 08:55:07.520122400 +0000
@@ -2,3 +2,7 @@
 MULTILIB_DIRNAMES=n32 64
 MULTILIB_MATCHES=
 MULTILIB_OSDIRNAMES=../lib32 ../lib64
+
+irix6-c.o: $(srcdir)/config/mips/irix6-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+  tree.h $(TM_H) $(C_COMMON_H)
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
diff -Naur gcc-9.5.0/gcc/config.gcc gcc-9.5.0-irix/gcc/config.gcc
--- gcc-9.5.0/gcc/config.gcc	2022-05-27 03:21:10.891379000 +0000
+++ gcc-9.5.0-irix/gcc/config.gcc	2025-02-13 08:55:07.536148000 +0000
@@ -2200,6 +2200,28 @@
 	cxx_target_objs="${cxx_target_objs} microblaze-c.o"
 	tmake_file="${tmake_file} microblaze/t-microblaze"
         ;;
+mips-sgi-irix6.5*)
+	tm_file="elfos.h ${tm_file} mips/iris6.h"
+	tmake_file="mips/t-irix6 t-slibgcc"
+	c_target_objs="irix6-c.o"
+	cxx_target_objs="irix6-c.o"
+	extra_options="${extra_options} rpath.opt mips/iris6.opt"
+	target_cpu_default="MASK_ABICALLS"
+	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
+	# Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h.
+	use_gcc_stdint=wrap
+	if test "x$stabs" = xyes
+	then
+		tm_file="${tm_file} dbx.h"
+	fi
+	if test "x$gnu_ld" = xyes
+	then
+		tm_defines="${tm_defines} IRIX_USING_GNU_LD"
+	fi
+	case ${enable_threads}:${have_pthread_h} in
+	  "":yes | yes:yes ) thread_file=posix ;;
+	esac
+	;;
 riscv*-*-linux*)
 	tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
 	case "x${enable_multilib}" in
diff -Naur gcc-9.5.0/gcc/config.host gcc-9.5.0-irix/gcc/config.host
--- gcc-9.5.0/gcc/config.host	2022-05-27 03:21:10.891379000 +0000
+++ gcc-9.5.0-irix/gcc/config.host	2025-02-13 08:55:07.545857600 +0000
@@ -133,9 +133,9 @@
 	;;
     esac
     ;;
-  mips*-*-linux*)
+  mips*-*-linux* | mips-sgi-irix6.5*)
     case ${target} in
-      mips*-*-linux*)
+      mips*-*-linux* | mips-sgi-irix6.5*)
 	host_extra_gcc_objs="driver-native.o"
 	host_xmake_file="${host_xmake_file} mips/x-native"
       ;;
diff -Naur gcc-9.5.0/gcc/configure gcc-9.5.0-irix/gcc/configure
--- gcc-9.5.0/gcc/configure	2022-05-27 03:21:46.559548000 +0000
+++ gcc-9.5.0-irix/gcc/configure	2025-02-13 08:55:07.640701600 +0000
@@ -7623,8 +7623,17 @@
       ;;
 
     mips*-*-*)
+      case $host in
+	mips*-sgi-irix*)
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported on IRIX, ignored" >&5
+$as_echo "$as_me: WARNING: fixed-point is not supported on IRIX, ignored" >&2;}
+	  enable_fixed_point=no
+	  ;;
+	*)
       enable_fixed_point=yes
       ;;
+      esac
+      ;;
     *)
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fixed-point is not supported for this target, ignored" >&5
 $as_echo "$as_me: WARNING: fixed-point is not supported for this target, ignored" >&2;}
@@ -24845,6 +24854,10 @@
 	  gcc_cv_ld_dynamic_option="-adefault"
 	fi
 	;;
+      # IRIX 6 ld supports -Bstatic/-Bdynamic
+      mips-sgi-irix6.5*)
+	gcc_cv_ld_static_dynamic=yes
+	;;
       # Solaris 2 ld always supports -Bstatic/-Bdynamic.
       *-*-solaris2*)
         gcc_cv_ld_static_dynamic=yes
diff -Naur gcc-9.5.0/gcc/configure.ac gcc-9.5.0-irix/gcc/configure.ac
--- gcc-9.5.0/gcc/configure.ac	2022-05-27 03:21:11.095380000 +0000
+++ gcc-9.5.0-irix/gcc/configure.ac	2025-02-13 08:55:07.664012000 +0000
@@ -865,8 +865,16 @@
       ;;
 
     mips*-*-*)
+      case $host in
+	mips*-sgi-irix*)
+	  AC_MSG_WARN([fixed-point is not supported on IRIX, ignored])
+	  enable_fixed_point=no
+	  ;;
+	*)
       enable_fixed_point=yes
       ;;
+      esac
+      ;;
     *)
       AC_MSG_WARN([fixed-point is not supported for this target, ignored])
       enable_fixed_point=no
@@ -3781,6 +3789,10 @@
 	  gcc_cv_ld_dynamic_option="-adefault"
 	fi
 	;;
+      # IRIX 6 ld supports -Bstatic/-Bdynamic.
+      mips-sgi-irix6.5*)
+        gcc_cv_ld_static_dynamic=yes
+        ;;
       # Solaris 2 ld always supports -Bstatic/-Bdynamic.
       *-*-solaris2*)
         gcc_cv_ld_static_dynamic=yes
diff -Naur gcc-9.5.0/gcc/dwarf2cfi.c gcc-9.5.0-irix/gcc/dwarf2cfi.c
--- gcc-9.5.0/gcc/dwarf2cfi.c	2022-05-27 03:21:11.187380000 +0000
+++ gcc-9.5.0-irix/gcc/dwarf2cfi.c	2025-02-13 10:34:28.112466400 +0000
@@ -812,6 +812,7 @@
 	cfi->dw_cfi_opc = DW_CFA_def_cfa_offset;
       cfi->dw_cfi_oprnd1.dw_cfi_offset = const_offset;
     }
+#ifndef SGUG_DEBUGGING_INFO
   else if (new_cfa->offset.is_constant ()
 	   && known_eq (new_cfa->offset, old_cfa->offset)
 	   && old_cfa->reg != INVALID_REGNUM
@@ -826,6 +827,8 @@
       cfi->dw_cfi_opc = DW_CFA_def_cfa_register;
       cfi->dw_cfi_oprnd1.dw_cfi_reg_num = new_cfa->reg;
     }
+#endif
+
   else if (new_cfa->indirect == 0
 	   && new_cfa->offset.is_constant (&const_offset))
     {
@@ -1371,6 +1374,10 @@
 	  unsigned int regno = dwf_regno (reg);
 	  add_cfi_restore (regno);
 	  update_row_reg_save (cur_row, regno, NULL);
+  if (REG_P (INCOMING_RETURN_ADDR_RTX)
+    && regno == dwf_regno (INCOMING_RETURN_ADDR_RTX)
+    && regno != DWARF_FRAME_RETURN_COLUMN)
+    reg_save (DWARF_FRAME_RETURN_COLUMN, regno, 0);
 	}
     }
 }
@@ -2934,22 +2941,23 @@
 create_pseudo_cfg (void)
 {
   bool saw_barrier, switch_sections;
-  dw_trace_info ti;
+  dw_trace_info ti1;
+  dw_trace_info* ti = &ti1;
   rtx_insn *insn;
   unsigned i;
 
   /* The first trace begins at the start of the function,
      and begins with the CIE row state.  */
   trace_info.create (16);
-  memset (&ti, 0, sizeof (ti));
-  ti.head = get_insns ();
-  ti.beg_row = cie_cfi_row;
-  ti.cfa_store = cie_cfi_row->cfa;
-  ti.cfa_temp.reg = INVALID_REGNUM;
-  trace_info.quick_push (ti);
+  memset (&ti1, 0, sizeof (ti1));
+  ti1.head = get_insns ();
+  ti1.beg_row = cie_cfi_row;
+  ti1.cfa_store = cie_cfi_row->cfa;
+  ti1.cfa_temp.reg = INVALID_REGNUM;
+  ti = trace_info.quick_push (ti1);
 
   if (cie_return_save)
-    ti.regs_saved_in_regs.safe_push (*cie_return_save);
+    ti->regs_saved_in_regs.safe_push (*cie_return_save);
 
   /* Walk all the insns, collecting start of trace locations.  */
   saw_barrier = false;
@@ -2971,11 +2979,12 @@
       else if (save_point_p (insn)
 	       && (LABEL_P (insn) || !saw_barrier))
 	{
-	  memset (&ti, 0, sizeof (ti));
-	  ti.head = insn;
-	  ti.switch_sections = switch_sections;
-	  ti.id = trace_info.length ();
-	  trace_info.safe_push (ti);
+	  dw_trace_info ti2;
+	  memset (&ti2, 0, sizeof (ti2));
+	  ti2.head = insn;
+	  ti2.switch_sections = switch_sections;
+	  ti2.id = trace_info.length ();
+	  ti = trace_info.safe_push (ti2);
 
 	  saw_barrier = false;
 	  switch_sections = false;
@@ -2986,19 +2995,18 @@
      avoiding stale pointer problems due to reallocation.  */
   trace_index
     = new hash_table<trace_info_hasher> (trace_info.length ());
-  dw_trace_info *tp;
-  FOR_EACH_VEC_ELT (trace_info, i, tp)
+  FOR_EACH_VEC_ELT (trace_info, i, ti)
     {
       dw_trace_info **slot;
 
       if (dump_file)
-	fprintf (dump_file, "Creating trace %u : start at %s %d%s\n", tp->id,
-		 rtx_name[(int) GET_CODE (tp->head)], INSN_UID (tp->head),
-		 tp->switch_sections ? " (section switch)" : "");
+	fprintf (dump_file, "Creating trace %u : start at %s %d%s\n", ti->id,
+		 rtx_name[(int) GET_CODE (ti->head)], INSN_UID (ti->head),
+		 ti->switch_sections ? " (section switch)" : "");
 
-      slot = trace_index->find_slot_with_hash (tp, INSN_UID (tp->head), INSERT);
+      slot = trace_index->find_slot_with_hash (ti, INSN_UID (ti->head), INSERT);
       gcc_assert (*slot == NULL);
-      *slot = tp;
+      *slot = ti;
     }
 }
 
@@ -3574,6 +3582,10 @@
 {
   int enc;
 
+#ifdef SGUG_DEBUGGING_INFO
+  return false;
+#endif
+
   if (saved_do_cfi_asm != 0)
     return saved_do_cfi_asm > 0;
 
diff -Naur gcc-9.5.0/gcc/dwarf2out.c gcc-9.5.0-irix/gcc/dwarf2out.c
--- gcc-9.5.0/gcc/dwarf2out.c	2022-05-27 03:21:11.187380000 +0000
+++ gcc-9.5.0-irix/gcc/dwarf2out.c	2025-02-13 08:55:07.784152800 +0000
@@ -953,6 +953,12 @@
 
   if (for_eh && targetm.terminate_dw2_eh_frame_info)
     dw2_asm_output_data (4, 0, "End of Table");
+#ifdef SGUG_DEBUGGING_INFO
+  /* Work around Irix 6 assembler bug whereby labels at the end of a section
+     get a value of 0.  Putting .align 0 after the label fixes it.  */
+  ASM_OUTPUT_ALIGN (asm_out_file, 0);
+#endif
+
 
   /* Turn off app to make assembly quicker.  */
   if (flag_debug_asm)
@@ -4834,6 +4840,20 @@
   a->dw_attr_val.v.val_die_ref.external = i;
 }
 
+/* Add an FDE reference attribute value to a DIE.  */
+
+static inline void
+add_AT_fde_ref (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int targ_fde)
+{
+  dw_attr_node attr;
+
+  attr.dw_attr = attr_kind;
+  attr.dw_attr_val.val_class = dw_val_class_fde_ref;
+  attr.dw_attr_val.val_entry = NULL;
+  attr.dw_attr_val.v.val_fde_index = targ_fde;
+  add_dwarf_attr (die, &attr);
+}
+
 /* Add a location description attribute value to a DIE.  */
 
 static inline void
@@ -19461,7 +19481,14 @@
 	  /* The DWARF2 standard says that we should assume that the structure
 	     address is already on the stack, so we can specify a structure
 	     field address by using DW_OP_plus_uconst.  */
+#ifdef SGUG_DEBUGGING_INFO
+	  /* ??? The SGI dwarf reader does not handle the DW_OP_plus_uconst
+	     operator correctly.  It works only if we leave the offset on the
+	     stack.  */
+	  op = DW_OP_constu;
+#else
 	  op = DW_OP_plus_uconst;
+#endif
 	  loc_descr = new_loc_descr (op, offset, 0);
 	}
     }
@@ -21932,6 +21959,17 @@
       return;
     }
 
+  /* ??? The SGI dwarf reader fails for array of array of enum types
+     (e.g. const enum machine_mode insn_operand_mode[2][10]) unless the inner
+     array type comes before the outer array type.  We thus call gen_type_die
+     before we new_die and must prevent nested array types collapsing for this
+     target.  */
+
+#ifdef SGUG_DEBUGGING_INFO
+  gen_type_die (TREE_TYPE (type), context_die);
+  collapse_nested_arrays = false;
+#endif
+
   array_die = new_die (DW_TAG_array_type, scope_die, type);
   add_name_attribute (array_die, type_tag (type));
   equate_type_number_to_die (type, array_die);
@@ -21956,6 +21994,14 @@
      for multidimensional arrays.  */
   add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_row_major);
 #endif
+#ifdef SGUG_DEBUGGING_INFO
+  /* The SGI compilers handle arrays of unknown bound by setting
+     AT_declaration and not emitting any subrange DIEs.  */
+  if (TREE_CODE (type) == ARRAY_TYPE
+      && ! TYPE_DOMAIN (type))
+    add_AT_flag (array_die, DW_AT_declaration, 1);
+  else
+#endif
 
   if (TREE_CODE (type) == VECTOR_TYPE)
     {
@@ -21979,6 +22025,10 @@
 	element_type = TREE_TYPE (element_type);
       }
 
+#ifndef SGUG_DEBUGGING_INFO
+  gen_type_die (element_type, context_die);
+#endif
+
   add_type_attribute (array_die, element_type, TYPE_UNQUALIFIED,
 		      TREE_CODE (type) == ARRAY_TYPE
 		      && TYPE_REVERSE_STORAGE_ORDER (type),
@@ -23290,6 +23340,11 @@
                                false);
 	}
 
+#ifdef SGUG_DEBUGGING_INFO
+      /* Add a reference to the FDE for this routine.  */
+      add_AT_fde_ref (subr_die, DW_AT_MIPS_fde, cfun->fde->fde_index);
+#endif
+
       cfa_fb_offset = CFA_FRAME_BASE_OFFSET (decl);
 
       /* We define the "frame base" as the function's CFA.  This is more
@@ -24551,6 +24606,24 @@
   sprintf (tail, "%s %s", language_string, version_string);
   tail += plen;
 
+  if (!dwarf_record_gcc_switches)
+    {
+#ifdef SGUG_DEBUGGING_INFO
+      /* The MIPS/SGI compilers place the 'cc' command line options in the
+	 producer string.  The SGI debugger looks for -g, -g1, -g2, or -g3;
+	 if they do not appear in the producer string, the debugger reaches
+	 the conclusion that the object file is stripped and has no debugging
+	 information.  To get the MIPS/SGI debugger to believe that there is
+	 debugging information in the object file, we add a -g to the producer
+	 string.  */
+      if (debug_info_level > DINFO_LEVEL_TERSE)
+	{
+	  memcpy (tail, " -g", 3);
+	  tail += 3;
+	}
+#endif
+    }
+
   FOR_EACH_VEC_ELT (switches, j, p)
     {
       len = strlen (p);
diff -Naur gcc-9.5.0/gmp-6.1.0/gmp-h.in gcc-9.5.0-irix/gmp-6.1.0/gmp-h.in
--- gcc-9.5.0/gmp-6.1.0/gmp-h.in	2015-11-01 10:19:48.000000000 +0000
+++ gcc-9.5.0-irix/gmp-6.1.0/gmp-h.in	2021-06-12 23:32:57.898264800 +0000
@@ -289,6 +289,10 @@
    application uses for gmp_vprintf etc will almost certainly require the
    whole <stdarg.h> anyway.  */
 
+
+#ifdef __sgi
+ typedef char *va_list;
+#endif
 #ifdef va_start
 #define _GMP_H_HAVE_VA_LIST 1
 #endif
@@ -470,8 +474,10 @@
 
 #if defined (__cplusplus)
 extern "C" {
+#ifndef __sgi
 using std::FILE;
 #endif
+#endif
 
 #define mp_set_memory_functions __gmp_set_memory_functions
 __GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t),
diff -Naur gcc-9.5.0/gmp-6.1.0/gmp-impl.h gcc-9.5.0-irix/gmp-6.1.0/gmp-impl.h
--- gcc-9.5.0/gmp-6.1.0/gmp-impl.h	2015-11-01 10:19:48.000000000 +0000
+++ gcc-9.5.0-irix/gmp-6.1.0/gmp-impl.h	2021-06-12 23:31:19.783849600 +0000
@@ -229,6 +229,9 @@
 
 /* gmp_uint_least32_t is an unsigned integer type with at least 32 bits. */
 #if HAVE_UINT_LEAST32_T
+#ifdef __sgi
+ typedef unsigned int uint_least32_t;
+#endif
 typedef uint_least32_t      gmp_uint_least32_t;
 #else
 #if SIZEOF_UNSIGNED_SHORT >= 4
diff -Naur gcc-9.5.0/include/libiberty.h gcc-9.5.0-irix/include/libiberty.h
--- gcc-9.5.0/include/libiberty.h	2022-05-27 03:21:12.791388000 +0000
+++ gcc-9.5.0-irix/include/libiberty.h	2025-02-13 09:39:06.994597600 +0000
@@ -109,7 +109,7 @@
  || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \
  || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \
  || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME) 
-extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
+extern char *basename (const char *);
 #else
 /* Do not allow basename to be used if there is no prototype seen.  We
    either need to use the above prototype or have one from
@@ -120,18 +120,18 @@
 
 /* A well-defined basename () that is always compiled in.  */
 
-extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
+extern const char *lbasename (const char *)  ATTRIBUTE_NONNULL(1);
 
 /* Same, but assumes DOS semantics (drive name, backslash is also a
    dir separator) regardless of host.  */
 
-extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
+extern const char *dos_lbasename (const char *)  ATTRIBUTE_NONNULL(1);
 
 /* Same, but assumes Unix semantics (absolute paths always start with
    a slash, only forward slash is accepted as dir separator)
    regardless of host.  */
 
-extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
+extern const char *unix_lbasename (const char *)  ATTRIBUTE_NONNULL(1);
 
 /* A well-defined realpath () that is always compiled in.  */
 
@@ -141,7 +141,7 @@
    the last argument of this function, to terminate the list of
    strings.  Allocates memory using xmalloc.  */
 
-extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
+extern char *concat (const char *, ...) ATTRIBUTE_MALLOC  ATTRIBUTE_SENTINEL;
 
 /* Concatenate an arbitrary number of strings.  You must pass NULL as
    the last argument of this function, to terminate the list of
@@ -150,7 +150,7 @@
    pointer to be freed after the new string is created, similar to the
    way xrealloc works.  */
 
-extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
+extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC  ATTRIBUTE_SENTINEL;
 
 /* Determine the length of concatenating an arbitrary number of
    strings.  You must pass NULL as the last argument of this function,
@@ -163,14 +163,14 @@
    to terminate the list of strings.  The supplied memory is assumed
    to be large enough.  */
 
-extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
+extern char *concat_copy (char *, const char *, ...)  ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
 
 /* Concatenate an arbitrary number of strings into a GLOBAL area of
    memory.  You must pass NULL as the last argument of this function,
    to terminate the list of strings.  The supplied memory is assumed
    to be large enough.  */
 
-extern char *concat_copy2 (const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
+extern char *concat_copy2 (const char *, ...)  ATTRIBUTE_SENTINEL;
 
 /* This is the global area used by concat_copy2.  */
 
@@ -229,11 +229,11 @@
 /* Returns a pointer to a directory path suitable for creating temporary
    files in.  */
 
-extern const char *choose_tmpdir (void) ATTRIBUTE_RETURNS_NONNULL;
+extern const char *choose_tmpdir (void) ;
 
 /* Choose a temporary directory to use for scratch files.  */
 
-extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ;
 
 /* Return a temporary file name or NULL if unable to create one.  */
 
@@ -268,7 +268,7 @@
 
 /* ANSI's strerror(), but more robust.  */
 
-extern char *xstrerror (int) ATTRIBUTE_RETURNS_NONNULL;
+extern char *xstrerror (int) ;
 
 /* Return the maximum signal number for which strsignal will return a
    string.  */
@@ -310,30 +310,30 @@
    message to stderr (using the name set by xmalloc_set_program_name,
    if any) and then call xexit.  */
 
-extern void *xmalloc (size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern void *xmalloc (size_t) ATTRIBUTE_MALLOC ;
 
 /* Reallocate memory without fail.  This works like xmalloc.  Note,
    realloc type functions are not suitable for attribute malloc since
    they may return the same address across multiple calls. */
 
-extern void *xrealloc (void *, size_t) ATTRIBUTE_RETURNS_NONNULL;
+extern void *xrealloc (void *, size_t) ;
 
 /* Allocate memory without fail and set it to zero.  This works like
    xmalloc.  */
 
-extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC ;
 
 /* Copy a string into a memory buffer without fail.  */
 
-extern char *xstrdup (const char *) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern char *xstrdup (const char *) ATTRIBUTE_MALLOC ;
 
 /* Copy at most N characters from string into a buffer without fail.  */
 
-extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC ;
 
 /* Copy an existing memory buffer to a new memory buffer without fail.  */
 
-extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC ;
 
 /* Physical memory routines.  Return values are in BYTES.  */
 extern double physmem_total (void);
@@ -422,7 +422,7 @@
    Returns NULL on error.  */
 
 extern struct pex_obj *pex_init (int flags, const char *pname,
-				 const char *tempbase) ATTRIBUTE_RETURNS_NONNULL;
+				 const char *tempbase) ;
 
 /* Flags for pex_run.  These are bits to be or'ed together.  */
 
diff -Naur gcc-9.5.0/isl-0.18/isl_schedule_tree.c gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.c
--- gcc-9.5.0/isl-0.18/isl_schedule_tree.c	2016-12-15 06:27:30.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.c	2024-12-22 11:54:48.326403200 +0000
@@ -84,45 +84,45 @@
 			"allocation should have failed",
 			isl_schedule_tree_free(dup));
 	case isl_schedule_node_band:
-		dup->band = isl_schedule_band_copy(tree->band);
-		if (!dup->band)
+		dup->anonunion.band = isl_schedule_band_copy(tree->anonunion.band);
+		if (!dup->anonunion.band)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_context:
-		dup->context = isl_set_copy(tree->context);
-		if (!dup->context)
+		dup->anonunion.context = isl_set_copy(tree->anonunion.context);
+		if (!dup->anonunion.context)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_domain:
-		dup->domain = isl_union_set_copy(tree->domain);
-		if (!dup->domain)
+		dup->anonunion.domain = isl_union_set_copy(tree->anonunion.domain);
+		if (!dup->anonunion.domain)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_expansion:
-		dup->contraction =
-			isl_union_pw_multi_aff_copy(tree->contraction);
-		dup->expansion = isl_union_map_copy(tree->expansion);
-		if (!dup->contraction || !dup->expansion)
+		dup->anonunion.anonstruct.contraction =
+			isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
+		dup->anonunion.anonstruct.expansion = isl_union_map_copy(tree->anonunion.anonstruct.expansion);
+		if (!dup->anonunion.anonstruct.contraction || !dup->anonunion.anonstruct.expansion)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_extension:
-		dup->extension = isl_union_map_copy(tree->extension);
-		if (!dup->extension)
+		dup->anonunion.extension = isl_union_map_copy(tree->anonunion.extension);
+		if (!dup->anonunion.extension)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_filter:
-		dup->filter = isl_union_set_copy(tree->filter);
-		if (!dup->filter)
+		dup->anonunion.filter = isl_union_set_copy(tree->anonunion.filter);
+		if (!dup->anonunion.filter)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_guard:
-		dup->guard = isl_set_copy(tree->guard);
-		if (!dup->guard)
+		dup->anonunion.guard = isl_set_copy(tree->anonunion.guard);
+		if (!dup->anonunion.guard)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_mark:
-		dup->mark = isl_id_copy(tree->mark);
-		if (!dup->mark)
+		dup->anonunion.mark = isl_id_copy(tree->anonunion.mark);
+		if (!dup->anonunion.mark)
 			return isl_schedule_tree_free(dup);
 		break;
 	case isl_schedule_node_leaf:
@@ -180,29 +180,29 @@
 
 	switch (tree->type) {
 	case isl_schedule_node_band:
-		isl_schedule_band_free(tree->band);
+		isl_schedule_band_free(tree->anonunion.band);
 		break;
 	case isl_schedule_node_context:
-		isl_set_free(tree->context);
+		isl_set_free(tree->anonunion.context);
 		break;
 	case isl_schedule_node_domain:
-		isl_union_set_free(tree->domain);
+		isl_union_set_free(tree->anonunion.domain);
 		break;
 	case isl_schedule_node_expansion:
-		isl_union_pw_multi_aff_free(tree->contraction);
-		isl_union_map_free(tree->expansion);
+		isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
+		isl_union_map_free(tree->anonunion.anonstruct.expansion);
 		break;
 	case isl_schedule_node_extension:
-		isl_union_map_free(tree->extension);
+		isl_union_map_free(tree->anonunion.extension);
 		break;
 	case isl_schedule_node_filter:
-		isl_union_set_free(tree->filter);
+		isl_union_set_free(tree->anonunion.filter);
 		break;
 	case isl_schedule_node_guard:
-		isl_set_free(tree->guard);
+		isl_set_free(tree->anonunion.guard);
 		break;
 	case isl_schedule_node_mark:
-		isl_id_free(tree->mark);
+		isl_id_free(tree->anonunion.mark);
 		break;
 	case isl_schedule_node_sequence:
 	case isl_schedule_node_set:
@@ -241,7 +241,7 @@
 	if (!tree)
 		goto error;
 
-	tree->band = band;
+	tree->anonunion.band = band;
 	tree->anchored = isl_schedule_band_is_anchored(band);
 
 	return tree;
@@ -268,7 +268,7 @@
 	if (!tree)
 		goto error;
 
-	tree->context = context;
+	tree->anonunion.context = context;
 	tree->anchored = 1;
 
 	return tree;
@@ -293,7 +293,7 @@
 	if (!tree)
 		goto error;
 
-	tree->domain = domain;
+	tree->anonunion.domain = domain;
 
 	return tree;
 error:
@@ -319,8 +319,8 @@
 	if (!tree)
 		goto error;
 
-	tree->contraction = contraction;
-	tree->expansion = expansion;
+	tree->anonunion.anonstruct.contraction = contraction;
+	tree->anonunion.anonstruct.expansion = expansion;
 
 	return tree;
 error:
@@ -348,7 +348,7 @@
 	if (!tree)
 		goto error;
 
-	tree->extension = extension;
+	tree->anonunion.extension = extension;
 	tree->anchored = 1;
 
 	return tree;
@@ -373,7 +373,7 @@
 	if (!tree)
 		goto error;
 
-	tree->filter = filter;
+	tree->anonunion.filter = filter;
 
 	return tree;
 error:
@@ -399,7 +399,7 @@
 	if (!tree)
 		goto error;
 
-	tree->guard = guard;
+	tree->anonunion.guard = guard;
 	tree->anchored = 1;
 
 	return tree;
@@ -425,7 +425,7 @@
 	if (!tree)
 		goto error;
 
-	tree->mark = mark;
+	tree->anonunion.mark = mark;
 
 	return tree;
 error:
@@ -456,7 +456,7 @@
 	case isl_schedule_node_error:
 		return -1;
 	case isl_schedule_node_band:
-		return isl_schedule_band_is_anchored(tree->band);
+		return isl_schedule_band_is_anchored(tree->anonunion.band);
 	case isl_schedule_node_context:
 	case isl_schedule_node_extension:
 	case isl_schedule_node_guard:
@@ -639,34 +639,34 @@
 
 	switch (tree1->type) {
 	case isl_schedule_node_band:
-		equal = isl_schedule_band_plain_is_equal(tree1->band,
-							tree2->band);
+		equal = isl_schedule_band_plain_is_equal(tree1->anonunion.band,
+							tree2->anonunion.band);
 		break;
 	case isl_schedule_node_context:
-		equal = isl_set_is_equal(tree1->context, tree2->context);
+		equal = isl_set_is_equal(tree1->anonunion.context, tree2->anonunion.context);
 		break;
 	case isl_schedule_node_domain:
-		equal = isl_union_set_is_equal(tree1->domain, tree2->domain);
+		equal = isl_union_set_is_equal(tree1->anonunion.domain, tree2->anonunion.domain);
 		break;
 	case isl_schedule_node_expansion:
-		equal = isl_union_map_is_equal(tree1->expansion,
-						tree2->expansion);
+		equal = isl_union_map_is_equal(tree1->anonunion.anonstruct.expansion,
+						tree2->anonunion.anonstruct.expansion);
 		if (equal >= 0 && equal)
 			equal = isl_union_pw_multi_aff_plain_is_equal(
-				    tree1->contraction, tree2->contraction);
+				    tree1->anonunion.anonstruct.contraction, tree2->anonunion.anonstruct.contraction);
 		break;
 	case isl_schedule_node_extension:
-		equal = isl_union_map_is_equal(tree1->extension,
-						tree2->extension);
+		equal = isl_union_map_is_equal(tree1->anonunion.extension,
+						tree2->anonunion.extension);
 		break;
 	case isl_schedule_node_filter:
-		equal = isl_union_set_is_equal(tree1->filter, tree2->filter);
+		equal = isl_union_set_is_equal(tree1->anonunion.filter, tree2->anonunion.filter);
 		break;
 	case isl_schedule_node_guard:
-		equal = isl_set_is_equal(tree1->guard, tree2->guard);
+		equal = isl_set_is_equal(tree1->anonunion.guard, tree2->anonunion.guard);
 		break;
 	case isl_schedule_node_mark:
-		equal = tree1->mark == tree2->mark;
+		equal = tree1->anonunion.mark == tree2->anonunion.mark;
 		break;
 	case isl_schedule_node_leaf:
 	case isl_schedule_node_sequence:
@@ -1002,7 +1002,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return 0);
 
-	return isl_schedule_band_n_member(tree->band);
+	return isl_schedule_band_n_member(tree->anonunion.band);
 }
 
 /* Is the band member at position "pos" of the band tree root
@@ -1018,7 +1018,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_bool_error);
 
-	return isl_schedule_band_member_get_coincident(tree->band, pos);
+	return isl_schedule_band_member_get_coincident(tree->anonunion.band, pos);
 }
 
 /* Mark the given band member as being coincident or not
@@ -1039,9 +1039,9 @@
 	if (!tree)
 		return NULL;
 
-	tree->band = isl_schedule_band_member_set_coincident(tree->band, pos,
+	tree->anonunion.band = isl_schedule_band_member_set_coincident(tree->anonunion.band, pos,
 							coincident);
-	if (!tree->band)
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 	return tree;
 }
@@ -1058,7 +1058,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_bool_error);
 
-	return isl_schedule_band_get_permutable(tree->band);
+	return isl_schedule_band_get_permutable(tree->anonunion.band);
 }
 
 /* Mark the band tree root permutable or not according to "permutable"?
@@ -1077,8 +1077,8 @@
 	if (!tree)
 		return NULL;
 
-	tree->band = isl_schedule_band_set_permutable(tree->band, permutable);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_set_permutable(tree->anonunion.band, permutable);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 	return tree;
 }
@@ -1095,7 +1095,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return NULL);
 
-	return isl_schedule_band_get_space(tree->band);
+	return isl_schedule_band_get_space(tree->anonunion.band);
 }
 
 /* Intersect the domain of the band schedule of the band tree root
@@ -1111,8 +1111,8 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", goto error);
 
-	tree->band = isl_schedule_band_intersect_domain(tree->band, domain);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_intersect_domain(tree->anonunion.band, domain);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -1134,7 +1134,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return NULL);
 
-	return isl_schedule_band_get_partial_schedule(tree->band);
+	return isl_schedule_band_get_partial_schedule(tree->anonunion.band);
 }
 
 /* Replace the schedule of the band tree root by "schedule".
@@ -1150,7 +1150,7 @@
 	if (tree->type != isl_schedule_node_band)
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return NULL);
-	tree->band = isl_schedule_band_set_partial_schedule(tree->band,
+	tree->anonunion.band = isl_schedule_band_set_partial_schedule(tree->anonunion.band,
 								schedule);
 
 	return tree;
@@ -1173,7 +1173,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_ast_loop_error);
 
-	return isl_schedule_band_member_get_ast_loop_type(tree->band, pos);
+	return isl_schedule_band_member_get_ast_loop_type(tree->anonunion.band, pos);
 }
 
 /* Set the loop AST generation type for the band member of the band tree root
@@ -1191,9 +1191,9 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_schedule_tree_free(tree));
 
-	tree->band = isl_schedule_band_member_set_ast_loop_type(tree->band,
+	tree->anonunion.band = isl_schedule_band_member_set_ast_loop_type(tree->anonunion.band,
 								pos, type);
-	if (!tree->band)
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -1212,7 +1212,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_ast_loop_error);
 
-	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->band,
+	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->anonunion.band,
 									pos);
 }
 
@@ -1232,9 +1232,9 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return isl_schedule_tree_free(tree));
 
-	tree->band = isl_schedule_band_member_set_isolate_ast_loop_type(
-							tree->band, pos, type);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_member_set_isolate_ast_loop_type(
+							tree->anonunion.band, pos, type);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -1252,7 +1252,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return NULL);
 
-	return isl_schedule_band_get_ast_build_options(tree->band);
+	return isl_schedule_band_get_ast_build_options(tree->anonunion.band);
 }
 
 /* Replace the AST build options associated to band tree root by "options".
@@ -1273,9 +1273,9 @@
 			"not a band node", goto error);
 
 	was_anchored = isl_schedule_tree_is_anchored(tree);
-	tree->band = isl_schedule_band_set_ast_build_options(tree->band,
+	tree->anonunion.band = isl_schedule_band_set_ast_build_options(tree->anonunion.band,
 								options);
-	if (!tree->band)
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 	if (isl_schedule_tree_is_anchored(tree) != was_anchored)
 		tree = isl_schedule_tree_update_anchored(tree);
@@ -1300,7 +1300,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a band node", return NULL);
 
-	return isl_schedule_band_get_ast_isolate_option(tree->band, depth);
+	return isl_schedule_band_get_ast_isolate_option(tree->anonunion.band, depth);
 }
 
 /* Return the context of the context tree root.
@@ -1315,7 +1315,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a context node", return NULL);
 
-	return isl_set_copy(tree->context);
+	return isl_set_copy(tree->anonunion.context);
 }
 
 /* Return the domain of the domain tree root.
@@ -1330,7 +1330,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a domain node", return NULL);
 
-	return isl_union_set_copy(tree->domain);
+	return isl_union_set_copy(tree->anonunion.domain);
 }
 
 /* Replace the domain of domain tree root "tree" by "domain".
@@ -1346,8 +1346,8 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a domain node", goto error);
 
-	isl_union_set_free(tree->domain);
-	tree->domain = domain;
+	isl_union_set_free(tree->anonunion.domain);
+	tree->anonunion.domain = domain;
 
 	return tree;
 error:
@@ -1368,7 +1368,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not an expansion node", return NULL);
 
-	return isl_union_pw_multi_aff_copy(tree->contraction);
+	return isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
 }
 
 /* Return the expansion of the expansion tree root.
@@ -1383,7 +1383,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not an expansion node", return NULL);
 
-	return isl_union_map_copy(tree->expansion);
+	return isl_union_map_copy(tree->anonunion.anonstruct.expansion);
 }
 
 /* Replace the contraction and the expansion of the expansion tree root "tree"
@@ -1403,10 +1403,10 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not an expansion node", return NULL);
 
-	isl_union_pw_multi_aff_free(tree->contraction);
-	tree->contraction = contraction;
-	isl_union_map_free(tree->expansion);
-	tree->expansion = expansion;
+	isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
+	tree->anonunion.anonstruct.contraction = contraction;
+	isl_union_map_free(tree->anonunion.anonstruct.expansion);
+	tree->anonunion.anonstruct.expansion = expansion;
 
 	return tree;
 error:
@@ -1428,7 +1428,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not an extension node", return NULL);
 
-	return isl_union_map_copy(tree->extension);
+	return isl_union_map_copy(tree->anonunion.extension);
 }
 
 /* Replace the extension of extension tree root "tree" by "extension".
@@ -1443,8 +1443,8 @@
 	if (tree->type != isl_schedule_node_extension)
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not an extension node", return NULL);
-	isl_union_map_free(tree->extension);
-	tree->extension = extension;
+	isl_union_map_free(tree->anonunion.extension);
+	tree->anonunion.extension = extension;
 
 	return tree;
 error:
@@ -1465,7 +1465,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a filter node", return NULL);
 
-	return isl_union_set_copy(tree->filter);
+	return isl_union_set_copy(tree->anonunion.filter);
 }
 
 /* Replace the filter of the filter tree root by "filter".
@@ -1481,8 +1481,8 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a filter node", return NULL);
 
-	isl_union_set_free(tree->filter);
-	tree->filter = filter;
+	isl_union_set_free(tree->anonunion.filter);
+	tree->anonunion.filter = filter;
 
 	return tree;
 error:
@@ -1503,7 +1503,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a guard node", return NULL);
 
-	return isl_set_copy(tree->guard);
+	return isl_set_copy(tree->anonunion.guard);
 }
 
 /* Return the mark identifier of the mark tree root "tree".
@@ -1518,7 +1518,7 @@
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
 			"not a mark node", return NULL);
 
-	return isl_id_copy(tree->mark);
+	return isl_id_copy(tree->anonunion.mark);
 }
 
 /* Set dim to the range dimension of "map" and abort the search.
@@ -1828,7 +1828,7 @@
 	case isl_schedule_node_band:
 		if (isl_schedule_tree_band_n_member(tree) == 0)
 			return subtree_schedule_extend_child(tree, outer);
-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
+		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
 		umap = isl_union_map_from_multi_union_pw_aff(mupa);
 		outer = isl_union_map_flat_range_product(outer, umap);
 		umap = subtree_schedule_extend_child(tree, outer);
@@ -1940,7 +1940,7 @@
 				isl_error_internal,
 				"0D band should be handled by caller",
 				return NULL);
-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
+		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
 		domain = isl_multi_union_pw_aff_domain(mupa);
 		domain = isl_union_set_universe(domain);
 		break;
@@ -2008,8 +2008,8 @@
 	if (!tree)
 		goto error;
 
-	tree->band = isl_schedule_band_scale(tree->band, mv);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_scale(tree->anonunion.band, mv);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -2035,8 +2035,8 @@
 	if (!tree)
 		goto error;
 
-	tree->band = isl_schedule_band_scale_down(tree->band, mv);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_scale_down(tree->anonunion.band, mv);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -2062,8 +2062,8 @@
 	if (!tree)
 		goto error;
 
-	tree->band = isl_schedule_band_mod(tree->band, mv);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_mod(tree->anonunion.band, mv);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -2089,8 +2089,8 @@
 	if (!tree)
 		goto error;
 
-	tree->band = isl_schedule_band_shift(tree->band, shift);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_shift(tree->anonunion.band, shift);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 
 	return tree;
@@ -2165,12 +2165,12 @@
 	if (!tree || !child)
 		goto error;
 
-	tree->band = isl_schedule_band_tile(tree->band,
+	tree->anonunion.band = isl_schedule_band_tile(tree->anonunion.band,
 					    isl_multi_val_copy(sizes));
-	if (!tree->band)
+	if (!tree->anonunion.band)
 		goto error;
-	child->band = isl_schedule_band_point(child->band, tree->band, sizes);
-	if (!child->band)
+	child->anonunion.band = isl_schedule_band_point(child->anonunion.band, tree->anonunion.band, sizes);
+	if (!child->anonunion.band)
 		child = isl_schedule_tree_free(child);
 
 	tree = isl_schedule_tree_replace_child(tree, 0, child);
@@ -2295,14 +2295,14 @@
 	isolate = isl_schedule_tree_band_get_ast_isolate_option(tree, depth);
 	tree_isolate = isolate_initial(isolate, pos, n - pos);
 	child_isolate = isolate_final(isolate, pos, n - pos);
-	child->band = isl_schedule_band_drop(child->band, 0, pos);
-	child->band = isl_schedule_band_replace_ast_build_option(child->band,
+	child->anonunion.band = isl_schedule_band_drop(child->anonunion.band, 0, pos);
+	child->anonunion.band = isl_schedule_band_replace_ast_build_option(child->anonunion.band,
 					isl_set_copy(isolate), child_isolate);
-	tree->band = isl_schedule_band_drop(tree->band, pos, n - pos);
-	tree->band = isl_schedule_band_replace_ast_build_option(tree->band,
+	tree->anonunion.band = isl_schedule_band_drop(tree->anonunion.band, pos, n - pos);
+	tree->anonunion.band = isl_schedule_band_replace_ast_build_option(tree->anonunion.band,
 					isl_set_copy(isolate), tree_isolate);
 	isl_set_free(isolate);
-	if (!child->band || !tree->band)
+	if (!child->anonunion.band || !tree->anonunion.band)
 		goto error;
 
 	tree = isl_schedule_tree_replace_child(tree, 0, child);
@@ -2369,40 +2369,40 @@
 	case isl_schedule_node_error:
 		return isl_schedule_tree_free(tree);
 	case isl_schedule_node_band:
-		tree->band = isl_schedule_band_reset_user(tree->band);
-		if (!tree->band)
+		tree->anonunion.band = isl_schedule_band_reset_user(tree->anonunion.band);
+		if (!tree->anonunion.band)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_context:
-		tree->context = isl_set_reset_user(tree->context);
-		if (!tree->context)
+		tree->anonunion.context = isl_set_reset_user(tree->anonunion.context);
+		if (!tree->anonunion.context)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_domain:
-		tree->domain = isl_union_set_reset_user(tree->domain);
-		if (!tree->domain)
+		tree->anonunion.domain = isl_union_set_reset_user(tree->anonunion.domain);
+		if (!tree->anonunion.domain)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_expansion:
-		tree->contraction =
-			isl_union_pw_multi_aff_reset_user(tree->contraction);
-		tree->expansion = isl_union_map_reset_user(tree->expansion);
-		if (!tree->contraction || !tree->expansion)
+		tree->anonunion.anonstruct.contraction =
+			isl_union_pw_multi_aff_reset_user(tree->anonunion.anonstruct.contraction);
+		tree->anonunion.anonstruct.expansion = isl_union_map_reset_user(tree->anonunion.anonstruct.expansion);
+		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_extension:
-		tree->extension = isl_union_map_reset_user(tree->extension);
-		if (!tree->extension)
+		tree->anonunion.extension = isl_union_map_reset_user(tree->anonunion.extension);
+		if (!tree->anonunion.extension)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_filter:
-		tree->filter = isl_union_set_reset_user(tree->filter);
-		if (!tree->filter)
+		tree->anonunion.filter = isl_union_set_reset_user(tree->anonunion.filter);
+		if (!tree->anonunion.filter)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_guard:
-		tree->guard = isl_set_reset_user(tree->guard);
-		if (!tree->guard)
+		tree->anonunion.guard = isl_set_reset_user(tree->anonunion.guard);
+		if (!tree->anonunion.guard)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_leaf:
@@ -2436,43 +2436,43 @@
 	case isl_schedule_node_error:
 		goto error;
 	case isl_schedule_node_band:
-		tree->band = isl_schedule_band_align_params(tree->band, space);
-		if (!tree->band)
+		tree->anonunion.band = isl_schedule_band_align_params(tree->anonunion.band, space);
+		if (!tree->anonunion.band)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_context:
-		tree->context = isl_set_align_params(tree->context, space);
-		if (!tree->context)
+		tree->anonunion.context = isl_set_align_params(tree->anonunion.context, space);
+		if (!tree->anonunion.context)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_domain:
-		tree->domain = isl_union_set_align_params(tree->domain, space);
-		if (!tree->domain)
+		tree->anonunion.domain = isl_union_set_align_params(tree->anonunion.domain, space);
+		if (!tree->anonunion.domain)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_expansion:
-		tree->contraction =
-			isl_union_pw_multi_aff_align_params(tree->contraction,
+		tree->anonunion.anonstruct.contraction =
+			isl_union_pw_multi_aff_align_params(tree->anonunion.anonstruct.contraction,
 							isl_space_copy(space));
-		tree->expansion = isl_union_map_align_params(tree->expansion,
+		tree->anonunion.anonstruct.expansion = isl_union_map_align_params(tree->anonunion.anonstruct.expansion,
 								space);
-		if (!tree->contraction || !tree->expansion)
+		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_extension:
-		tree->extension = isl_union_map_align_params(tree->extension,
+		tree->anonunion.extension = isl_union_map_align_params(tree->anonunion.extension,
 								space);
-		if (!tree->extension)
+		if (!tree->anonunion.extension)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_filter:
-		tree->filter = isl_union_set_align_params(tree->filter, space);
-		if (!tree->filter)
+		tree->anonunion.filter = isl_union_set_align_params(tree->anonunion.filter, space);
+		if (!tree->anonunion.filter)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_guard:
-		tree->guard = isl_set_align_params(tree->guard, space);
-		if (!tree->guard)
+		tree->anonunion.guard = isl_set_align_params(tree->anonunion.guard, space);
+		if (!tree->anonunion.guard)
 			return isl_schedule_tree_free(tree);
 		break;
 	case isl_schedule_node_leaf:
@@ -2552,30 +2552,30 @@
 		goto error;
 
 	if (tree->type == isl_schedule_node_band) {
-		tree->band = isl_schedule_band_pullback_union_pw_multi_aff(
-							    tree->band, upma);
-		if (!tree->band)
+		tree->anonunion.band = isl_schedule_band_pullback_union_pw_multi_aff(
+							    tree->anonunion.band, upma);
+		if (!tree->anonunion.band)
 			return isl_schedule_tree_free(tree);
 	} else if (tree->type == isl_schedule_node_domain) {
-		tree->domain =
-			isl_union_set_preimage_union_pw_multi_aff(tree->domain,
+		tree->anonunion.domain =
+			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.domain,
 									upma);
-		if (!tree->domain)
+		if (!tree->anonunion.domain)
 			return isl_schedule_tree_free(tree);
 	} else if (tree->type == isl_schedule_node_expansion) {
 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_unsupported,
 			"cannot pullback expansion node", goto error);
 	} else if (tree->type == isl_schedule_node_extension) {
-		tree->extension =
+		tree->anonunion.extension =
 			isl_union_map_preimage_range_union_pw_multi_aff(
-			    tree->extension, upma);
-		if (!tree->extension)
+			    tree->anonunion.extension, upma);
+		if (!tree->anonunion.extension)
 			return isl_schedule_tree_free(tree);
 	} else if (tree->type == isl_schedule_node_filter) {
-		tree->filter =
-			isl_union_set_preimage_union_pw_multi_aff(tree->filter,
+		tree->anonunion.filter =
+			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.filter,
 									upma);
-		if (!tree->filter)
+		if (!tree->anonunion.filter)
 			return isl_schedule_tree_free(tree);
 	}
 
@@ -2600,8 +2600,8 @@
 	if (!tree)
 		goto error;
 
-	tree->band = isl_schedule_band_gist(tree->band, context);
-	if (!tree->band)
+	tree->anonunion.band = isl_schedule_band_gist(tree->anonunion.band, context);
+	if (!tree->anonunion.band)
 		return isl_schedule_tree_free(tree);
 	return tree;
 error:
@@ -2729,59 +2729,59 @@
 		p = isl_printer_print_str(p, "context");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_set(p, tree->context);
+		p = isl_printer_print_set(p, tree->anonunion.context);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_domain:
 		p = isl_printer_print_str(p, "domain");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_union_set(p, tree->domain);
+		p = isl_printer_print_union_set(p, tree->anonunion.domain);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_expansion:
 		p = isl_printer_print_str(p, "contraction");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_union_pw_multi_aff(p, tree->contraction);
+		p = isl_printer_print_union_pw_multi_aff(p, tree->anonunion.anonstruct.contraction);
 		p = isl_printer_print_str(p, "\"");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "expansion");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_union_map(p, tree->expansion);
+		p = isl_printer_print_union_map(p, tree->anonunion.anonstruct.expansion);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_extension:
 		p = isl_printer_print_str(p, "extension");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_union_map(p, tree->extension);
+		p = isl_printer_print_union_map(p, tree->anonunion.extension);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_filter:
 		p = isl_printer_print_str(p, "filter");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_union_set(p, tree->filter);
+		p = isl_printer_print_union_set(p, tree->anonunion.filter);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_guard:
 		p = isl_printer_print_str(p, "guard");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_set(p, tree->guard);
+		p = isl_printer_print_set(p, tree->anonunion.guard);
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_mark:
 		p = isl_printer_print_str(p, "mark");
 		p = isl_printer_yaml_next(p);
 		p = isl_printer_print_str(p, "\"");
-		p = isl_printer_print_str(p, isl_id_get_name(tree->mark));
+		p = isl_printer_print_str(p, isl_id_get_name(tree->anonunion.mark));
 		p = isl_printer_print_str(p, "\"");
 		break;
 	case isl_schedule_node_band:
-		p = print_tree_band(p, tree->band);
+		p = print_tree_band(p, tree->anonunion.band);
 		break;
 	}
 	p = isl_printer_yaml_next(p);
diff -Naur gcc-9.5.0/isl-0.18/isl_schedule_tree.c.rej gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.c.rej
--- gcc-9.5.0/isl-0.18/isl_schedule_tree.c.rej	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.c.rej	2024-12-22 11:54:25.583176000 +0000
@@ -0,0 +1,855 @@
+--- isl_schedule_tree.c	2016-12-15 11:27:30.000000000 +0000
++++ isl_schedule_tree.c	2019-05-30 19:16:57.970849120 +0000
+@@ -84,45 +84,45 @@
+ 			"allocation should have failed",
+ 			isl_schedule_tree_free(dup));
+ 	case isl_schedule_node_band:
+-		dup->band = isl_schedule_band_copy(tree->band);
+-		if (!dup->band)
++		dup->anonunion.band = isl_schedule_band_copy(tree->anonunion.band);
++		if (!dup->anonunion.band)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_context:
+-		dup->context = isl_set_copy(tree->context);
+-		if (!dup->context)
++		dup->anonunion.context = isl_set_copy(tree->anonunion.context);
++		if (!dup->anonunion.context)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		dup->domain = isl_union_set_copy(tree->domain);
+-		if (!dup->domain)
++		dup->anonunion.domain = isl_union_set_copy(tree->anonunion.domain);
++		if (!dup->anonunion.domain)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		dup->contraction =
+-			isl_union_pw_multi_aff_copy(tree->contraction);
+-		dup->expansion = isl_union_map_copy(tree->expansion);
+-		if (!dup->contraction || !dup->expansion)
++		dup->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
++		dup->anonunion.anonstruct.expansion = isl_union_map_copy(tree->anonunion.anonstruct.expansion);
++		if (!dup->anonunion.anonstruct.contraction || !dup->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		dup->extension = isl_union_map_copy(tree->extension);
+-		if (!dup->extension)
++		dup->anonunion.extension = isl_union_map_copy(tree->anonunion.extension);
++		if (!dup->anonunion.extension)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		dup->filter = isl_union_set_copy(tree->filter);
+-		if (!dup->filter)
++		dup->anonunion.filter = isl_union_set_copy(tree->anonunion.filter);
++		if (!dup->anonunion.filter)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		dup->guard = isl_set_copy(tree->guard);
+-		if (!dup->guard)
++		dup->anonunion.guard = isl_set_copy(tree->anonunion.guard);
++		if (!dup->anonunion.guard)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		dup->mark = isl_id_copy(tree->mark);
+-		if (!dup->mark)
++		dup->anonunion.mark = isl_id_copy(tree->anonunion.mark);
++		if (!dup->anonunion.mark)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -180,29 +180,29 @@
+ 
+ 	switch (tree->type) {
+ 	case isl_schedule_node_band:
+-		isl_schedule_band_free(tree->band);
++		isl_schedule_band_free(tree->anonunion.band);
+ 		break;
+ 	case isl_schedule_node_context:
+-		isl_set_free(tree->context);
++		isl_set_free(tree->anonunion.context);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		isl_union_set_free(tree->domain);
++		isl_union_set_free(tree->anonunion.domain);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		isl_union_pw_multi_aff_free(tree->contraction);
+-		isl_union_map_free(tree->expansion);
++		isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
++		isl_union_map_free(tree->anonunion.anonstruct.expansion);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		isl_union_map_free(tree->extension);
++		isl_union_map_free(tree->anonunion.extension);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		isl_union_set_free(tree->filter);
++		isl_union_set_free(tree->anonunion.filter);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		isl_set_free(tree->guard);
++		isl_set_free(tree->anonunion.guard);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		isl_id_free(tree->mark);
++		isl_id_free(tree->anonunion.mark);
+ 		break;
+ 	case isl_schedule_node_sequence:
+ 	case isl_schedule_node_set:
+@@ -241,7 +241,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = band;
++	tree->anonunion.band = band;
+ 	tree->anchored = isl_schedule_band_is_anchored(band);
+ 
+ 	return tree;
+@@ -268,7 +268,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->context = context;
++	tree->anonunion.context = context;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -293,7 +293,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->domain = domain;
++	tree->anonunion.domain = domain;
+ 
+ 	return tree;
+ error:
+@@ -319,8 +319,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->contraction = contraction;
+-	tree->expansion = expansion;
++	tree->anonunion.anonstruct.contraction = contraction;
++	tree->anonunion.anonstruct.expansion = expansion;
+ 
+ 	return tree;
+ error:
+@@ -348,7 +348,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->extension = extension;
++	tree->anonunion.extension = extension;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -373,7 +373,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->filter = filter;
++	tree->anonunion.filter = filter;
+ 
+ 	return tree;
+ error:
+@@ -399,7 +399,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->guard = guard;
++	tree->anonunion.guard = guard;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -425,7 +425,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->mark = mark;
++	tree->anonunion.mark = mark;
+ 
+ 	return tree;
+ error:
+@@ -456,7 +456,7 @@
+ 	case isl_schedule_node_error:
+ 		return -1;
+ 	case isl_schedule_node_band:
+-		return isl_schedule_band_is_anchored(tree->band);
++		return isl_schedule_band_is_anchored(tree->anonunion.band);
+ 	case isl_schedule_node_context:
+ 	case isl_schedule_node_extension:
+ 	case isl_schedule_node_guard:
+@@ -639,34 +639,34 @@
+ 
+ 	switch (tree1->type) {
+ 	case isl_schedule_node_band:
+-		equal = isl_schedule_band_plain_is_equal(tree1->band,
+-							tree2->band);
++		equal = isl_schedule_band_plain_is_equal(tree1->anonunion.band,
++							tree2->anonunion.band);
+ 		break;
+ 	case isl_schedule_node_context:
+-		equal = isl_set_is_equal(tree1->context, tree2->context);
++		equal = isl_set_is_equal(tree1->anonunion.context, tree2->anonunion.context);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		equal = isl_union_set_is_equal(tree1->domain, tree2->domain);
++		equal = isl_union_set_is_equal(tree1->anonunion.domain, tree2->anonunion.domain);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		equal = isl_union_map_is_equal(tree1->expansion,
+-						tree2->expansion);
++		equal = isl_union_map_is_equal(tree1->anonunion.anonstruct.expansion,
++						tree2->anonunion.anonstruct.expansion);
+ 		if (equal >= 0 && equal)
+ 			equal = isl_union_pw_multi_aff_plain_is_equal(
+-				    tree1->contraction, tree2->contraction);
++				    tree1->anonunion.anonstruct.contraction, tree2->anonunion.anonstruct.contraction);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		equal = isl_union_map_is_equal(tree1->extension,
+-						tree2->extension);
++		equal = isl_union_map_is_equal(tree1->anonunion.extension,
++						tree2->anonunion.extension);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		equal = isl_union_set_is_equal(tree1->filter, tree2->filter);
++		equal = isl_union_set_is_equal(tree1->anonunion.filter, tree2->anonunion.filter);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		equal = isl_set_is_equal(tree1->guard, tree2->guard);
++		equal = isl_set_is_equal(tree1->anonunion.guard, tree2->anonunion.guard);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		equal = tree1->mark == tree2->mark;
++		equal = tree1->anonunion.mark == tree2->anonunion.mark;
+ 		break;
+ 	case isl_schedule_node_leaf:
+ 	case isl_schedule_node_sequence:
+@@ -1002,7 +1002,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return 0);
+ 
+-	return isl_schedule_band_n_member(tree->band);
++	return isl_schedule_band_n_member(tree->anonunion.band);
+ }
+ 
+ /* Is the band member at position "pos" of the band tree root
+@@ -1018,7 +1018,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_bool_error);
+ 
+-	return isl_schedule_band_member_get_coincident(tree->band, pos);
++	return isl_schedule_band_member_get_coincident(tree->anonunion.band, pos);
+ }
+ 
+ /* Mark the given band member as being coincident or not
+@@ -1039,9 +1039,9 @@
+ 	if (!tree)
+ 		return NULL;
+ 
+-	tree->band = isl_schedule_band_member_set_coincident(tree->band, pos,
++	tree->anonunion.band = isl_schedule_band_member_set_coincident(tree->anonunion.band, pos,
+ 							coincident);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ }
+@@ -1058,7 +1058,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_bool_error);
+ 
+-	return isl_schedule_band_get_permutable(tree->band);
++	return isl_schedule_band_get_permutable(tree->anonunion.band);
+ }
+ 
+ /* Mark the band tree root permutable or not according to "permutable"?
+@@ -1077,8 +1077,8 @@
+ 	if (!tree)
+ 		return NULL;
+ 
+-	tree->band = isl_schedule_band_set_permutable(tree->band, permutable);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_set_permutable(tree->anonunion.band, permutable);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ }
+@@ -1095,7 +1095,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_space(tree->band);
++	return isl_schedule_band_get_space(tree->anonunion.band);
+ }
+ 
+ /* Intersect the domain of the band schedule of the band tree root
+@@ -1111,8 +1111,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", goto error);
+ 
+-	tree->band = isl_schedule_band_intersect_domain(tree->band, domain);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_intersect_domain(tree->anonunion.band, domain);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1134,7 +1134,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_partial_schedule(tree->band);
++	return isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ }
+ 
+ /* Replace the schedule of the band tree root by "schedule".
+@@ -1150,7 +1150,7 @@
+ 	if (tree->type != isl_schedule_node_band)
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+-	tree->band = isl_schedule_band_set_partial_schedule(tree->band,
++	tree->anonunion.band = isl_schedule_band_set_partial_schedule(tree->anonunion.band,
+ 								schedule);
+ 
+ 	return tree;
+@@ -1173,7 +1173,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_ast_loop_error);
+ 
+-	return isl_schedule_band_member_get_ast_loop_type(tree->band, pos);
++	return isl_schedule_band_member_get_ast_loop_type(tree->anonunion.band, pos);
+ }
+ 
+ /* Set the loop AST generation type for the band member of the band tree root
+@@ -1191,9 +1191,9 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_schedule_tree_free(tree));
+ 
+-	tree->band = isl_schedule_band_member_set_ast_loop_type(tree->band,
++	tree->anonunion.band = isl_schedule_band_member_set_ast_loop_type(tree->anonunion.band,
+ 								pos, type);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1212,7 +1212,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_ast_loop_error);
+ 
+-	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->band,
++	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->anonunion.band,
+ 									pos);
+ }
+ 
+@@ -1232,9 +1232,9 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_schedule_tree_free(tree));
+ 
+-	tree->band = isl_schedule_band_member_set_isolate_ast_loop_type(
+-							tree->band, pos, type);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_member_set_isolate_ast_loop_type(
++							tree->anonunion.band, pos, type);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1252,7 +1252,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_ast_build_options(tree->band);
++	return isl_schedule_band_get_ast_build_options(tree->anonunion.band);
+ }
+ 
+ /* Replace the AST build options associated to band tree root by "options".
+@@ -1273,9 +1273,9 @@
+ 			"not a band node", goto error);
+ 
+ 	was_anchored = isl_schedule_tree_is_anchored(tree);
+-	tree->band = isl_schedule_band_set_ast_build_options(tree->band,
++	tree->anonunion.band = isl_schedule_band_set_ast_build_options(tree->anonunion.band,
+ 								options);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	if (isl_schedule_tree_is_anchored(tree) != was_anchored)
+ 		tree = isl_schedule_tree_update_anchored(tree);
+@@ -1300,7 +1300,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_ast_isolate_option(tree->band, depth);
++	return isl_schedule_band_get_ast_isolate_option(tree->anonunion.band, depth);
+ }
+ 
+ /* Return the context of the context tree root.
+@@ -1315,7 +1315,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a context node", return NULL);
+ 
+-	return isl_set_copy(tree->context);
++	return isl_set_copy(tree->anonunion.context);
+ }
+ 
+ /* Return the domain of the domain tree root.
+@@ -1330,7 +1330,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a domain node", return NULL);
+ 
+-	return isl_union_set_copy(tree->domain);
++	return isl_union_set_copy(tree->anonunion.domain);
+ }
+ 
+ /* Replace the domain of domain tree root "tree" by "domain".
+@@ -1346,8 +1346,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a domain node", goto error);
+ 
+-	isl_union_set_free(tree->domain);
+-	tree->domain = domain;
++	isl_union_set_free(tree->anonunion.domain);
++	tree->anonunion.domain = domain;
+ 
+ 	return tree;
+ error:
+@@ -1368,7 +1368,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	return isl_union_pw_multi_aff_copy(tree->contraction);
++	return isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
+ }
+ 
+ /* Return the expansion of the expansion tree root.
+@@ -1383,7 +1383,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	return isl_union_map_copy(tree->expansion);
++	return isl_union_map_copy(tree->anonunion.anonstruct.expansion);
+ }
+ 
+ /* Replace the contraction and the expansion of the expansion tree root "tree"
+@@ -1403,10 +1403,10 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	isl_union_pw_multi_aff_free(tree->contraction);
+-	tree->contraction = contraction;
+-	isl_union_map_free(tree->expansion);
+-	tree->expansion = expansion;
++	isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
++	tree->anonunion.anonstruct.contraction = contraction;
++	isl_union_map_free(tree->anonunion.anonstruct.expansion);
++	tree->anonunion.anonstruct.expansion = expansion;
+ 
+ 	return tree;
+ error:
+@@ -1428,7 +1428,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an extension node", return NULL);
+ 
+-	return isl_union_map_copy(tree->extension);
++	return isl_union_map_copy(tree->anonunion.extension);
+ }
+ 
+ /* Replace the extension of extension tree root "tree" by "extension".
+@@ -1443,8 +1443,8 @@
+ 	if (tree->type != isl_schedule_node_extension)
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an extension node", return NULL);
+-	isl_union_map_free(tree->extension);
+-	tree->extension = extension;
++	isl_union_map_free(tree->anonunion.extension);
++	tree->anonunion.extension = extension;
+ 
+ 	return tree;
+ error:
+@@ -1465,7 +1465,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a filter node", return NULL);
+ 
+-	return isl_union_set_copy(tree->filter);
++	return isl_union_set_copy(tree->anonunion.filter);
+ }
+ 
+ /* Replace the filter of the filter tree root by "filter".
+@@ -1481,8 +1481,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a filter node", return NULL);
+ 
+-	isl_union_set_free(tree->filter);
+-	tree->filter = filter;
++	isl_union_set_free(tree->anonunion.filter);
++	tree->anonunion.filter = filter;
+ 
+ 	return tree;
+ error:
+@@ -1503,7 +1503,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a guard node", return NULL);
+ 
+-	return isl_set_copy(tree->guard);
++	return isl_set_copy(tree->anonunion.guard);
+ }
+ 
+ /* Return the mark identifier of the mark tree root "tree".
+@@ -1518,7 +1518,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a mark node", return NULL);
+ 
+-	return isl_id_copy(tree->mark);
++	return isl_id_copy(tree->anonunion.mark);
+ }
+ 
+ /* Set dim to the range dimension of "map" and abort the search.
+@@ -1828,7 +1828,7 @@
+ 	case isl_schedule_node_band:
+ 		if (isl_schedule_tree_band_n_member(tree) == 0)
+ 			return subtree_schedule_extend_child(tree, outer);
+-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
++		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ 		umap = isl_union_map_from_multi_union_pw_aff(mupa);
+ 		outer = isl_union_map_flat_range_product(outer, umap);
+ 		umap = subtree_schedule_extend_child(tree, outer);
+@@ -1940,7 +1940,7 @@
+ 				isl_error_internal,
+ 				"0D band should be handled by caller",
+ 				return NULL);
+-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
++		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ 		domain = isl_multi_union_pw_aff_domain(mupa);
+ 		domain = isl_union_set_universe(domain);
+ 		break;
+@@ -2008,8 +2008,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_scale(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_scale(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2035,8 +2035,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_scale_down(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_scale_down(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2062,8 +2062,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_mod(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_mod(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2089,8 +2089,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_shift(tree->band, shift);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_shift(tree->anonunion.band, shift);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2165,12 +2165,12 @@
+ 	if (!tree || !child)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_tile(tree->band,
++	tree->anonunion.band = isl_schedule_band_tile(tree->anonunion.band,
+ 					    isl_multi_val_copy(sizes));
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		goto error;
+-	child->band = isl_schedule_band_point(child->band, tree->band, sizes);
+-	if (!child->band)
++	child->anonunion.band = isl_schedule_band_point(child->anonunion.band, tree->anonunion.band, sizes);
++	if (!child->anonunion.band)
+ 		child = isl_schedule_tree_free(child);
+ 
+ 	tree = isl_schedule_tree_replace_child(tree, 0, child);
+@@ -2295,14 +2295,14 @@
+ 	isolate = isl_schedule_tree_band_get_ast_isolate_option(tree, depth);
+ 	tree_isolate = isolate_initial(isolate, pos, n - pos);
+ 	child_isolate = isolate_final(isolate, pos, n - pos);
+-	child->band = isl_schedule_band_drop(child->band, 0, pos);
+-	child->band = isl_schedule_band_replace_ast_build_option(child->band,
++	child->anonunion.band = isl_schedule_band_drop(child->anonunion.band, 0, pos);
++	child->anonunion.band = isl_schedule_band_replace_ast_build_option(child->anonunion.band,
+ 					isl_set_copy(isolate), child_isolate);
+-	tree->band = isl_schedule_band_drop(tree->band, pos, n - pos);
+-	tree->band = isl_schedule_band_replace_ast_build_option(tree->band,
++	tree->anonunion.band = isl_schedule_band_drop(tree->anonunion.band, pos, n - pos);
++	tree->anonunion.band = isl_schedule_band_replace_ast_build_option(tree->anonunion.band,
+ 					isl_set_copy(isolate), tree_isolate);
+ 	isl_set_free(isolate);
+-	if (!child->band || !tree->band)
++	if (!child->anonunion.band || !tree->anonunion.band)
+ 		goto error;
+ 
+ 	tree = isl_schedule_tree_replace_child(tree, 0, child);
+@@ -2369,40 +2369,40 @@
+ 	case isl_schedule_node_error:
+ 		return isl_schedule_tree_free(tree);
+ 	case isl_schedule_node_band:
+-		tree->band = isl_schedule_band_reset_user(tree->band);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_reset_user(tree->anonunion.band);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_context:
+-		tree->context = isl_set_reset_user(tree->context);
+-		if (!tree->context)
++		tree->anonunion.context = isl_set_reset_user(tree->anonunion.context);
++		if (!tree->anonunion.context)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		tree->domain = isl_union_set_reset_user(tree->domain);
+-		if (!tree->domain)
++		tree->anonunion.domain = isl_union_set_reset_user(tree->anonunion.domain);
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		tree->contraction =
+-			isl_union_pw_multi_aff_reset_user(tree->contraction);
+-		tree->expansion = isl_union_map_reset_user(tree->expansion);
+-		if (!tree->contraction || !tree->expansion)
++		tree->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_reset_user(tree->anonunion.anonstruct.contraction);
++		tree->anonunion.anonstruct.expansion = isl_union_map_reset_user(tree->anonunion.anonstruct.expansion);
++		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		tree->extension = isl_union_map_reset_user(tree->extension);
+-		if (!tree->extension)
++		tree->anonunion.extension = isl_union_map_reset_user(tree->anonunion.extension);
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		tree->filter = isl_union_set_reset_user(tree->filter);
+-		if (!tree->filter)
++		tree->anonunion.filter = isl_union_set_reset_user(tree->anonunion.filter);
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		tree->guard = isl_set_reset_user(tree->guard);
+-		if (!tree->guard)
++		tree->anonunion.guard = isl_set_reset_user(tree->anonunion.guard);
++		if (!tree->anonunion.guard)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -2436,43 +2436,43 @@
+ 	case isl_schedule_node_error:
+ 		goto error;
+ 	case isl_schedule_node_band:
+-		tree->band = isl_schedule_band_align_params(tree->band, space);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_align_params(tree->anonunion.band, space);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_context:
+-		tree->context = isl_set_align_params(tree->context, space);
+-		if (!tree->context)
++		tree->anonunion.context = isl_set_align_params(tree->anonunion.context, space);
++		if (!tree->anonunion.context)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		tree->domain = isl_union_set_align_params(tree->domain, space);
+-		if (!tree->domain)
++		tree->anonunion.domain = isl_union_set_align_params(tree->anonunion.domain, space);
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		tree->contraction =
+-			isl_union_pw_multi_aff_align_params(tree->contraction,
++		tree->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_align_params(tree->anonunion.anonstruct.contraction,
+ 							isl_space_copy(space));
+-		tree->expansion = isl_union_map_align_params(tree->expansion,
++		tree->anonunion.anonstruct.expansion = isl_union_map_align_params(tree->anonunion.anonstruct.expansion,
+ 								space);
+-		if (!tree->contraction || !tree->expansion)
++		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		tree->extension = isl_union_map_align_params(tree->extension,
++		tree->anonunion.extension = isl_union_map_align_params(tree->anonunion.extension,
+ 								space);
+-		if (!tree->extension)
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		tree->filter = isl_union_set_align_params(tree->filter, space);
+-		if (!tree->filter)
++		tree->anonunion.filter = isl_union_set_align_params(tree->anonunion.filter, space);
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		tree->guard = isl_set_align_params(tree->guard, space);
+-		if (!tree->guard)
++		tree->anonunion.guard = isl_set_align_params(tree->anonunion.guard, space);
++		if (!tree->anonunion.guard)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -2552,30 +2552,30 @@
+ 		goto error;
+ 
+ 	if (tree->type == isl_schedule_node_band) {
+-		tree->band = isl_schedule_band_pullback_union_pw_multi_aff(
+-							    tree->band, upma);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_pullback_union_pw_multi_aff(
++							    tree->anonunion.band, upma);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_domain) {
+-		tree->domain =
+-			isl_union_set_preimage_union_pw_multi_aff(tree->domain,
++		tree->anonunion.domain =
++			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.domain,
+ 									upma);
+-		if (!tree->domain)
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_expansion) {
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_unsupported,
+ 			"cannot pullback expansion node", goto error);
+ 	} else if (tree->type == isl_schedule_node_extension) {
+-		tree->extension =
++		tree->anonunion.extension =
+ 			isl_union_map_preimage_range_union_pw_multi_aff(
+-			    tree->extension, upma);
+-		if (!tree->extension)
++			    tree->anonunion.extension, upma);
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_filter) {
+-		tree->filter =
+-			isl_union_set_preimage_union_pw_multi_aff(tree->filter,
++		tree->anonunion.filter =
++			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.filter,
+ 									upma);
+-		if (!tree->filter)
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 	}
+ 
+@@ -2600,8 +2600,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_gist(tree->band, context);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_gist(tree->anonunion.band, context);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ error:
+@@ -2729,59 +2729,59 @@
+ 		p = isl_printer_print_str(p, "context");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_set(p, tree->context);
++		p = isl_printer_print_set(p, tree->anonunion.context);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_domain:
+ 		p = isl_printer_print_str(p, "domain");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_set(p, tree->domain);
++		p = isl_printer_print_union_set(p, tree->anonunion.domain);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_expansion:
+ 		p = isl_printer_print_str(p, "contraction");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_pw_multi_aff(p, tree->contraction);
++		p = isl_printer_print_union_pw_multi_aff(p, tree->anonunion.anonstruct.contraction);
+ 		p = isl_printer_print_str(p, "\"");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "expansion");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_map(p, tree->expansion);
++		p = isl_printer_print_union_map(p, tree->anonunion.anonstruct.expansion);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_extension:
+ 		p = isl_printer_print_str(p, "extension");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_map(p, tree->extension);
++		p = isl_printer_print_union_map(p, tree->anonunion.extension);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_filter:
+ 		p = isl_printer_print_str(p, "filter");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_set(p, tree->filter);
++		p = isl_printer_print_union_set(p, tree->anonunion.filter);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_guard:
+ 		p = isl_printer_print_str(p, "guard");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_set(p, tree->guard);
++		p = isl_printer_print_set(p, tree->anonunion.guard);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_mark:
+ 		p = isl_printer_print_str(p, "mark");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_str(p, isl_id_get_name(tree->mark));
++		p = isl_printer_print_str(p, isl_id_get_name(tree->anonunion.mark));
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_band:
+-		p = print_tree_band(p, tree->band);
++		p = print_tree_band(p, tree->anonunion.band);
+ 		break;
+ 	}
+ 	p = isl_printer_yaml_next(p);
diff -Naur gcc-9.5.0/isl-0.18/isl_schedule_tree.h gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.h
--- gcc-9.5.0/isl-0.18/isl_schedule_tree.h	2016-12-12 04:15:44.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.h	2024-12-22 11:54:48.327900000 +0000
@@ -63,12 +63,12 @@
 		struct {
 			isl_union_pw_multi_aff *contraction;
 			isl_union_map *expansion;
-		};
+		} anonstruct;
 		isl_union_map *extension;
 		isl_union_set *filter;
 		isl_set *guard;
 		isl_id *mark;
-	};
+	} anonunion;
 	isl_schedule_tree_list *children;
 };
 
diff -Naur gcc-9.5.0/isl-0.18/isl_schedule_tree.h.rej gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.h.rej
--- gcc-9.5.0/isl-0.18/isl_schedule_tree.h.rej	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_schedule_tree.h.rej	2024-12-22 11:54:26.488072000 +0000
@@ -0,0 +1,17 @@
+--- isl_schedule_tree.h	2016-12-12 09:15:44.000000000 +0000
++++ isl_schedule_tree.h	2019-05-30 19:16:57.974657440 +0000
+@@ -63,12 +63,12 @@
+ 		struct {
+ 			isl_union_pw_multi_aff *contraction;
+ 			isl_union_map *expansion;
+-		};
++		} anonstruct;
+ 		isl_union_map *extension;
+ 		isl_union_set *filter;
+ 		isl_set *guard;
+ 		isl_id *mark;
+-	};
++	} anonunion;
+ 	isl_schedule_tree_list *children;
+ };
+ 
diff -Naur gcc-9.5.0/isl-0.18/isl_test.c gcc-9.5.0-irix/isl-0.18/isl_test.c
--- gcc-9.5.0/isl-0.18/isl_test.c	2016-12-15 06:27:30.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_test.c	2024-12-22 11:54:48.335515200 +0000
@@ -493,18 +493,22 @@
 	return 0;
 }
 
-struct {
+struct vbo {
 	__isl_give isl_val *(*fn)(__isl_take isl_val *v1,
 				__isl_take isl_val *v2);
-} val_bin_op[] = {
-	['+'] = { &isl_val_add },
-	['-'] = { &isl_val_sub },
-	['*'] = { &isl_val_mul },
-	['/'] = { &isl_val_div },
-	['g'] = { &isl_val_gcd },
-	['m'] = { &isl_val_min },
-	['M'] = { &isl_val_max },
-};
+} vbo;
+struct vbo val_bin_op[256];
+
+void setup_val_bin_ops()
+{
+  val_bin_op['+'].fn=&isl_val_add;
+  val_bin_op['-'].fn=&isl_val_sub;
+  val_bin_op['*'].fn=&isl_val_mul;
+  val_bin_op['/'].fn=&isl_val_div;
+  val_bin_op['g'].fn=&isl_val_gcd;
+  val_bin_op['m'].fn=&isl_val_min;
+  val_bin_op['M'].fn=&isl_val_max;
+}
 
 struct {
 	const char *arg1;
@@ -4344,14 +4348,18 @@
 	return 0;
 }
 
-struct {
+struct abo {
 	__isl_give isl_aff *(*fn)(__isl_take isl_aff *aff1,
 				__isl_take isl_aff *aff2);
-} aff_bin_op[] = {
-	['+'] = { &isl_aff_add },
-	['-'] = { &isl_aff_sub },
-	['*'] = { &isl_aff_mul },
-	['/'] = { &isl_aff_div },
+} abo;
+struct abo aff_bin_op[256];
+
+void setup_aff_bin_ops()
+{
+  aff_bin_op['+'].fn=&isl_aff_add;
+  aff_bin_op['-'].fn=&isl_aff_sub;
+  aff_bin_op['*'].fn=&isl_aff_mul;
+  aff_bin_op['/'].fn=&isl_aff_div;
 };
 
 struct {
@@ -6943,6 +6951,9 @@
 	struct isl_ctx *ctx;
 	struct isl_options *options;
 
+	setup_val_bin_ops();
+	setup_aff_bin_ops();
+
 	options = isl_options_new_with_defaults();
 	assert(options);
 	argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
diff -Naur gcc-9.5.0/isl-0.18/isl_test.c.rej gcc-9.5.0-irix/isl-0.18/isl_test.c.rej
--- gcc-9.5.0/isl-0.18/isl_test.c.rej	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/isl_test.c.rej	2024-12-22 11:54:27.424405600 +0000
@@ -0,0 +1,70 @@
+--- isl_test.c	2016-12-15 11:27:30.000000000 +0000
++++ isl_test.c	2019-05-30 19:29:59.117169440 +0000
+@@ -493,18 +493,22 @@
+ 	return 0;
+ }
+ 
+-struct {
++struct vbo {
+ 	__isl_give isl_val *(*fn)(__isl_take isl_val *v1,
+ 				__isl_take isl_val *v2);
+-} val_bin_op[] = {
+-	['+'] = { &isl_val_add },
+-	['-'] = { &isl_val_sub },
+-	['*'] = { &isl_val_mul },
+-	['/'] = { &isl_val_div },
+-	['g'] = { &isl_val_gcd },
+-	['m'] = { &isl_val_min },
+-	['M'] = { &isl_val_max },
+-};
++} vbo;
++struct vbo val_bin_op[256];
++
++void setup_val_bin_ops()
++{
++  val_bin_op['+'].fn=&isl_val_add;
++  val_bin_op['-'].fn=&isl_val_sub;
++  val_bin_op['*'].fn=&isl_val_mul;
++  val_bin_op['/'].fn=&isl_val_div;
++  val_bin_op['g'].fn=&isl_val_gcd;
++  val_bin_op['m'].fn=&isl_val_min;
++  val_bin_op['M'].fn=&isl_val_max;
++}
+ 
+ struct {
+ 	const char *arg1;
+@@ -4344,14 +4348,18 @@
+ 	return 0;
+ }
+ 
+-struct {
++struct abo {
+ 	__isl_give isl_aff *(*fn)(__isl_take isl_aff *aff1,
+ 				__isl_take isl_aff *aff2);
+-} aff_bin_op[] = {
+-	['+'] = { &isl_aff_add },
+-	['-'] = { &isl_aff_sub },
+-	['*'] = { &isl_aff_mul },
+-	['/'] = { &isl_aff_div },
++} abo;
++struct abo aff_bin_op[256];
++
++void setup_aff_bin_ops()
++{
++  aff_bin_op['+'].fn=&isl_aff_add;
++  aff_bin_op['-'].fn=&isl_aff_sub;
++  aff_bin_op['*'].fn=&isl_aff_mul;
++  aff_bin_op['/'].fn=&isl_aff_div;
+ };
+ 
+ struct {
+@@ -6943,6 +6951,9 @@
+ 	struct isl_ctx *ctx;
+ 	struct isl_options *options;
+ 
++	setup_val_bin_ops();
++	setup_aff_bin_ops();
++
+ 	options = isl_options_new_with_defaults();
+ 	assert(options);
+ 	argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
diff -Naur gcc-9.5.0/isl-0.18/libisl.sgifixes.patch gcc-9.5.0-irix/isl-0.18/libisl.sgifixes.patch
--- gcc-9.5.0/isl-0.18/libisl.sgifixes.patch	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/isl-0.18/libisl.sgifixes.patch	2024-12-22 11:54:16.607330400 +0000
@@ -0,0 +1,945 @@
+diff -u -r -w isl-0.18/isl_schedule_tree.c isl-0.18-patched/isl_schedule_tree.c
+--- isl-0.18/isl_schedule_tree.c	2016-12-15 11:27:30.000000000 +0000
++++ isl-0.18-patched/isl_schedule_tree.c	2019-05-30 19:16:57.970849120 +0000
+@@ -84,45 +84,45 @@
+ 			"allocation should have failed",
+ 			isl_schedule_tree_free(dup));
+ 	case isl_schedule_node_band:
+-		dup->band = isl_schedule_band_copy(tree->band);
+-		if (!dup->band)
++		dup->anonunion.band = isl_schedule_band_copy(tree->anonunion.band);
++		if (!dup->anonunion.band)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_context:
+-		dup->context = isl_set_copy(tree->context);
+-		if (!dup->context)
++		dup->anonunion.context = isl_set_copy(tree->anonunion.context);
++		if (!dup->anonunion.context)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		dup->domain = isl_union_set_copy(tree->domain);
+-		if (!dup->domain)
++		dup->anonunion.domain = isl_union_set_copy(tree->anonunion.domain);
++		if (!dup->anonunion.domain)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		dup->contraction =
+-			isl_union_pw_multi_aff_copy(tree->contraction);
+-		dup->expansion = isl_union_map_copy(tree->expansion);
+-		if (!dup->contraction || !dup->expansion)
++		dup->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
++		dup->anonunion.anonstruct.expansion = isl_union_map_copy(tree->anonunion.anonstruct.expansion);
++		if (!dup->anonunion.anonstruct.contraction || !dup->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		dup->extension = isl_union_map_copy(tree->extension);
+-		if (!dup->extension)
++		dup->anonunion.extension = isl_union_map_copy(tree->anonunion.extension);
++		if (!dup->anonunion.extension)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		dup->filter = isl_union_set_copy(tree->filter);
+-		if (!dup->filter)
++		dup->anonunion.filter = isl_union_set_copy(tree->anonunion.filter);
++		if (!dup->anonunion.filter)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		dup->guard = isl_set_copy(tree->guard);
+-		if (!dup->guard)
++		dup->anonunion.guard = isl_set_copy(tree->anonunion.guard);
++		if (!dup->anonunion.guard)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		dup->mark = isl_id_copy(tree->mark);
+-		if (!dup->mark)
++		dup->anonunion.mark = isl_id_copy(tree->anonunion.mark);
++		if (!dup->anonunion.mark)
+ 			return isl_schedule_tree_free(dup);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -180,29 +180,29 @@
+ 
+ 	switch (tree->type) {
+ 	case isl_schedule_node_band:
+-		isl_schedule_band_free(tree->band);
++		isl_schedule_band_free(tree->anonunion.band);
+ 		break;
+ 	case isl_schedule_node_context:
+-		isl_set_free(tree->context);
++		isl_set_free(tree->anonunion.context);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		isl_union_set_free(tree->domain);
++		isl_union_set_free(tree->anonunion.domain);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		isl_union_pw_multi_aff_free(tree->contraction);
+-		isl_union_map_free(tree->expansion);
++		isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
++		isl_union_map_free(tree->anonunion.anonstruct.expansion);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		isl_union_map_free(tree->extension);
++		isl_union_map_free(tree->anonunion.extension);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		isl_union_set_free(tree->filter);
++		isl_union_set_free(tree->anonunion.filter);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		isl_set_free(tree->guard);
++		isl_set_free(tree->anonunion.guard);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		isl_id_free(tree->mark);
++		isl_id_free(tree->anonunion.mark);
+ 		break;
+ 	case isl_schedule_node_sequence:
+ 	case isl_schedule_node_set:
+@@ -241,7 +241,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = band;
++	tree->anonunion.band = band;
+ 	tree->anchored = isl_schedule_band_is_anchored(band);
+ 
+ 	return tree;
+@@ -268,7 +268,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->context = context;
++	tree->anonunion.context = context;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -293,7 +293,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->domain = domain;
++	tree->anonunion.domain = domain;
+ 
+ 	return tree;
+ error:
+@@ -319,8 +319,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->contraction = contraction;
+-	tree->expansion = expansion;
++	tree->anonunion.anonstruct.contraction = contraction;
++	tree->anonunion.anonstruct.expansion = expansion;
+ 
+ 	return tree;
+ error:
+@@ -348,7 +348,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->extension = extension;
++	tree->anonunion.extension = extension;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -373,7 +373,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->filter = filter;
++	tree->anonunion.filter = filter;
+ 
+ 	return tree;
+ error:
+@@ -399,7 +399,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->guard = guard;
++	tree->anonunion.guard = guard;
+ 	tree->anchored = 1;
+ 
+ 	return tree;
+@@ -425,7 +425,7 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->mark = mark;
++	tree->anonunion.mark = mark;
+ 
+ 	return tree;
+ error:
+@@ -456,7 +456,7 @@
+ 	case isl_schedule_node_error:
+ 		return -1;
+ 	case isl_schedule_node_band:
+-		return isl_schedule_band_is_anchored(tree->band);
++		return isl_schedule_band_is_anchored(tree->anonunion.band);
+ 	case isl_schedule_node_context:
+ 	case isl_schedule_node_extension:
+ 	case isl_schedule_node_guard:
+@@ -639,34 +639,34 @@
+ 
+ 	switch (tree1->type) {
+ 	case isl_schedule_node_band:
+-		equal = isl_schedule_band_plain_is_equal(tree1->band,
+-							tree2->band);
++		equal = isl_schedule_band_plain_is_equal(tree1->anonunion.band,
++							tree2->anonunion.band);
+ 		break;
+ 	case isl_schedule_node_context:
+-		equal = isl_set_is_equal(tree1->context, tree2->context);
++		equal = isl_set_is_equal(tree1->anonunion.context, tree2->anonunion.context);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		equal = isl_union_set_is_equal(tree1->domain, tree2->domain);
++		equal = isl_union_set_is_equal(tree1->anonunion.domain, tree2->anonunion.domain);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		equal = isl_union_map_is_equal(tree1->expansion,
+-						tree2->expansion);
++		equal = isl_union_map_is_equal(tree1->anonunion.anonstruct.expansion,
++						tree2->anonunion.anonstruct.expansion);
+ 		if (equal >= 0 && equal)
+ 			equal = isl_union_pw_multi_aff_plain_is_equal(
+-				    tree1->contraction, tree2->contraction);
++				    tree1->anonunion.anonstruct.contraction, tree2->anonunion.anonstruct.contraction);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		equal = isl_union_map_is_equal(tree1->extension,
+-						tree2->extension);
++		equal = isl_union_map_is_equal(tree1->anonunion.extension,
++						tree2->anonunion.extension);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		equal = isl_union_set_is_equal(tree1->filter, tree2->filter);
++		equal = isl_union_set_is_equal(tree1->anonunion.filter, tree2->anonunion.filter);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		equal = isl_set_is_equal(tree1->guard, tree2->guard);
++		equal = isl_set_is_equal(tree1->anonunion.guard, tree2->anonunion.guard);
+ 		break;
+ 	case isl_schedule_node_mark:
+-		equal = tree1->mark == tree2->mark;
++		equal = tree1->anonunion.mark == tree2->anonunion.mark;
+ 		break;
+ 	case isl_schedule_node_leaf:
+ 	case isl_schedule_node_sequence:
+@@ -1002,7 +1002,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return 0);
+ 
+-	return isl_schedule_band_n_member(tree->band);
++	return isl_schedule_band_n_member(tree->anonunion.band);
+ }
+ 
+ /* Is the band member at position "pos" of the band tree root
+@@ -1018,7 +1018,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_bool_error);
+ 
+-	return isl_schedule_band_member_get_coincident(tree->band, pos);
++	return isl_schedule_band_member_get_coincident(tree->anonunion.band, pos);
+ }
+ 
+ /* Mark the given band member as being coincident or not
+@@ -1039,9 +1039,9 @@
+ 	if (!tree)
+ 		return NULL;
+ 
+-	tree->band = isl_schedule_band_member_set_coincident(tree->band, pos,
++	tree->anonunion.band = isl_schedule_band_member_set_coincident(tree->anonunion.band, pos,
+ 							coincident);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ }
+@@ -1058,7 +1058,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_bool_error);
+ 
+-	return isl_schedule_band_get_permutable(tree->band);
++	return isl_schedule_band_get_permutable(tree->anonunion.band);
+ }
+ 
+ /* Mark the band tree root permutable or not according to "permutable"?
+@@ -1077,8 +1077,8 @@
+ 	if (!tree)
+ 		return NULL;
+ 
+-	tree->band = isl_schedule_band_set_permutable(tree->band, permutable);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_set_permutable(tree->anonunion.band, permutable);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ }
+@@ -1095,7 +1095,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_space(tree->band);
++	return isl_schedule_band_get_space(tree->anonunion.band);
+ }
+ 
+ /* Intersect the domain of the band schedule of the band tree root
+@@ -1111,8 +1111,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", goto error);
+ 
+-	tree->band = isl_schedule_band_intersect_domain(tree->band, domain);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_intersect_domain(tree->anonunion.band, domain);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1134,7 +1134,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_partial_schedule(tree->band);
++	return isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ }
+ 
+ /* Replace the schedule of the band tree root by "schedule".
+@@ -1150,7 +1150,7 @@
+ 	if (tree->type != isl_schedule_node_band)
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+-	tree->band = isl_schedule_band_set_partial_schedule(tree->band,
++	tree->anonunion.band = isl_schedule_band_set_partial_schedule(tree->anonunion.band,
+ 								schedule);
+ 
+ 	return tree;
+@@ -1173,7 +1173,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_ast_loop_error);
+ 
+-	return isl_schedule_band_member_get_ast_loop_type(tree->band, pos);
++	return isl_schedule_band_member_get_ast_loop_type(tree->anonunion.band, pos);
+ }
+ 
+ /* Set the loop AST generation type for the band member of the band tree root
+@@ -1191,9 +1191,9 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_schedule_tree_free(tree));
+ 
+-	tree->band = isl_schedule_band_member_set_ast_loop_type(tree->band,
++	tree->anonunion.band = isl_schedule_band_member_set_ast_loop_type(tree->anonunion.band,
+ 								pos, type);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1212,7 +1212,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_ast_loop_error);
+ 
+-	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->band,
++	return isl_schedule_band_member_get_isolate_ast_loop_type(tree->anonunion.band,
+ 									pos);
+ }
+ 
+@@ -1232,9 +1232,9 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return isl_schedule_tree_free(tree));
+ 
+-	tree->band = isl_schedule_band_member_set_isolate_ast_loop_type(
+-							tree->band, pos, type);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_member_set_isolate_ast_loop_type(
++							tree->anonunion.band, pos, type);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -1252,7 +1252,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_ast_build_options(tree->band);
++	return isl_schedule_band_get_ast_build_options(tree->anonunion.band);
+ }
+ 
+ /* Replace the AST build options associated to band tree root by "options".
+@@ -1273,9 +1273,9 @@
+ 			"not a band node", goto error);
+ 
+ 	was_anchored = isl_schedule_tree_is_anchored(tree);
+-	tree->band = isl_schedule_band_set_ast_build_options(tree->band,
++	tree->anonunion.band = isl_schedule_band_set_ast_build_options(tree->anonunion.band,
+ 								options);
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	if (isl_schedule_tree_is_anchored(tree) != was_anchored)
+ 		tree = isl_schedule_tree_update_anchored(tree);
+@@ -1300,7 +1300,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a band node", return NULL);
+ 
+-	return isl_schedule_band_get_ast_isolate_option(tree->band, depth);
++	return isl_schedule_band_get_ast_isolate_option(tree->anonunion.band, depth);
+ }
+ 
+ /* Return the context of the context tree root.
+@@ -1315,7 +1315,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a context node", return NULL);
+ 
+-	return isl_set_copy(tree->context);
++	return isl_set_copy(tree->anonunion.context);
+ }
+ 
+ /* Return the domain of the domain tree root.
+@@ -1330,7 +1330,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a domain node", return NULL);
+ 
+-	return isl_union_set_copy(tree->domain);
++	return isl_union_set_copy(tree->anonunion.domain);
+ }
+ 
+ /* Replace the domain of domain tree root "tree" by "domain".
+@@ -1346,8 +1346,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a domain node", goto error);
+ 
+-	isl_union_set_free(tree->domain);
+-	tree->domain = domain;
++	isl_union_set_free(tree->anonunion.domain);
++	tree->anonunion.domain = domain;
+ 
+ 	return tree;
+ error:
+@@ -1368,7 +1368,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	return isl_union_pw_multi_aff_copy(tree->contraction);
++	return isl_union_pw_multi_aff_copy(tree->anonunion.anonstruct.contraction);
+ }
+ 
+ /* Return the expansion of the expansion tree root.
+@@ -1383,7 +1383,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	return isl_union_map_copy(tree->expansion);
++	return isl_union_map_copy(tree->anonunion.anonstruct.expansion);
+ }
+ 
+ /* Replace the contraction and the expansion of the expansion tree root "tree"
+@@ -1403,10 +1403,10 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an expansion node", return NULL);
+ 
+-	isl_union_pw_multi_aff_free(tree->contraction);
+-	tree->contraction = contraction;
+-	isl_union_map_free(tree->expansion);
+-	tree->expansion = expansion;
++	isl_union_pw_multi_aff_free(tree->anonunion.anonstruct.contraction);
++	tree->anonunion.anonstruct.contraction = contraction;
++	isl_union_map_free(tree->anonunion.anonstruct.expansion);
++	tree->anonunion.anonstruct.expansion = expansion;
+ 
+ 	return tree;
+ error:
+@@ -1428,7 +1428,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an extension node", return NULL);
+ 
+-	return isl_union_map_copy(tree->extension);
++	return isl_union_map_copy(tree->anonunion.extension);
+ }
+ 
+ /* Replace the extension of extension tree root "tree" by "extension".
+@@ -1443,8 +1443,8 @@
+ 	if (tree->type != isl_schedule_node_extension)
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not an extension node", return NULL);
+-	isl_union_map_free(tree->extension);
+-	tree->extension = extension;
++	isl_union_map_free(tree->anonunion.extension);
++	tree->anonunion.extension = extension;
+ 
+ 	return tree;
+ error:
+@@ -1465,7 +1465,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a filter node", return NULL);
+ 
+-	return isl_union_set_copy(tree->filter);
++	return isl_union_set_copy(tree->anonunion.filter);
+ }
+ 
+ /* Replace the filter of the filter tree root by "filter".
+@@ -1481,8 +1481,8 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a filter node", return NULL);
+ 
+-	isl_union_set_free(tree->filter);
+-	tree->filter = filter;
++	isl_union_set_free(tree->anonunion.filter);
++	tree->anonunion.filter = filter;
+ 
+ 	return tree;
+ error:
+@@ -1503,7 +1503,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a guard node", return NULL);
+ 
+-	return isl_set_copy(tree->guard);
++	return isl_set_copy(tree->anonunion.guard);
+ }
+ 
+ /* Return the mark identifier of the mark tree root "tree".
+@@ -1518,7 +1518,7 @@
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_invalid,
+ 			"not a mark node", return NULL);
+ 
+-	return isl_id_copy(tree->mark);
++	return isl_id_copy(tree->anonunion.mark);
+ }
+ 
+ /* Set dim to the range dimension of "map" and abort the search.
+@@ -1828,7 +1828,7 @@
+ 	case isl_schedule_node_band:
+ 		if (isl_schedule_tree_band_n_member(tree) == 0)
+ 			return subtree_schedule_extend_child(tree, outer);
+-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
++		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ 		umap = isl_union_map_from_multi_union_pw_aff(mupa);
+ 		outer = isl_union_map_flat_range_product(outer, umap);
+ 		umap = subtree_schedule_extend_child(tree, outer);
+@@ -1940,7 +1940,7 @@
+ 				isl_error_internal,
+ 				"0D band should be handled by caller",
+ 				return NULL);
+-		mupa = isl_schedule_band_get_partial_schedule(tree->band);
++		mupa = isl_schedule_band_get_partial_schedule(tree->anonunion.band);
+ 		domain = isl_multi_union_pw_aff_domain(mupa);
+ 		domain = isl_union_set_universe(domain);
+ 		break;
+@@ -2008,8 +2008,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_scale(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_scale(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2035,8 +2035,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_scale_down(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_scale_down(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2062,8 +2062,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_mod(tree->band, mv);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_mod(tree->anonunion.band, mv);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2089,8 +2089,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_shift(tree->band, shift);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_shift(tree->anonunion.band, shift);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 
+ 	return tree;
+@@ -2165,12 +2165,12 @@
+ 	if (!tree || !child)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_tile(tree->band,
++	tree->anonunion.band = isl_schedule_band_tile(tree->anonunion.band,
+ 					    isl_multi_val_copy(sizes));
+-	if (!tree->band)
++	if (!tree->anonunion.band)
+ 		goto error;
+-	child->band = isl_schedule_band_point(child->band, tree->band, sizes);
+-	if (!child->band)
++	child->anonunion.band = isl_schedule_band_point(child->anonunion.band, tree->anonunion.band, sizes);
++	if (!child->anonunion.band)
+ 		child = isl_schedule_tree_free(child);
+ 
+ 	tree = isl_schedule_tree_replace_child(tree, 0, child);
+@@ -2295,14 +2295,14 @@
+ 	isolate = isl_schedule_tree_band_get_ast_isolate_option(tree, depth);
+ 	tree_isolate = isolate_initial(isolate, pos, n - pos);
+ 	child_isolate = isolate_final(isolate, pos, n - pos);
+-	child->band = isl_schedule_band_drop(child->band, 0, pos);
+-	child->band = isl_schedule_band_replace_ast_build_option(child->band,
++	child->anonunion.band = isl_schedule_band_drop(child->anonunion.band, 0, pos);
++	child->anonunion.band = isl_schedule_band_replace_ast_build_option(child->anonunion.band,
+ 					isl_set_copy(isolate), child_isolate);
+-	tree->band = isl_schedule_band_drop(tree->band, pos, n - pos);
+-	tree->band = isl_schedule_band_replace_ast_build_option(tree->band,
++	tree->anonunion.band = isl_schedule_band_drop(tree->anonunion.band, pos, n - pos);
++	tree->anonunion.band = isl_schedule_band_replace_ast_build_option(tree->anonunion.band,
+ 					isl_set_copy(isolate), tree_isolate);
+ 	isl_set_free(isolate);
+-	if (!child->band || !tree->band)
++	if (!child->anonunion.band || !tree->anonunion.band)
+ 		goto error;
+ 
+ 	tree = isl_schedule_tree_replace_child(tree, 0, child);
+@@ -2369,40 +2369,40 @@
+ 	case isl_schedule_node_error:
+ 		return isl_schedule_tree_free(tree);
+ 	case isl_schedule_node_band:
+-		tree->band = isl_schedule_band_reset_user(tree->band);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_reset_user(tree->anonunion.band);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_context:
+-		tree->context = isl_set_reset_user(tree->context);
+-		if (!tree->context)
++		tree->anonunion.context = isl_set_reset_user(tree->anonunion.context);
++		if (!tree->anonunion.context)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		tree->domain = isl_union_set_reset_user(tree->domain);
+-		if (!tree->domain)
++		tree->anonunion.domain = isl_union_set_reset_user(tree->anonunion.domain);
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		tree->contraction =
+-			isl_union_pw_multi_aff_reset_user(tree->contraction);
+-		tree->expansion = isl_union_map_reset_user(tree->expansion);
+-		if (!tree->contraction || !tree->expansion)
++		tree->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_reset_user(tree->anonunion.anonstruct.contraction);
++		tree->anonunion.anonstruct.expansion = isl_union_map_reset_user(tree->anonunion.anonstruct.expansion);
++		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		tree->extension = isl_union_map_reset_user(tree->extension);
+-		if (!tree->extension)
++		tree->anonunion.extension = isl_union_map_reset_user(tree->anonunion.extension);
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		tree->filter = isl_union_set_reset_user(tree->filter);
+-		if (!tree->filter)
++		tree->anonunion.filter = isl_union_set_reset_user(tree->anonunion.filter);
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		tree->guard = isl_set_reset_user(tree->guard);
+-		if (!tree->guard)
++		tree->anonunion.guard = isl_set_reset_user(tree->anonunion.guard);
++		if (!tree->anonunion.guard)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -2436,43 +2436,43 @@
+ 	case isl_schedule_node_error:
+ 		goto error;
+ 	case isl_schedule_node_band:
+-		tree->band = isl_schedule_band_align_params(tree->band, space);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_align_params(tree->anonunion.band, space);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_context:
+-		tree->context = isl_set_align_params(tree->context, space);
+-		if (!tree->context)
++		tree->anonunion.context = isl_set_align_params(tree->anonunion.context, space);
++		if (!tree->anonunion.context)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_domain:
+-		tree->domain = isl_union_set_align_params(tree->domain, space);
+-		if (!tree->domain)
++		tree->anonunion.domain = isl_union_set_align_params(tree->anonunion.domain, space);
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_expansion:
+-		tree->contraction =
+-			isl_union_pw_multi_aff_align_params(tree->contraction,
++		tree->anonunion.anonstruct.contraction =
++			isl_union_pw_multi_aff_align_params(tree->anonunion.anonstruct.contraction,
+ 							isl_space_copy(space));
+-		tree->expansion = isl_union_map_align_params(tree->expansion,
++		tree->anonunion.anonstruct.expansion = isl_union_map_align_params(tree->anonunion.anonstruct.expansion,
+ 								space);
+-		if (!tree->contraction || !tree->expansion)
++		if (!tree->anonunion.anonstruct.contraction || !tree->anonunion.anonstruct.expansion)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_extension:
+-		tree->extension = isl_union_map_align_params(tree->extension,
++		tree->anonunion.extension = isl_union_map_align_params(tree->anonunion.extension,
+ 								space);
+-		if (!tree->extension)
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_filter:
+-		tree->filter = isl_union_set_align_params(tree->filter, space);
+-		if (!tree->filter)
++		tree->anonunion.filter = isl_union_set_align_params(tree->anonunion.filter, space);
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_guard:
+-		tree->guard = isl_set_align_params(tree->guard, space);
+-		if (!tree->guard)
++		tree->anonunion.guard = isl_set_align_params(tree->anonunion.guard, space);
++		if (!tree->anonunion.guard)
+ 			return isl_schedule_tree_free(tree);
+ 		break;
+ 	case isl_schedule_node_leaf:
+@@ -2552,30 +2552,30 @@
+ 		goto error;
+ 
+ 	if (tree->type == isl_schedule_node_band) {
+-		tree->band = isl_schedule_band_pullback_union_pw_multi_aff(
+-							    tree->band, upma);
+-		if (!tree->band)
++		tree->anonunion.band = isl_schedule_band_pullback_union_pw_multi_aff(
++							    tree->anonunion.band, upma);
++		if (!tree->anonunion.band)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_domain) {
+-		tree->domain =
+-			isl_union_set_preimage_union_pw_multi_aff(tree->domain,
++		tree->anonunion.domain =
++			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.domain,
+ 									upma);
+-		if (!tree->domain)
++		if (!tree->anonunion.domain)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_expansion) {
+ 		isl_die(isl_schedule_tree_get_ctx(tree), isl_error_unsupported,
+ 			"cannot pullback expansion node", goto error);
+ 	} else if (tree->type == isl_schedule_node_extension) {
+-		tree->extension =
++		tree->anonunion.extension =
+ 			isl_union_map_preimage_range_union_pw_multi_aff(
+-			    tree->extension, upma);
+-		if (!tree->extension)
++			    tree->anonunion.extension, upma);
++		if (!tree->anonunion.extension)
+ 			return isl_schedule_tree_free(tree);
+ 	} else if (tree->type == isl_schedule_node_filter) {
+-		tree->filter =
+-			isl_union_set_preimage_union_pw_multi_aff(tree->filter,
++		tree->anonunion.filter =
++			isl_union_set_preimage_union_pw_multi_aff(tree->anonunion.filter,
+ 									upma);
+-		if (!tree->filter)
++		if (!tree->anonunion.filter)
+ 			return isl_schedule_tree_free(tree);
+ 	}
+ 
+@@ -2600,8 +2600,8 @@
+ 	if (!tree)
+ 		goto error;
+ 
+-	tree->band = isl_schedule_band_gist(tree->band, context);
+-	if (!tree->band)
++	tree->anonunion.band = isl_schedule_band_gist(tree->anonunion.band, context);
++	if (!tree->anonunion.band)
+ 		return isl_schedule_tree_free(tree);
+ 	return tree;
+ error:
+@@ -2729,59 +2729,59 @@
+ 		p = isl_printer_print_str(p, "context");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_set(p, tree->context);
++		p = isl_printer_print_set(p, tree->anonunion.context);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_domain:
+ 		p = isl_printer_print_str(p, "domain");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_set(p, tree->domain);
++		p = isl_printer_print_union_set(p, tree->anonunion.domain);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_expansion:
+ 		p = isl_printer_print_str(p, "contraction");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_pw_multi_aff(p, tree->contraction);
++		p = isl_printer_print_union_pw_multi_aff(p, tree->anonunion.anonstruct.contraction);
+ 		p = isl_printer_print_str(p, "\"");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "expansion");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_map(p, tree->expansion);
++		p = isl_printer_print_union_map(p, tree->anonunion.anonstruct.expansion);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_extension:
+ 		p = isl_printer_print_str(p, "extension");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_map(p, tree->extension);
++		p = isl_printer_print_union_map(p, tree->anonunion.extension);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_filter:
+ 		p = isl_printer_print_str(p, "filter");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_union_set(p, tree->filter);
++		p = isl_printer_print_union_set(p, tree->anonunion.filter);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_guard:
+ 		p = isl_printer_print_str(p, "guard");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_set(p, tree->guard);
++		p = isl_printer_print_set(p, tree->anonunion.guard);
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_mark:
+ 		p = isl_printer_print_str(p, "mark");
+ 		p = isl_printer_yaml_next(p);
+ 		p = isl_printer_print_str(p, "\"");
+-		p = isl_printer_print_str(p, isl_id_get_name(tree->mark));
++		p = isl_printer_print_str(p, isl_id_get_name(tree->anonunion.mark));
+ 		p = isl_printer_print_str(p, "\"");
+ 		break;
+ 	case isl_schedule_node_band:
+-		p = print_tree_band(p, tree->band);
++		p = print_tree_band(p, tree->anonunion.band);
+ 		break;
+ 	}
+ 	p = isl_printer_yaml_next(p);
+diff -u -r -w isl-0.18/isl_schedule_tree.h isl-0.18-patched/isl_schedule_tree.h
+--- isl-0.18/isl_schedule_tree.h	2016-12-12 09:15:44.000000000 +0000
++++ isl-0.18-patched/isl_schedule_tree.h	2019-05-30 19:16:57.974657440 +0000
+@@ -63,12 +63,12 @@
+ 		struct {
+ 			isl_union_pw_multi_aff *contraction;
+ 			isl_union_map *expansion;
+-		};
++		} anonstruct;
+ 		isl_union_map *extension;
+ 		isl_union_set *filter;
+ 		isl_set *guard;
+ 		isl_id *mark;
+-	};
++	} anonunion;
+ 	isl_schedule_tree_list *children;
+ };
+ 
+diff -u -r -w isl-0.18/isl_test.c isl-0.18-patched/isl_test.c
+--- isl-0.18/isl_test.c	2016-12-15 11:27:30.000000000 +0000
++++ isl-0.18-patched/isl_test.c	2019-05-30 19:29:59.117169440 +0000
+@@ -493,18 +493,22 @@
+ 	return 0;
+ }
+ 
+-struct {
++struct vbo {
+ 	__isl_give isl_val *(*fn)(__isl_take isl_val *v1,
+ 				__isl_take isl_val *v2);
+-} val_bin_op[] = {
+-	['+'] = { &isl_val_add },
+-	['-'] = { &isl_val_sub },
+-	['*'] = { &isl_val_mul },
+-	['/'] = { &isl_val_div },
+-	['g'] = { &isl_val_gcd },
+-	['m'] = { &isl_val_min },
+-	['M'] = { &isl_val_max },
+-};
++} vbo;
++struct vbo val_bin_op[256];
++
++void setup_val_bin_ops()
++{
++  val_bin_op['+'].fn=&isl_val_add;
++  val_bin_op['-'].fn=&isl_val_sub;
++  val_bin_op['*'].fn=&isl_val_mul;
++  val_bin_op['/'].fn=&isl_val_div;
++  val_bin_op['g'].fn=&isl_val_gcd;
++  val_bin_op['m'].fn=&isl_val_min;
++  val_bin_op['M'].fn=&isl_val_max;
++}
+ 
+ struct {
+ 	const char *arg1;
+@@ -4344,14 +4348,18 @@
+ 	return 0;
+ }
+ 
+-struct {
++struct abo {
+ 	__isl_give isl_aff *(*fn)(__isl_take isl_aff *aff1,
+ 				__isl_take isl_aff *aff2);
+-} aff_bin_op[] = {
+-	['+'] = { &isl_aff_add },
+-	['-'] = { &isl_aff_sub },
+-	['*'] = { &isl_aff_mul },
+-	['/'] = { &isl_aff_div },
++} abo;
++struct abo aff_bin_op[256];
++
++void setup_aff_bin_ops()
++{
++  aff_bin_op['+'].fn=&isl_aff_add;
++  aff_bin_op['-'].fn=&isl_aff_sub;
++  aff_bin_op['*'].fn=&isl_aff_mul;
++  aff_bin_op['/'].fn=&isl_aff_div;
+ };
+ 
+ struct {
+@@ -6943,6 +6951,9 @@
+ 	struct isl_ctx *ctx;
+ 	struct isl_options *options;
+ 
++	setup_val_bin_ops();
++	setup_aff_bin_ops();
++
+ 	options = isl_options_new_with_defaults();
+ 	assert(options);
+ 	argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
diff -Naur gcc-9.5.0/libatomic/config/posix/lock.c gcc-9.5.0-irix/libatomic/config/posix/lock.c
--- gcc-9.5.0/libatomic/config/posix/lock.c	2022-05-27 03:21:12.803388000 +0000
+++ gcc-9.5.0-irix/libatomic/config/posix/lock.c	2025-02-14 07:40:08.500590400 +0000
@@ -54,7 +54,8 @@
 };
 
 #define NLOCKS		(PAGE_SIZE / WATCH_SIZE)
-static struct lock locks[NLOCKS] = {
+static struct lock locks[NLOCKS] = 
+{
   [0 ... NLOCKS-1].mutex = PTHREAD_MUTEX_INITIALIZER
 };
 
diff -Naur gcc-9.5.0/libgcc/config/mips/irix-crti.S gcc-9.5.0-irix/libgcc/config/mips/irix-crti.S
--- gcc-9.5.0/libgcc/config/mips/irix-crti.S	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/irix-crti.S	2025-02-13 08:55:07.787104800 +0000
@@ -0,0 +1,71 @@
+/* Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+	.abicalls
+	.set	noreorder
+	.set	nomacro
+
+/* The GNU and SGI linkers differ in their implementation of -init and -fini.
+   With the GNU linker, there can only be a single -init option, and the
+   linker simply sets DT_INIT to that value.  gcc's initialization and
+   finalization code can go directly in .init, with the prologue and
+   epilogue of the main initialization routine being provided by external
+   object files (*crti.o and *crtn.o in this case).
+
+   The SGI linker instead accepts several -init options.  It will set DT_INIT
+   to a linker-created function (placed in .init) that calls each of the -init
+   functions in turn.  If there is any user code in .init, this linker-created
+   function will be placed after it.  Note that such user code is not treated
+   specially; it will only be called if the -init options arrange for it to
+   be called.
+
+   In theory, the SGI model should allow the crti, crtn and intermediate code
+   to go in .init, just like it can with the GNU linker.  However, doing this
+   seems to confuse the linker and triggers an internal error:
+
+      ld32: FATAL   2  : Internal: at ../../ld/mips_code.c mips_code_fixup()
+	 text section overflow!
+
+   (seen with MIPSpro 7.30).  We therefore put everything in a special
+   .gcc_init section instead.  */
+
+	.section .gcc_init,"ax",@progbits
+	.globl	__gcc_init
+__gcc_init:
+	daddiu	$sp,$sp,-16
+	sd	$31,0($sp)
+	sd	$28,8($sp)
+
+	.section .gcc_fini,"ax",@progbits
+	.globl	__gcc_fini
+__gcc_fini:
+	daddiu	$sp,$sp,-16
+	sd	$31,0($sp)
+	sd	$28,8($sp)
+
+/* This object will typically be included in the final link for both
+   shared libraries and executable, and we need to hide the symbols to
+   prevent possible symbol preemption warnings from the SGI linker.  */
+.hidden __gcc_init
+.hidden __gcc_fini
+
diff -Naur gcc-9.5.0/libgcc/config/mips/irix-crtn.S gcc-9.5.0-irix/libgcc/config/mips/irix-crtn.S
--- gcc-9.5.0/libgcc/config/mips/irix-crtn.S	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/irix-crtn.S	2025-02-13 08:55:07.789029600 +0000
@@ -0,0 +1,38 @@
+/* Copyright (C) 2004, 2011 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+	.abicalls
+	.set	noreorder
+	.set	nomacro
+
+	.section .gcc_init,"ax",@progbits
+	ld	$31,0($sp)
+	ld	$28,8($sp)
+	jr	$31
+	daddiu	$sp,$sp,16
+
+	.section .gcc_fini,"ax",@progbits
+	ld	$31,0($sp)
+	ld	$28,8($sp)
+	jr	$31
+	daddiu	$sp,$sp,16
diff -Naur gcc-9.5.0/libgcc/config/mips/irix6-unwind.h gcc-9.5.0-irix/libgcc/config/mips/irix6-unwind.h
--- gcc-9.5.0/libgcc/config/mips/irix6-unwind.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/irix6-unwind.h	2025-02-13 08:55:07.791402400 +0000
@@ -0,0 +1,180 @@
+/* DWARF2 EH unwinding support for MIPS IRIX 6.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* Do code reading to identify a signal frame, and set the frame
+   state data appropriately.  See unwind-dw2.c for the structs.  */
+
+/* This code was developed-for and only tested-in limited ABI
+   configurations.  Characterize that.  */
+
+#if defined (_ABIN32) || defined (_ABI64)
+#define SUPPORTED_ABI 1
+#else
+#define SUPPORTED_ABI 0
+#endif
+
+#include <signal.h>
+
+#define MD_FALLBACK_FRAME_STATE_FOR mips_fallback_frame_state
+
+/* Look at the code around RA to see if it matches a sighandler caller with a
+   sigcontext_t * argument (SA_SIGINFO cleared).  Return that pointer argument
+   if it does match, or 0 otherwise.  */
+
+static sigcontext_t *
+sigcontext_for (unsigned int *ra, void *cfa)
+{
+  /* IRIX 6.5, mono-threaded application.  We're lucky enough to be able
+     to expect a short very sighandler specific sequence around.
+
+     <_sigtramp+124>:	li	v0,1088 (SYS_sigreturn)
+     <_sigtramp+128>:	syscall  */
+
+  if (   ra[6] == 0x24020440
+      && ra[7] == 0x0000000c)
+    return (sigcontext_t *)(cfa + 0x30);
+
+  /* IRIX 6.5 variants, multi-threaded application, pthreads.  Nothing really
+     sighandler specific handy, so match a fairly long constant sequence.  */
+
+#if _MIPS_SIM == _ABIN32
+  /* 
+     <sig_fixup_mask+40>:	sd	s0,0(sp)
+     <sig_fixup_mask+44>:	sll	ra,a0,0x2
+     <sig_fixup_mask+48>:	addiu	t9,t9,-28584/-28456/-28448
+     <sig_fixup_mask+52>:	lw	s0,3804(at)
+     <sig_fixup_mask+56>:	addu	t9,t9,ra
+     <sig_fixup_mask+60>:	lw	t9,0(t9)
+     <sig_fixup_mask+64>:	ld	at,3696(at)
+     <sig_fixup_mask+68>:	ld	s2,88(s0)
+     <sig_fixup_mask+72>:	jalr	t9
+     <sig_fixup_mask+76>:	sd	at,88(s0)  */
+   if (   ra[-10] == 0xffb00000
+      && ra[ -9] == 0x0004f880
+      && (ra[-8] == 0x27399058
+	  || ra[-8] == 0x273990d8
+	  || ra[-8] == 0x273990e0)
+      && ra[ -7] == 0x8c300edc
+      && ra[ -6] == 0x033fc821
+      && ra[ -5] == 0x8f390000
+      && ra[ -4] == 0xdc210e70
+      && ra[ -3] == 0xde120058
+      && ra[ -2] == 0x0320f809
+      && ra[ -1] == 0xfe010058)
+
+#elif _MIPS_SIM == _ABI64
+  /* 
+     <sig_fixup_mask+44>:	sd	s0,0(sp)
+     <sig_fixup_mask+48>:	daddu	t9,t9,ra
+     <sig_fixup_mask+52>:	dsll	ra,a0,0x3
+     <sig_fixup_mask+56>:	ld	s0,3880(at)
+     <sig_fixup_mask+60>:	daddu	t9,t9,ra
+     <sig_fixup_mask+64>:	ld	t9,0(t9)
+     <sig_fixup_mask+68>:	ld	at,3696(at)
+     <sig_fixup_mask+72>:	ld	s2,152(s0)
+     <sig_fixup_mask+76>:	jalr	t9
+     <sig_fixup_mask+80>:	sd	at,152(s0)  */
+  if (   ra[-10] == 0xffb00000
+      && ra[ -9] == 0x033fc82d
+      && ra[ -8] == 0x0004f8f8
+      && ra[ -7] == 0xdc300f28
+      && ra[ -6] == 0x033fc82d
+      && ra[ -5] == 0xdf390000
+      && ra[ -4] == 0xdc210e70
+      && ra[ -3] == 0xde120098
+      && ra[ -2] == 0x0320f809
+      && ra[ -1] == 0xfe010098)
+#endif
+    return (sigcontext_t *)(cfa + 0x60);
+
+  return 0;
+}
+
+#define SIGCTX_GREG_ADDR(REGNO,SIGCTX) \
+  ((void *) &(SIGCTX)->sc_regs[REGNO])
+
+#define SIGCTX_FPREG_ADDR(REGNO,SIGCTX) \
+  ((void *) &(SIGCTX)->sc_fpregs[REGNO])
+
+static _Unwind_Reason_Code
+mips_fallback_frame_state (struct _Unwind_Context *context,
+			   _Unwind_FrameState *fs)
+{
+  /* Return address and CFA of the frame we're attempting to unwind through,
+     possibly a signal handler.  */
+  void *ctx_ra  = (void *)context->ra;
+  void *ctx_cfa = (void *)context->cfa;
+
+  /* CFA of the intermediate abstract kernel frame between the interrupted
+     code and the signal handler, if we're indeed unwinding through a signal
+     handler.  */
+  void *k_cfa;
+
+  /* Pointer to the sigcontext_t structure pushed by the kernel when we're
+     unwinding through a signal handler setup with SA_SIGINFO cleared.  */
+  sigcontext_t *sigctx;
+  int i;
+
+  if (! SUPPORTED_ABI)
+    return _URC_END_OF_STACK;
+    
+  sigctx = sigcontext_for (ctx_ra, ctx_cfa);
+
+  if (sigctx == 0)
+    return _URC_END_OF_STACK;
+
+  /* The abstract kernel frame's CFA is extactly the stack pointer
+     value at the interruption point.  */
+  k_cfa = *(void **)SIGCTX_GREG_ADDR (CTX_SP, sigctx);
+
+  /* State the rules to compute the CFA we have the value of: use the
+     previous CFA and offset by the difference between the two.  See
+     uw_update_context_1 for the supporting details.  */
+  fs->regs.cfa_how = CFA_REG_OFFSET;
+  fs->regs.cfa_reg = __builtin_dwarf_sp_column ();
+  fs->regs.cfa_offset = k_cfa - ctx_cfa;
+
+  /* Fill the internal frame_state structure with information stating where
+     each register of interest can be found from the CFA.  */
+  for (i = 0; i <= 31; i ++)
+    {
+      fs->regs.reg[i].how = REG_SAVED_OFFSET;
+      fs->regs.reg[i].loc.offset = SIGCTX_GREG_ADDR (i, sigctx) - k_cfa;
+    }
+
+  for (i = 0; i <= 31; i ++)
+    {
+      fs->regs.reg[32+i].how = REG_SAVED_OFFSET;
+      fs->regs.reg[32+i].loc.offset = SIGCTX_FPREG_ADDR (i, sigctx) - k_cfa;
+    }
+
+  /* State the rules to find the kernel's code "return address", which is the
+     address of the active instruction when the signal was caught.  */
+  fs->retaddr_column = DWARF_FRAME_RETURN_COLUMN;
+  fs->regs.reg[fs->retaddr_column].how = REG_SAVED_OFFSET;
+  fs->regs.reg[fs->retaddr_column].loc.offset = (void *)&sigctx->sc_pc - k_cfa;
+  fs->signal_frame = 1;
+
+  return _URC_NO_REASON;
+}
diff -Naur gcc-9.5.0/libgcc/config/mips/sfp-machine.h gcc-9.5.0-irix/libgcc/config/mips/sfp-machine.h
--- gcc-9.5.0/libgcc/config/mips/sfp-machine.h	2022-05-27 03:21:12.899389000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/sfp-machine.h	2025-02-13 08:55:07.799128800 +0000
@@ -22,6 +22,8 @@
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
+#if !defined(__sgi)
+
 #ifdef __mips64
 #define _FP_W_TYPE_SIZE		64
 #define _FP_W_TYPE		unsigned long long
@@ -190,3 +192,5 @@
 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
 # define _strong_alias(name, aliasname) \
   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+
+#endif /* !defined(__sgi) */
diff -Naur gcc-9.5.0/libgcc/config/mips/t-irix6 gcc-9.5.0-irix/libgcc/config/mips/t-irix6
--- gcc-9.5.0/libgcc/config/mips/t-irix6	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/t-irix6	2025-02-13 08:55:07.800968000 +0000
@@ -0,0 +1,24 @@
+# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2006, 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+irix-crti.o: $(srcdir)/config/mips/irix-crti.S
+	$(crt_compile) -c $<
+
+irix-crtn.o: $(srcdir)/config/mips/irix-crtn.S
+	$(crt_compile) -c $<
diff -Naur gcc-9.5.0/libgcc/config/mips/t-mips-irixfp gcc-9.5.0-irix/libgcc/config/mips/t-mips-irixfp
--- gcc-9.5.0/libgcc/config/mips/t-mips-irixfp	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/t-mips-irixfp	2025-02-13 08:55:07.802727200 +0000
@@ -0,0 +1,13 @@
+LIB2_SIDITI_CONV_FUNCS = yes
+
+FPBIT = true
+FPBIT_CFLAGS = -DQUIET_NAN_NEGATED
+DPBIT = true
+FPBIT_CFLAGS = -DQUIET_NAN_NEGATED
+
+ifeq ($(long_double_type_size),128)
+TPBIT = true
+TPBIT_CFLAGS = -DQUIET_NAN_NEGATED
+endif
+
+LIB2ADD_ST += $(srcdir)/config/mips/lib2funcs.c
diff -Naur gcc-9.5.0/libgcc/config/mips/t-slibgcc-irix gcc-9.5.0-irix/libgcc/config/mips/t-slibgcc-irix
--- gcc-9.5.0/libgcc/config/mips/t-slibgcc-irix	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libgcc/config/mips/t-slibgcc-irix	2025-02-13 08:55:07.810678400 +0000
@@ -0,0 +1,9 @@
+# Build a shared libgcc library with the SGI linker.
+
+SHLIB_LDFLAGS = -Wl,-soname,$(SHLIB_SONAME) 
+#\
+	#-Wl,-exports_file,$(SHLIB_MAP)
+
+SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
+SHLIB_MAPFILES = libgcc-std.ver
+SHLIB_LC =
diff -Naur gcc-9.5.0/libgcc/config.host gcc-9.5.0-irix/libgcc/config.host
--- gcc-9.5.0/libgcc/config.host	2022-05-27 03:21:12.855388000 +0000
+++ gcc-9.5.0-irix/libgcc/config.host	2025-02-13 08:55:07.829696000 +0000
@@ -146,6 +146,15 @@
 microblaze*-*-*)
 	cpu_type=microblaze
 	;;
+mips-sgi-irix6.5*)
+	# All MIPS targets provide a full set of FP routines.
+	cpu_type=mips
+	tmake_file="mips/t-mips-irixfp"
+	# This doesn't work yet
+	if test "${host_address}" = 64; then
+		tmake_file="${tmake_file} mips/t-mips-irixfp64"
+	fi
+	;;
 mips*-*-*)
 	# All MIPS targets provide a full set of FP routines.
 	cpu_type=mips
@@ -914,6 +923,11 @@
 	tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
 	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
 	;;
+mips-sgi-irix6.5*)
+	tmake_file="$tmake_file mips/t-irix6 t-crtfm mips/t-tpbit t-slibgcc mips/t-slibgcc-irix"
+	extra_parts="crtbegin.o crtend.o crtfastmath.o irix-crti.o irix-crtn.o"
+	md_unwind_header=mips/irix6-unwind.h
+	;;
 microblaze*-*-rtems*)
 	tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
 	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
diff -Naur gcc-9.5.0/libgcc/libgcov-driver-system.c gcc-9.5.0-irix/libgcc/libgcov-driver-system.c
--- gcc-9.5.0/libgcc/libgcov-driver-system.c	2022-05-27 03:21:12.915389000 +0000
+++ gcc-9.5.0-irix/libgcc/libgcov-driver-system.c	2025-02-13 08:55:07.832601600 +0000
@@ -158,7 +158,7 @@
 	  switch (*p)
 	    {
 	    case 'p':
-	      sprintf (buffer, "%d", getpid ());
+	      sprintf (buffer, "%ld", getpid ());
 	      replacement = buffer;
 	      p++;
 	      break;
diff -Naur gcc-9.5.0/libgomp/affinity-fmt.c gcc-9.5.0-irix/libgomp/affinity-fmt.c
--- gcc-9.5.0/libgomp/affinity-fmt.c	2022-05-27 03:21:13.143390000 +0000
+++ gcc-9.5.0-irix/libgomp/affinity-fmt.c	2025-02-13 11:39:06.266232000 +0000
@@ -383,15 +383,10 @@
 
 	    if (sizeof (gomp_integral (handle)) == sizeof (unsigned long))
 	      sprintf (buf, "0x%lx", (unsigned long) gomp_integral (handle));
-#if defined (HAVE_INTTYPES_H) && defined (PRIx64)
-	    else if (sizeof (gomp_integral (handle)) == sizeof (uint64_t))
-	      sprintf (buf, "0x%" PRIx64, (uint64_t) gomp_integral (handle));
-#else
 	    else if (sizeof (gomp_integral (handle))
 		     == sizeof (unsigned long long))
 	      sprintf (buf, "0x%llx",
 		       (unsigned long long) gomp_integral (handle));
-#endif
 	    else
 	      sprintf (buf, "0x%x", (unsigned int) gomp_integral (handle));
 	    gomp_display_num (buffer, size, &ret, zero, right, sz, buf);
diff -Naur gcc-9.5.0/libgomp/config/posix/proc.c gcc-9.5.0-irix/libgomp/config/posix/proc.c
--- gcc-9.5.0/libgomp/config/posix/proc.c	2022-05-27 03:21:13.147390000 +0000
+++ gcc-9.5.0-irix/libgomp/config/posix/proc.c	2025-02-13 08:58:14.622660000 +0000
@@ -38,6 +38,9 @@
 # endif
 #endif
 
+#ifdef __sgi
+#define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
+#endif
 
 /* At startup, determine the default number of threads.  It would seem
    this should be related to the number of cpus online.  */
diff -Naur gcc-9.5.0/libgomp/configure.tgt gcc-9.5.0-irix/libgomp/configure.tgt
--- gcc-9.5.0/libgomp/configure.tgt	2022-05-27 03:21:13.147390000 +0000
+++ gcc-9.5.0-irix/libgomp/configure.tgt	2025-02-13 08:55:07.839636000 +0000
@@ -145,6 +145,11 @@
 	XLDFLAGS="${XLDFLAGS} -lpthread"
 	;;
 
+  mips-sgi-irix6.5*)
+       # Need to link with -lpthread so libgomp.so is self-contained.
+       XLDFLAGS="${XLDFLAGS} -lpthread"
+       ;;
+
   *-*-aix*)
 	config_path="posix"
 	# Need to link with -lpthread so libgomp.so is self-contained.
diff -Naur gcc-9.5.0/libgomp/env.c gcc-9.5.0-irix/libgomp/env.c
--- gcc-9.5.0/libgomp/env.c	2022-05-27 03:21:13.147390000 +0000
+++ gcc-9.5.0-irix/libgomp/env.c	2025-02-13 11:40:44.889941600 +0000
@@ -1281,13 +1281,8 @@
     {
       fputs ("  GOMP_CPU_AFFINITY = ''\n", stderr);
       fprintf (stderr, "  GOMP_STACKSIZE = '%lu'\n", stacksize);
-#ifdef HAVE_INTTYPES_H
-      fprintf (stderr, "  GOMP_SPINCOUNT = '%"PRIu64"'\n",
-	       (uint64_t) gomp_spin_count_var);
-#else
       fprintf (stderr, "  GOMP_SPINCOUNT = '%lu'\n",
 	       (unsigned long) gomp_spin_count_var);
-#endif
     }
 
   fputs ("OPENMP DISPLAY ENVIRONMENT END\n", stderr);
diff -Naur gcc-9.5.0/libgomp/oacc-parallel.c gcc-9.5.0-irix/libgomp/oacc-parallel.c
--- gcc-9.5.0/libgomp/oacc-parallel.c	2022-05-27 03:21:13.151390000 +0000
+++ gcc-9.5.0-irix/libgomp/oacc-parallel.c	2025-02-13 11:41:29.937189600 +0000
@@ -140,13 +140,8 @@
   unsigned dims[GOMP_DIM_MAX];
   unsigned tag;
 
-#ifdef HAVE_INTTYPES_H
-  gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p, kinds=%p\n",
-	      __FUNCTION__, (uint64_t) mapnum, hostaddrs, sizes, kinds);
-#else
   gomp_debug (0, "%s: mapnum=%lu, hostaddrs=%p, sizes=%p, kinds=%p\n",
 	      __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds);
-#endif
   goacc_lazy_initialize ();
 
   thr = goacc_thread ();
@@ -297,13 +292,8 @@
 
   struct target_mem_desc *tgt;
 
-#ifdef HAVE_INTTYPES_H
-  gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p, kinds=%p\n",
-	      __FUNCTION__, (uint64_t) mapnum, hostaddrs, sizes, kinds);
-#else
   gomp_debug (0, "%s: mapnum=%lu, hostaddrs=%p, sizes=%p, kinds=%p\n",
 	      __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds);
-#endif
 
   goacc_lazy_initialize ();
 
diff -Naur gcc-9.5.0/libgomp/target.c gcc-9.5.0-irix/libgomp/target.c
--- gcc-9.5.0/libgomp/target.c	2022-05-27 03:21:13.155390000 +0000
+++ gcc-9.5.0-irix/libgomp/target.c	2025-02-13 11:38:48.329337600 +0000
@@ -932,16 +932,9 @@
 			 was missing.  */
 		      size_t size = k->host_end - k->host_start;
 		      gomp_mutex_unlock (&devicep->lock);
-#ifdef HAVE_INTTYPES_H
-		      gomp_fatal ("present clause: !acc_is_present (%p, "
-				  "%"PRIu64" (0x%"PRIx64"))",
-				  (void *) k->host_start,
-				  (uint64_t) size, (uint64_t) size);
-#else
 		      gomp_fatal ("present clause: !acc_is_present (%p, "
 				  "%lu (0x%lx))", (void *) k->host_start,
 				  (unsigned long) size, (unsigned long) size);
-#endif
 		    }
 		    break;
 		  case GOMP_MAP_FORCE_DEVICEPTR:
diff -Naur gcc-9.5.0/libstdc++-v3/acinclude.m4 gcc-9.5.0-irix/libstdc++-v3/acinclude.m4
--- gcc-9.5.0/libstdc++-v3/acinclude.m4	2022-05-27 03:21:13.311391000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/acinclude.m4	2025-02-13 08:55:08.101274400 +0000
@@ -276,7 +276,7 @@
     AC_MSG_CHECKING([for ld that supports -Wl,-z,relro])
     cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
     if test -n "$cxx_z_relo"; then
-      OPT_LDFLAGS="-Wl,-z,relro"
+      OPT_LDFLAGS="-Wl,-z,relro $OPT_LDFLAGS"
       ac_ld_relro=yes
     fi
     AC_MSG_RESULT($ac_ld_relro)
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/atomic_word.h gcc-9.5.0-irix/libstdc++-v3/config/os/irix/atomic_word.h
--- gcc-9.5.0/libstdc++-v3/config/os/irix/atomic_word.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/atomic_word.h	2025-02-13 08:55:07.841889600 +0000
@@ -0,0 +1,35 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_word.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{ext/atomicity.h}
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H	1
+
+typedef long _Atomic_word;
+
+#endif 
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/atomicity.h gcc-9.5.0-irix/libstdc++-v3/config/os/irix/atomicity.h
--- gcc-9.5.0/libstdc++-v3/config/os/irix/atomicity.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/atomicity.h	2025-02-13 08:55:07.843772800 +0000
@@ -0,0 +1,41 @@
+// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
+
+// Copyright (C) 2001, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+#include <mutex.h>
+#include <ext/atomicity.h>
+
+namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  _Atomic_word
+  __exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
+  { return (_Atomic_word) test_then_add((unsigned long*) const_cast<_Atomic_word*>(__mem), __val); }
+
+  void
+  __atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
+  { __exchange_and_add(__mem, __val); }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h
--- gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h	2025-02-13 08:55:07.845839200 +0000
@@ -0,0 +1,65 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2003, 2009, 2010
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/ctype_base.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{locale}
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h on irix 6.5
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  /// @brief  Base class for ctype.
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef int* 		__to_type;
+
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	mask;
+    static const mask upper    	= _ISupper;
+    static const mask lower 	= _ISlower;
+    static const mask alpha 	= _ISalpha;
+    static const mask digit 	= _ISdigit;
+    static const mask xdigit 	= _ISxdigit;
+    static const mask space 	= _ISspace;
+    static const mask print 	= _ISprint;
+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalpha | _ISdigit;
+    static const mask blank	= _ISblank;
+  };
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc
--- gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc	2025-02-13 08:55:07.847931200 +0000
@@ -0,0 +1,101 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_configure_char.cc */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+#include <locale>
+#include <cstdlib>
+#include <cstring>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+// Information as gleaned from /usr/include/ctype.h
+
+  const ctype_base::mask*
+  ctype<char>::classic_table() throw()
+  { return 0; }
+
+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+		     size_t __refs)
+  : facet(__refs), _M_del(__table != 0 && __del),
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(!__table ?
+	   (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
+  {
+    memset(_M_widen, 0, sizeof(_M_widen));
+    _M_widen_ok = 0;
+    memset(_M_narrow, 0, sizeof(_M_narrow));
+    _M_narrow_ok = 0;
+  }
+
+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+  : facet(__refs), _M_del(__table != 0 && __del),
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(!__table ?
+	   (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
+  {
+    memset(_M_widen, 0, sizeof(_M_widen));
+    _M_widen_ok = 0;
+    memset(_M_narrow, 0, sizeof(_M_narrow));
+    _M_narrow_ok = 0;
+  }
+
+  char
+  ctype<char>::do_toupper(char __c) const
+  { return _toupper(__c); }
+
+  const char*
+  ctype<char>::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype<char>::do_tolower(char __c) const
+  { return _tolower(__c); }
+
+  const char*
+  ctype<char>::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h
--- gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h	2025-02-13 08:55:07.849861600 +0000
@@ -0,0 +1,74 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/ctype_inline.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{locale}
+ */
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  bool
+  ctype<char>::
+  is(mask __m, char __c) const
+  { return (_M_table)[static_cast<unsigned char>(__c)] & __m; }
+
+  const char*
+  ctype<char>::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table)[static_cast<unsigned char>(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype<char>::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && ! this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype<char>::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
diff -Naur gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/os_defines.h gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/os_defines.h
--- gcc-9.5.0/libstdc++-v3/config/os/irix/irix6.5/os_defines.h	1969-12-31 19:00:00.000000000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/config/os/irix/irix6.5/os_defines.h	2025-02-13 08:55:07.855935200 +0000
@@ -0,0 +1,60 @@
+// Specific definitions for IRIX  -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2009, 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/os_defines.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{iosfwd}
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+#define _GLIBCXX_USE_C99 1
+#define _GLIBCXX_USE_C99_STDIO 1
+#define _GLIBCXX_USE_C99_STDLIB 1
+#define _GLIBCXX_USE_C99_WCHAR 1
+#define _GLIBCXX_USE_WCHAR_T 1
+
+// We need large file support.  There are two ways to turn it on: by
+// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However, it
+// does not actually work to define only the former, as then
+// <sys/stat.h> is invalid: `st_blocks' is defined to be a macro, but
+// then used as a field name.  So, we have to turn on _SGI_SOURCE.
+// That only works if _POSIX_SOURCE is turned off, so we have to
+// explicitly turn it off.  (Some of the libio C files explicitly try
+// to turn it on.)  _SGI_SOURCE is actually turned on implicitly via
+// the command-line.
+#undef _POSIX_SOURCE
+
+// GCC does not use thunks on IRIX. 
+#define _G_USING_THUNKS 0
+
+// FINOREAD takes an "off_t *" as argument.
+#define _GLIBCXX_FIONREAD_TAKES_OFF_T
+
+#endif
+
diff -Naur gcc-9.5.0/libstdc++-v3/configure gcc-9.5.0-irix/libstdc++-v3/configure
--- gcc-9.5.0/libstdc++-v3/configure	2022-05-27 03:21:13.335391000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/configure	2025-02-13 08:55:08.084661600 +0000
@@ -21981,7 +21981,7 @@
 $as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
     cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
     if test -n "$cxx_z_relo"; then
-      OPT_LDFLAGS="-Wl,-z,relro"
+      OPT_LDFLAGS="-Wl,-z,relro $OPT_LDFLAGS"
       ac_ld_relro=yes
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ld_relro" >&5
diff -Naur gcc-9.5.0/libstdc++-v3/configure.host gcc-9.5.0-irix/libstdc++-v3/configure.host
--- gcc-9.5.0/libstdc++-v3/configure.host	2022-05-27 03:21:13.335391000 +0000
+++ gcc-9.5.0-irix/libstdc++-v3/configure.host	2025-02-13 08:55:07.858649600 +0000
@@ -276,6 +276,15 @@
   hpux*)
     os_include_dir="os/hpux"
     ;;
+  irix6.5*)
+    os_include_dir="os/irix/irix6.5"
+    atomicity_dir=os/irix
+    atomic_word_dir=os/irix
+    # libstdc++.so relies on emutls on IRIX, which only works with the
+    # real functions implemented in libpthread.so, not with the stubs in
+    # libc, so always pass -lpthread.
+    OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,--no-as-needed -lpthread -Wl,--as-needed"
+    ;;
   mingw32*)
     case "$host" in
       *-w64-*)
