public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gcc] snapshot: Merge remote-tracking branch 'origin/rawhide' into snapshot
Date: Thu, 04 Jun 2026 14:12:12 GMT	[thread overview]
Message-ID: <178058233246.1.9582647095717473380.rpms-gcc-3f7104c25882@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gcc
            Branch : snapshot
            Commit : 3f7104c2588294177972db1bb96f324b09ccb1b6
            Author : Siddhesh Poyarekar <siddhesh@redhat.com>
            Date   : 2026-06-04T10:07:52-04:00
            Stats  : +2868/-2595 in 34 file(s)
            URL    : https://src.fedoraproject.org/rpms/gcc/c/3f7104c2588294177972db1bb96f324b09ccb1b6?branch=snapshot

            Log:
            Merge remote-tracking branch 'origin/rawhide' into snapshot

This only brings in spec file changes and cleans up dropped patches, and
not the gcc16 branch updates.

---
diff --git a/gcc.spec b/gcc.spec
index fc2c509..cc368a2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -17,6 +17,7 @@
 %global nvptx_tools_gitrev 212da2e781ed0f9423824e85eb04819958513f7a
 %global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99
 %global _unpackaged_files_terminate_build 0
+%global _find_debuginfo_opts --keep-section .a68_exports
 %if 0%{?fedora:1}
 %global _performance_build 1
 # Hardening slows the compiler way too much.
@@ -1901,6 +1902,7 @@ ln -sf ../../../libgcobol.so.2.* libgcobol.so
 %endif
 %if %{build_algol68}
 ln -sf ../../../libga68.so.2.* libga68.so
+objcopy --dump-section .a68_exports=ga68.m68 ../../../libga68.so.2.*
 %endif
 %if %{build_libitm}
 ln -sf ../../../libitm.so.1.* libitm.so
@@ -1948,6 +1950,7 @@ ln -sf ../../../../%{_lib}/libgcobol.so.2.* libgcobol.so
 %endif
 %if %{build_algol68}
 ln -sf ../../../../%{_lib}/libga68.so.2.* libga68.so
+objcopy --dump-section .a68_exports=ga68.m68 ../../../../%{_lib}/libga68.so.2.*
 %endif
 %if %{build_libitm}
 ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so
@@ -2123,6 +2126,7 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgcobol.so.2.* | sed 's,
 rm -f libga68.so
 echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so
 echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libga68.so
+objcopy --dump-section .a68_exports=64/ga68.m68 ../../../../lib/libga68.so.2.*
 %endif
 %if %{build_libitm}
 rm -f libitm.so
@@ -2266,6 +2270,7 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgcobol.so.2.* | sed '
 rm -f libga68.so
 echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so
 echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libga68.so
+objcopy --dump-section .a68_exports=32/ga68.m68 ../../../../lib64/libga68.so.2.*
 %endif
 %if %{build_libitm}
 rm -f libitm.so
@@ -3526,15 +3531,18 @@ end
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.a
 %endif
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/ga68.m68
 %ifarch sparcv9 ppc
 %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.a
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/ga68.m68
 %endif
 %ifarch %{multilib_64_archs}
 %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.a
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/ga68.m68
 %endif
 %{_infodir}/ga68*
 %doc rpm.doc/algol68/*

diff --git a/gcc17-libstdc++-docs.patch b/gcc17-libstdc++-docs.patch
index 7d2d357..f971627 100644
--- a/gcc17-libstdc++-docs.patch
+++ b/gcc17-libstdc++-docs.patch
@@ -4,7 +4,7 @@
        <a class="link" href="https://www.fsf.org" target="_top">FSF
        </a>
      </p><p>
-+      Release 16.0.1
++      Release 16.1.1
 +    </p><p>
        Permission is granted to copy, distribute and/or modify this
        document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
  </p><p>
 -  The API documentation, rendered into HTML, can be viewed online
 +  The API documentation, rendered into HTML, can be viewed locally
-+  <a class="link" href="api/index.html" target="_top">for the 16.0.1 release</a>,
++  <a class="link" href="api/index.html" target="_top">for the 16.1.1 release</a>,
 +  online
    <a class="link" href="https://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
    and

diff --git a/gcc17-module-exports.patch b/gcc17-module-exports.patch
deleted file mode 100644
index 058c429..0000000
--- a/gcc17-module-exports.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-2026-03-19  Jakub Jelinek  <jakub@redhat.com>
-
-	* g++.dg/plugin/plugin.exp: Set PLUGIN_DEFAULT_REPO.  Add
-	set*module*exports* to plugin_test_list.  Remove *.gcm files
-	at the start and end.
-	* g++.dg/plugin/std_module_exports_plugin.cc: New file.
-	* g++.dg/plugin/std-module-exports-c++20.C: New test.
-	* g++.dg/plugin/std-module-exports-c++23.C: New test.
-	* g++.dg/plugin/std-module-exports-c++26.C: New test.
-
---- gcc/testsuite/g++.dg/plugin/plugin.exp.jj	2026-03-19 16:20:02.379257258 +0100
-+++ gcc/testsuite/g++.dg/plugin/plugin.exp	2026-03-19 16:20:10.993368783 +0100
-@@ -51,6 +51,8 @@ if ![gcc_parallel_test_run_p plugin] {
- }
- gcc_parallel_test_enable 0
- 
-+set PLUGIN_DEFAULT_REPO "gcm.cache"
-+
- # Specify the plugin source file and the associated test files in a list.
- # plugin_test_list={ {plugin1 test1 test2 ...} {plugin2 test1 ...} ... }
- set plugin_test_list [list \
-@@ -87,9 +89,17 @@ set plugin_test_list [list \
-     	  uglification-c++20.C \
-     	  uglification-c++23.C \
-     	  uglification-c++26.C } \
-+    { std_module_exports_plugin.cc \
-+	  std-module-exports-c++20.C \
-+	  std-module-exports-c++23.C \
-+	  std-module-exports-c++26.C } \
-     { comment_plugin.cc comments-1.C } \
- ]
- 
-+foreach file [find $PLUGIN_DEFAULT_REPO *.gcm] {
-+    file_on_host delete $file
-+}
-+
- foreach plugin_test $plugin_test_list {
-     # Replace each source file with its full-path name
-     for {set i 0} {$i < [llength $plugin_test]} {incr i} {
-@@ -105,4 +115,8 @@ foreach plugin_test $plugin_test_list {
-     plugin-test-execute $plugin_src $plugin_input_tests
- }
- 
-+foreach file [find $PLUGIN_DEFAULT_REPO *.gcm] {
-+    file_on_host delete $file
-+}
-+
- gcc_parallel_test_enable 1
---- gcc/testsuite/g++.dg/plugin/std_module_exports_plugin.cc.jj	2026-03-19 16:19:23.694919816 +0100
-+++ gcc/testsuite/g++.dg/plugin/std_module_exports_plugin.cc	2026-03-19 16:45:12.756543979 +0100
-@@ -0,0 +1,219 @@
-+#include "gcc-plugin.h"
-+#include <stdlib.h>
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tree.h"
-+#include "intl.h"
-+#include "cp/cp-tree.h"
-+#include "cp/name-lookup.h"
-+#include "diagnostic.h"
-+#include "stringpool.h"
-+#include "attribs.h"
-+
-+int plugin_is_GPL_compatible;
-+
-+void plugin_dump_ns (tree, char *, hash_set<tree> **);
-+
-+enum class whitelist_std {
-+  cxx20 = 1 << 0,
-+  cxx23 = 1 << 1,
-+  cxx26 = 1 << 2,
-+  all = (1 << 3) - 1
-+};
-+struct {
-+  const char *name;
-+  whitelist_std enabled_in;
-+} whitelist[] = {
-+  // [zombie.names] in C++20-C++26, supported as an extension.
-+  { "std::result_of", whitelist_std::all },
-+  { "std::result_of_t", whitelist_std::all },
-+  // [zombie.names] in C++20-C++26, supported in C++20 as an extension.
-+  { "std::unexpected_handler", whitelist_std::cxx20 },
-+  // [zombie.names] in C++23-C++26, not exported in C++20.
-+  { "std::declare_no_pointers", whitelist_std::cxx20 },
-+  { "std::declare_reachable", whitelist_std::cxx20 },
-+  { "std::get_pointer_safety", whitelist_std::cxx20 },
-+  { "std::pointer_safety", whitelist_std::cxx20 },
-+  { "std::undeclare_no_pointers", whitelist_std::cxx20 },
-+  { "std::undeclare_reachable", whitelist_std::cxx20 }
-+};
-+
-+void
-+plugin_dump_decl (tree decl, char *scope, hash_set<tree> **exported_usings)
-+{
-+  if (VAR_P (decl) && DECL_ARTIFICIAL (decl))
-+    return;
-+
-+  tree name = DECL_NAME (decl);
-+  if (!name)
-+    return;
-+
-+  if (IDENTIFIER_ANON_P (name))
-+    return;
-+
-+  if (TREE_CODE (decl) == CONST_DECL)
-+    return;
-+
-+  if (TREE_CODE (decl) == NAMESPACE_DECL && DECL_NAMESPACE_INLINE_P (decl))
-+    {
-+      plugin_dump_ns (decl, scope, exported_usings);
-+      return;
-+    }
-+
-+  if (IDENTIFIER_POINTER (name)[0] == '_'
-+      || strchr (IDENTIFIER_POINTER (name), ' '))
-+    return;
-+
-+  if (TREE_CODE (decl) == NAMESPACE_DECL)
-+    {
-+      char *p = strchr (scope, '\0');
-+      strcpy (p, IDENTIFIER_POINTER (name));
-+      strcat (p, "::");
-+      plugin_dump_ns (decl, scope, exported_usings);
-+      *p = '\0';
-+      return;
-+    }
-+
-+  if (DECL_MODULE_EXPORT_P (decl))
-+    return;
-+  if (TREE_DEPRECATED (decl)
-+      || lookup_attribute ("deprecated", DECL_ATTRIBUTES (decl)))
-+    return;
-+  if (TREE_CODE (decl) == TEMPLATE_DECL
-+      && DECL_TEMPLATE_RESULT (decl)
-+      && (TREE_DEPRECATED (DECL_TEMPLATE_RESULT (decl))
-+	  || lookup_attribute ("deprecated",
-+			       DECL_ATTRIBUTES (DECL_TEMPLATE_RESULT (decl)))))
-+    return;
-+  if (*exported_usings
-+      && (*exported_usings)->contains (DECL_NAME (decl)))
-+    return;
-+
-+  size_t scope_len = strlen (scope);
-+  whitelist_std this_std;
-+  if (cxx_dialect == cxx20)
-+    this_std = whitelist_std::cxx20;
-+  else if (cxx_dialect == cxx23)
-+    this_std = whitelist_std::cxx23;
-+  else if (cxx_dialect == cxx26)
-+    this_std = whitelist_std::cxx26;
-+  for (int i = 0; i < ARRAY_SIZE (whitelist); ++i)
-+    if (strncmp (whitelist[i].name, scope, scope_len) == 0
-+	&& strcmp (whitelist[i].name + scope_len,
-+		   IDENTIFIER_POINTER (name)) == 0)
-+      {
-+	if (((int) whitelist[i].enabled_in & (int) this_std) != 0)
-+	  {
-+	    inform (DECL_SOURCE_LOCATION (decl),
-+		    "missing using %s%D; whitelisted", scope, name);
-+	    return;
-+	  }
-+	break;
-+      }
-+
-+  error_at (DECL_SOURCE_LOCATION (decl), "missing using %s%D;", scope, name);
-+}
-+
-+void
-+plugin_dump_binding (tree binding, char *scope,
-+		     hash_set<tree> **exported_usings)
-+{
-+  tree value = NULL_TREE;
-+
-+  if (TREE_CODE (binding) == OVERLOAD)
-+    {
-+      tree ovl = ovl_skip_hidden (binding);
-+      if (ovl && TREE_CODE (ovl) == OVERLOAD && OVL_EXPORT_P (ovl))
-+	return;
-+    }
-+
-+  if (STAT_HACK_P (binding))
-+    {
-+      if (!STAT_TYPE_HIDDEN_P (binding)
-+          && STAT_TYPE (binding))
-+        return plugin_dump_decl (STAT_TYPE (binding), scope, exported_usings);
-+      else if (!STAT_DECL_HIDDEN_P (binding))
-+        value = STAT_DECL (binding);
-+    }
-+  else
-+    value = binding;
-+
-+  value = ovl_skip_hidden (value);
-+  if (value)
-+    {
-+      value = OVL_FIRST (value);
-+      return plugin_dump_decl (value, scope, exported_usings);
-+    }
-+}
-+
-+void
-+plugin_dump_ns (tree ns, char *scope, hash_set<tree> **exported_usings)
-+{
-+  using itert = hash_table<named_decl_hash>::iterator;
-+  itert end (DECL_NAMESPACE_BINDINGS (ns)->end ());
-+  hash_set<tree> *my_exported_usings = NULL;
-+  if (DECL_NAMESPACE_INLINE_P (ns))
-+    {
-+      if (*exported_usings == NULL)
-+	{
-+	  *exported_usings = new hash_set<tree>;
-+	  tree parent = DECL_CONTEXT (ns);
-+	  itert pend (DECL_NAMESPACE_BINDINGS (parent)->end ());
-+	  for (itert iter (DECL_NAMESPACE_BINDINGS (parent)->begin ());
-+	       iter != pend; ++iter)
-+	    {
-+	      tree b = *iter;
-+	      if (TREE_CODE (b) == USING_DECL
-+		  && DECL_MODULE_EXPORT_P (b)
-+		  && DECL_NAME (b))
-+		(*exported_usings)->add (DECL_NAME (b));
-+	      else if (TREE_CODE (b) == OVERLOAD)
-+		{
-+		  tree ovl = ovl_skip_hidden (b);
-+		  if (ovl && TREE_CODE (ovl) == OVERLOAD && OVL_EXPORT_P (ovl))
-+		    {
-+		      b = OVL_FIRST (ovl);
-+		      if (DECL_NAME (b))
-+			(*exported_usings)->add (DECL_NAME (b));
-+		    }
-+		}
-+	    }
-+	}
-+    }
-+  else
-+    exported_usings = &my_exported_usings;
-+  for (itert iter (DECL_NAMESPACE_BINDINGS (ns)->begin ());
-+       iter != end; ++iter)
-+    {
-+      tree b = *iter;
-+      gcc_assert (TREE_CODE (b) != BINDING_VECTOR);
-+      plugin_dump_binding (b, scope, exported_usings);
-+    }
-+  delete my_exported_usings;
-+}
-+
-+void
-+plugin_finish_unit (void *, void *)
-+{
-+  if (!main_input_filename
-+      || strstr (main_input_filename, "/std.cc") == NULL)
-+    return;
-+
-+  char buf[4096];
-+  strcpy (buf, "std::");
-+  hash_set<tree> *exported_usings = NULL;
-+  plugin_dump_ns (std_node, buf, &exported_usings);
-+  delete exported_usings;
-+}
-+
-+int
-+plugin_init (struct plugin_name_args *plugin_info,
-+             struct plugin_gcc_version *version)
-+{
-+  const char *plugin_name = plugin_info->base_name;
-+
-+  register_callback (plugin_name, PLUGIN_FINISH_UNIT,
-+                     plugin_finish_unit, NULL);
-+  return 0;
-+}
---- gcc/testsuite/g++.dg/plugin/std-module-exports-c++20.C.jj	2026-03-19 16:19:23.695035259 +0100
-+++ gcc/testsuite/g++.dg/plugin/std-module-exports-c++20.C	2026-03-19 16:20:10.993688891 +0100
-@@ -0,0 +1,11 @@
-+// Test bits/std.cc exports everything it should.
-+// This is done using a plugin to walk std namespace and
-+// its child namespaces, looking for decls with non-uglified
-+// names which aren't deprecated and are not exported.
-+// { dg-do link }
-+// { dg-options "-O0 -std=c++20 -fmodules -x c++-system-module bits/std.cc -x none" }
-+
-+int
-+main ()
-+{
-+}
---- gcc/testsuite/g++.dg/plugin/std-module-exports-c++23.C.jj	2026-03-19 16:19:23.695116627 +0100
-+++ gcc/testsuite/g++.dg/plugin/std-module-exports-c++23.C	2026-03-19 16:20:10.993788563 +0100
-@@ -0,0 +1,11 @@
-+// Test bits/std.cc exports everything it should.
-+// This is done using a plugin to walk std namespace and
-+// its child namespaces, looking for decls with non-uglified
-+// names which aren't deprecated and are not exported.
-+// { dg-do link }
-+// { dg-options "-O0 -std=c++23 -fmodules -x c++-system-module bits/std.cc -x none" }
-+
-+int
-+main ()
-+{
-+}
---- gcc/testsuite/g++.dg/plugin/std-module-exports-c++26.C.jj	2026-03-19 16:19:23.695194959 +0100
-+++ gcc/testsuite/g++.dg/plugin/std-module-exports-c++26.C	2026-03-19 16:20:10.993904525 +0100
-@@ -0,0 +1,11 @@
-+// Test bits/std.cc exports everything it should.
-+// This is done using a plugin to walk std namespace and
-+// its child namespaces, looking for decls with non-uglified
-+// names which aren't deprecated and are not exported.
-+// { dg-do link }
-+// { dg-options "-O0 -std=c++26 -fmodules -freflection -fcontracts -x c++-system-module bits/std.cc -x none" }
-+
-+int
-+main ()
-+{
-+}

diff --git a/gcc17-uglification.patch b/gcc17-uglification.patch
deleted file mode 100644
index 1b00e91..0000000
--- a/gcc17-uglification.patch
+++ /dev/null
@@ -1,625 +0,0 @@
-2026-03-19  Jakub Jelinek  <jakub@redhat.com>
-
-	* g++.dg/plugin/plugin.exp (plugin_test_list): Add uglification tests.
-	* g++.dg/plugin/uglification_plugin.cc: New file.
-	* g++.dg/plugin/uglification.C: New test.
-	* g++.dg/plugin/uglification-c++98.C: New test.
-	* g++.dg/plugin/uglification-c++11.C: New test.
-	* g++.dg/plugin/uglification-c++14.C: New test.
-	* g++.dg/plugin/uglification-c++17.C: New test.
-	* g++.dg/plugin/uglification-c++20.C: New test.
-	* g++.dg/plugin/uglification-c++23.C: New test.
-	* g++.dg/plugin/uglification-c++26.C: New test.
-
---- gcc/testsuite/g++.dg/plugin/plugin.exp.jj	2026-03-18 15:40:15.646008934 +0100
-+++ gcc/testsuite/g++.dg/plugin/plugin.exp	2026-03-18 16:48:34.395284889 +0100
-@@ -78,6 +78,15 @@ set plugin_test_list [list \
-     	  show-template-tree-color-no-highlight-colors.C \
-     	  show-template-tree-color-labels.C \
-     	  show-template-tree-color-no-elide-type.C } \
-+    { uglification_plugin.cc \
-+	  uglification.C \
-+    	  uglification-c++98.C \
-+    	  uglification-c++11.C \
-+    	  uglification-c++14.C \
-+    	  uglification-c++17.C \
-+    	  uglification-c++20.C \
-+    	  uglification-c++23.C \
-+    	  uglification-c++26.C } \
-     { comment_plugin.cc comments-1.C } \
- ]
- 
---- gcc/testsuite/g++.dg/plugin/uglification_plugin.cc.jj	2026-03-19 00:04:41.927231734 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification_plugin.cc	2026-03-19 09:00:06.741433015 +0100
-@@ -0,0 +1,353 @@
-+#include "gcc-plugin.h"
-+#include <stdlib.h>
-+#include "config.h"
-+#include "system.h"
-+#include "coretypes.h"
-+#include "tree.h"
-+#include "intl.h"
-+#include "cp/cp-tree.h"
-+#include "cp/name-lookup.h"
-+#include "diagnostic.h"
-+#include "stringpool.h"
-+
-+int plugin_is_GPL_compatible;
-+
-+void plugin_walk_ns (tree);
-+
-+const char *badnames[] = {
-+  /* See libstdc++-v3/testsuite/17_intro/{,bad}names.cc.  */
-+  "_A", "_B", "_C", "_G", "_L", "_N", "_P", "_S", "_T", "_U", "_X",
-+  "__deref", "__used", "__unused", "__inline", "_Complex",
-+  "__istype", "__maskrune", "__tolower", "__toupper", "__wchar_t",
-+  "__wint_t", "_res", "_res_ext", "_C2", "__lockable", "__null_sentinel",
-+  "__packed", "__weak", "__strong", "_In_", "_Inout_", "_Out_",
-+  "_Reserved_", "__inout", "__in_opt", "__out_opt"
-+};
-+
-+vec<tree> nonugly_names;
-+hash_set<tree> whitelist;
-+bool impl_ns;
-+
-+void
-+plugin_check_decl (tree decl)
-+{
-+  if (decl == NULL_TREE)
-+    return;
-+
-+  if (VAR_OR_FUNCTION_DECL_P (decl)
-+      && DECL_EXTERNAL (decl)
-+      && DECL_CONTEXT (decl)
-+      && TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL)
-+    return;
-+
-+  tree name = DECL_NAME (decl);
-+  if (name == NULL_TREE
-+      || IDENTIFIER_ANON_P (name)
-+      || name == this_identifier
-+      || IDENTIFIER_ANY_OP_P (name))
-+    return;
-+
-+  const char *cname = IDENTIFIER_POINTER (name);
-+  if (memcmp (cname, "auto:", 5) == 0)
-+    return;
-+
-+  if (cname[0] != '_'
-+      || (cname[1] != '_'
-+	  && !ISUPPER (cname[1])
-+	  && cname[1]))
-+    {
-+      nonugly_names.safe_push (decl);
-+      return;
-+    }
-+
-+  bool badname = false;
-+  for (int i = 0; i < ARRAY_SIZE (badnames); ++i)
-+    if (strcmp (badnames[i], cname) == 0)
-+      {
-+	badname = true;
-+	break;
-+      }
-+  if (!badname && cname[1] == 'E' && ISDIGIT (cname[2]))
-+    {
-+      if (cname[2] != '0'
-+	  && (!cname[3] || ((cname[2] == '1' || cname[2] == '2')
-+			    && ISDIGIT (cname[3])
-+			    && !cname[4])))
-+	badname = true;
-+    }
-+  else if (memcmp (cname + 1, "_tg_", 4) == 0)
-+    badname = true;
-+  if (badname)
-+    inform (DECL_SOURCE_LOCATION (decl), "badname %qs", cname);
-+}
-+
-+tree
-+plugin_check_tree (tree *tp, int */*walk_subtrees*/, void */*data*/)
-+{
-+  if (TREE_CODE (*tp) == BIND_EXPR)
-+    for (tree var = BIND_EXPR_VARS (*tp); var; var = DECL_CHAIN (var))
-+      plugin_check_decl (var);
-+  if (TREE_CODE (*tp) == DECL_EXPR)
-+    plugin_check_decl (DECL_EXPR_DECL (*tp));
-+  return NULL_TREE;
-+}
-+
-+void
-+plugin_check_fn (tree decl)
-+{
-+  for (tree arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
-+    plugin_check_decl (arg);
-+
-+  if (DECL_DEFAULTED_FN (decl))
-+    return;
-+  cp_walk_tree_without_duplicates (&DECL_SAVED_TREE (decl), plugin_check_tree,
-+				   NULL);
-+}
-+
-+bool
-+plugin_header_check (tree decl)
-+{
-+  expanded_location eloc = expand_location (DECL_SOURCE_LOCATION (decl));
-+  if (eloc.file == NULL)
-+    return false;
-+  if (strstr (eloc.file, "/libstdc++-v3/include/") == NULL
-+      && strstr (eloc.file, "/libstdc++-v3/libsupc++/") == NULL)
-+    return false;
-+  return true;
-+}
-+
-+void
-+plugin_walk_decl (tree decl)
-+{
-+  if (TREE_CODE (decl) == NAMESPACE_DECL)
-+    {
-+      if (impl_ns
-+	  || (DECL_NAME (decl)
-+	      && IDENTIFIER_POINTER (DECL_NAME (decl))[0] != '_'
-+	      && !IDENTIFIER_ANON_P (DECL_NAME (decl)))
-+	  || DECL_NAMESPACE_INLINE_P (decl))
-+	plugin_walk_ns (decl);
-+      else
-+	{
-+	  impl_ns = true;
-+	  plugin_walk_ns (decl);
-+	  impl_ns = false;
-+	}
-+      return;
-+    }
-+
-+  if (!plugin_header_check (decl))
-+    return;
-+
-+  if (!impl_ns
-+      && DECL_NAME (decl)
-+      && !IDENTIFIER_ANON_P (DECL_NAME (decl))
-+      && !IDENTIFIER_ANY_OP_P (DECL_NAME (decl))
-+      && IDENTIFIER_POINTER (DECL_NAME (decl))[0] != '_')
-+    whitelist.add (DECL_NAME (decl));
-+  else if (impl_ns && DECL_NAME (decl))
-+    plugin_check_decl (decl);
-+
-+  if (TREE_CODE (decl) == TEMPLATE_DECL)
-+    {
-+      tree parms = DECL_INNERMOST_TEMPLATE_PARMS (decl);
-+      for (tree node : tree_vec_range (parms))
-+	plugin_check_decl (TREE_VALUE (node));
-+    }
-+
-+  if (DECL_FUNCTION_TEMPLATE_P (decl))
-+    plugin_check_fn (DECL_TEMPLATE_RESULT (decl));
-+  else if (TREE_CODE (decl) == FUNCTION_DECL
-+	   && DECL_LANG_SPECIFIC (decl)
-+	   && DECL_TEMPLATE_INFO (decl))
-+    plugin_check_fn (decl);
-+
-+  if (DECL_CLASS_TEMPLATE_P (decl))
-+    decl = DECL_TEMPLATE_RESULT (decl);
-+  if (TREE_CODE (decl) == TYPE_DECL
-+      && DECL_IMPLICIT_TYPEDEF_P (decl))
-+    {
-+      bool save_impl_ns = impl_ns;
-+      if (impl_ns
-+	  && DECL_NAME (decl)
-+	  && id_equal (DECL_NAME (decl), "_Promise_erased")
-+	  && DECL_CONTEXT (decl)
-+	  && TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL
-+	  && DECL_NAME (DECL_CONTEXT (decl))
-+	  && id_equal (DECL_NAME (DECL_CONTEXT (decl)), "__gen"))
-+	/* Workaround: std::generator<R, V, A>::promise_type in
-+	   the standard is actually defined as std::__gen::_Promise_erased,
-+	   but we want to whitelist its members.  Temporarily clear
-+	   impl_ns in that class.  */
-+	impl_ns = false;
-+      if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (decl)))
-+	{
-+	  for (tree fld = TYPE_FIELDS (TREE_TYPE (decl));
-+	       fld; fld = DECL_CHAIN (fld))
-+	    plugin_walk_decl (fld);
-+	  for (tree f = DECL_FRIENDLIST (decl); f; f = TREE_CHAIN (f))
-+	    for (tree l = FRIEND_DECLS (f); l; l = TREE_CHAIN (l))
-+	      plugin_walk_decl (TREE_VALUE (l));
-+	}
-+      else if (TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
-+	for (tree en = TYPE_VALUES (TREE_TYPE (decl));
-+	     en; en = TREE_CHAIN (en))
-+	  plugin_walk_decl (TREE_VALUE (en));
-+      impl_ns = save_impl_ns;
-+    }
-+}
-+
-+void
-+plugin_walk_binding (tree binding)
-+{
-+  tree value = NULL_TREE;
-+
-+  if (STAT_HACK_P (binding))
-+    {
-+      if (!STAT_TYPE_HIDDEN_P (binding)
-+	  && STAT_TYPE (binding))
-+	return plugin_walk_decl (STAT_TYPE (binding));
-+      else if (!STAT_DECL_HIDDEN_P (binding))
-+	value = STAT_DECL (binding);
-+    }
-+  else
-+    value = binding;
-+
-+  value = ovl_skip_hidden (value);
-+  if (value)
-+    {
-+      value = OVL_FIRST (value);
-+      return plugin_walk_decl (value);
-+    }
-+}
-+
-+void
-+plugin_walk_ns (tree ns)
-+{
-+  using itert = hash_table<named_decl_hash>::iterator;
-+  itert end (DECL_NAMESPACE_BINDINGS (ns)->end ());
-+  for (itert iter (DECL_NAMESPACE_BINDINGS (ns)->begin ());
-+       iter != end; ++iter)
-+    {
-+      tree b = *iter;
-+      gcc_assert (TREE_CODE (b) != BINDING_VECTOR);
-+      plugin_walk_binding (b);
-+    }
-+}
-+
-+int
-+plugin_ctx_check (tree decl)
-+{
-+  int ret = 1;
-+  tree ctx = DECL_CONTEXT (decl);
-+  while (ctx)
-+    {
-+      if (ctx == std_node)
-+	return ret;
-+      if (TREE_CODE (ctx) == NAMESPACE_DECL
-+	  && DECL_NAME (ctx)
-+	  && id_equal (DECL_NAME (ctx), "__gnu_cxx")
-+	  && CP_DECL_CONTEXT (ctx) == global_namespace)
-+	return 2;
-+      if (TREE_CODE (ctx) == NAMESPACE_DECL
-+	  && (!DECL_NAME (ctx)
-+	      || IDENTIFIER_POINTER (DECL_NAME (ctx))[0] == '_'
-+	      || IDENTIFIER_ANON_P (DECL_NAME (ctx)))
-+	  && !DECL_NAMESPACE_INLINE_P (ctx))
-+	ret = 2;
-+      if (TYPE_P (ctx))
-+	ctx = TYPE_CONTEXT (ctx);
-+      else
-+	ctx = DECL_CONTEXT (ctx);
-+    }
-+  return 0;
-+}
-+
-+void
-+plugin_finish_parse_function (void *event_data, void *)
-+{
-+  tree decl = (tree) event_data;
-+  if (!plugin_header_check (decl))
-+    return;
-+
-+  /* Only diagnose stuff nested in ::std or ::__gnu_cxx
-+     namespaces.  */
-+  if (!plugin_ctx_check (decl))
-+    return;
-+
-+  /* Templates are handled from plugin_walk_ns.  */
-+  if (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
-+    return;
-+  plugin_check_fn (decl);
-+}
-+
-+void
-+plugin_walk_specialization (bool, spec_entry *entry, void *)
-+{
-+  tree info;
-+  if (TYPE_P (entry->spec))
-+    info = TYPE_TEMPLATE_INFO (entry->spec);
-+  else
-+    info = DECL_TEMPLATE_INFO (entry->spec);
-+  if (PRIMARY_TEMPLATE_P (TI_TEMPLATE (info)) && TI_PARTIAL_INFO (info))
-+    info = TI_PARTIAL_INFO (info);
-+  tree decl = TI_TEMPLATE (info);
-+  if (int c = plugin_ctx_check (decl))
-+    {
-+      impl_ns = c == 2;
-+      plugin_walk_decl (decl);
-+    }
-+}
-+
-+void
-+plugin_finish_unit (void *, void *)
-+{
-+  plugin_walk_ns (std_node);
-+  tree gnucxx_ns = lookup_qualified_name (global_namespace, "__gnu_cxx");
-+  if (gnucxx_ns && TREE_CODE (gnucxx_ns) == NAMESPACE_DECL)
-+    plugin_walk_ns (gnucxx_ns);
-+  walk_specializations (false, plugin_walk_specialization, NULL);
-+  walk_specializations (true, plugin_walk_specialization, NULL);
-+  unsigned int i;
-+  tree decl;
-+  FOR_EACH_VEC_ELT (nonugly_names, i, decl)
-+    if (!whitelist.contains (DECL_NAME (decl)))
-+      inform (DECL_SOURCE_LOCATION (decl), "non-uglified name %qs",
-+	      IDENTIFIER_POINTER (DECL_NAME (decl)));
-+    else
-+      inform (DECL_SOURCE_LOCATION (decl), "non-uglified whitelisted name %qs",
-+	      IDENTIFIER_POINTER (DECL_NAME (decl)));
-+}
-+
-+void
-+plugin_ggc_walker (void *)
-+{
-+  unsigned int i;
-+  tree decl;
-+  FOR_EACH_VEC_ELT (nonugly_names, i, decl)
-+    gt_ggc_m_9tree_node (decl);
-+  for (hash_set<tree>::iterator it = whitelist.begin ();
-+       it != whitelist.end (); ++it)
-+    gt_ggc_m_9tree_node (*it);
-+}
-+
-+static const struct ggc_root_tab xtratab[] = {
-+  { (void *) &xtratab, 1, 1, plugin_ggc_walker, NULL },
-+  LAST_GGC_ROOT_TAB
-+};
-+
-+int
-+plugin_init (struct plugin_name_args *plugin_info,
-+	     struct plugin_gcc_version *version)
-+{
-+  const char *plugin_name = plugin_info->base_name;
-+
-+  register_callback (plugin_name, PLUGIN_FINISH_UNIT,
-+		     plugin_finish_unit, NULL);
-+  register_callback (plugin_name, PLUGIN_FINISH_PARSE_FUNCTION,
-+		     plugin_finish_parse_function, NULL);
-+  register_callback (plugin_name, PLUGIN_REGISTER_GGC_ROOTS,
-+		     NULL, (void *) xtratab);
-+
-+  return 0;
-+}
---- gcc/testsuite/g++.dg/plugin/uglification.C.jj	2026-03-18 16:48:34.395594980 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification.C	2026-03-18 16:59:12.929288908 +0100
-@@ -0,0 +1,151 @@
-+// Test that uglification_plugin.cc works properly.
-+// { dg-options "-O0 -std=c++20" }
-+
-+// Pretend this is in a libstdc++-v3 header.
-+#line 6 "gcc/libstdc++-v3/include/bits/universe.h"
-+
-+// Stuff outside of namespace std not reported.
-+int
-+foo (int a, int b)			// { dg-bogus "note: non-uglified name '\[ab]'" }
-+{
-+  int c = a + b;			// { dg-bogus "note: non-uglified name 'c'" }
-+  return c;
-+}
-+
-+namespace std {
-+  struct foo {
-+    int bar (int d, int __e) {		// { dg-message "note: non-uglified name 'd'" }
-+      int f = d + __e;			// { dg-message "note: non-uglified name 'f'" }
-+      int _E12 = f;			// { dg-message "note: badname '_E12'" }
-+      using g = int;			// { dg-message "note: non-uglified name 'g'" }
-+      return f + _E12;
-+    }
-+    template <typename T>		// { dg-message "note: non-uglified name 'T'" }
-+    int baz (int __h, int __tg_foo) {	// { dg-message "note: badname '__tg_foo'" }
-+      int i = __h;			// { dg-message "note: non-uglified name 'i'" }
-+      using j = int;			// { dg-message "note: non-uglified name 'j'" }
-+      return i;
-+    }
-+    template <double>
-+    int baz (int aa) {			// { dg-message "note: non-uglified name 'aa'" }
-+      int ab = aa;			// { dg-message "note: non-uglified name 'ab'" }
-+      using ac = double;		// { dg-message "note: non-uglified name 'ac'" }
-+      return ab;
-+    }
-+    int zz;				// { dg-bogus "note: non-uglified name 'zz'" }
-+  };
-+  template <typename _T>		// { dg-message "note: badname '_T'" }
-+  struct qux {
-+    int corge (int k, int __l) {	// { dg-message "note: non-uglified name 'k'" }
-+      int __maskrune = k + __l;		// { dg-message "note: badname '__maskrune'" }
-+      typedef std::foo __in_opt;	// { dg-message "note: badname '__in_opt'" }
-+      return __maskrune;
-+    }
-+    template <typename _Tp>
-+    int garply (int m) {		// { dg-message "note: non-uglified name 'm'" }
-+      int n = m;			// { dg-message "note: non-uglified name 'n'" }
-+      struct foo { int baz; } __o;	// { dg-message "note: non-uglified whitelisted name 'foo'" }
-+      __o.baz = n;
-+      return __o.baz;
-+    }
-+  };
-+  template <typename _Tp, typename _Up>
-+  struct S {
-+    S () = delete;
-+    ~S () = delete;
-+  };
-+  template <typename _Tp>
-+  struct S <_Tp, _Tp> {
-+    int grault (int ad) {		// { dg-message "note: non-uglified name 'ad'" }
-+      int ae = ad;			// { dg-message "note: non-uglified name 'ae'" }
-+      return ae;
-+    }
-+    int quux () { return 0; }
-+  };
-+  template <>
-+  struct S <int, long> {
-+    int grault (int af) {		// { dg-message "note: non-uglified name 'af'" }
-+      int ag = af;			// { dg-message "note: non-uglified name 'ag'" }
-+      return ag;
-+    }
-+  };
-+
-+  inline namespace __cxx11 {
-+    enum freddy {
-+      frog, waldo
-+    };
-+    struct fred {
-+      int garply (int p) {		// { dg-message "note: non-uglified name 'p'" }
-+	int _res_ext = p;		// { dg-message "note: non-uglified name '_res_ext'" }
-+	return _res_ext;
-+      }
-+    };
-+  }
-+  namespace __gnu_cxx {
-+    template <typename ...U>		// { dg-message "note: non-uglified name 'U'" }
-+    int foo (U... q) {			// { dg-message "note: non-uglified name 'q'" }
-+      return 0;				// { dg-message "note: non-uglified whitelisted name 'foo'" "" { target *-*-* } .-1 }
-+    }
-+    enum blah {				// { dg-message "note: non-uglified name 'blah'" }
-+      plugh,				// { dg-message "note: non-uglified name 'plugh'" }
-+      thud,				// { dg-message "note: non-uglified name 'thud'" }
-+      _E5,				// { dg-message "note: badname '_E5'" }
-+      garply,				// { dg-message "note: non-uglified whitelisted name 'garply'" }
-+      grault,				// { dg-message "note: non-uglified whitelisted name 'grault'" }
-+      quux,				// { dg-message "note: non-uglified whitelisted name 'quux'" }
-+      lorem,				// { dg-message "note: non-uglified whitelisted name 'lorem'" }
-+      ipsum,				// { dg-message "note: non-uglified whitelisted name 'ipsum'" }
-+      dolor,				// { dg-message "note: non-uglified whitelisted name 'dolor'" }
-+      sit,				// { dg-message "note: non-uglified whitelisted name 'sit'" }
-+      amet,				// { dg-message "note: non-uglified whitelisted name 'amet'" }
-+      consectetur,			// { dg-message "note: non-uglified whitelisted name 'consectetur'" }
-+      adipiscing,			// { dg-message "note: non-uglified whitelisted name 'adipiscing'" }
-+      elit				// { dg-message "note: non-uglified whitelisted name 'elit'" }
-+    };
-+    int waldo (int r) {			// { dg-message "note: non-uglified name 'r'" }
-+      using s = std::foo;		// { dg-message "note: non-uglified name 's'" }
-+      return r;				// { dg-message "note: non-uglified whitelisted name 'waldo'" "" { target *-*-* } .-2 }
-+    }
-+    int xyzzy () { return 0; }		// { dg-message "note: non-uglified whitelisted name 'xyzzy'" }
-+    int barf () { return 0; }		// { dg-message "note: non-uglified name 'barf'" }
-+    int __foobar () { return 0; }
-+    struct V {				// { dg-message "note: non-uglified name 'V'" }
-+      union {
-+	int t;				// { dg-message "note: non-uglified name 't'" }
-+      };
-+      int zz () { return 0; }		// { dg-message "note: non-uglified whitelisted name 'zz'" }
-+      int ww () { return 0; }		// { dg-message "note: non-uglified name 'ww'" }
-+    };
-+  }
-+  int xyzzy (int s) {			// { dg-message "note: non-uglified name 's'" }
-+    return s;
-+  }
-+  template <int _Idx>
-+  struct lorem {
-+    template <int _Idx2>
-+    friend int ipsum (int ah) {		// { dg-message "note: non-uglified name 'ah'" }
-+      int ai = ah;			// { dg-message "note: non-uglified name 'ai'" }
-+      return ai;
-+    }
-+  };
-+  template <int _Idx>
-+  struct dolor {
-+    friend int sit (int aj) {		// { dg-message "note: non-uglified name 'aj'" }
-+      int ak = aj;			// { dg-message "note: non-uglified name 'ak'" }
-+      return ak;
-+    }
-+  };
-+  struct amet {
-+    template <int _Idx>
-+    friend int consectetur (int al) {	// { dg-message "note: non-uglified name 'al'" }
-+      int am = al;			// { dg-message "note: non-uglified name 'am'" }
-+      return am;
-+    }
-+  };
-+  struct adipiscing {
-+    friend int elit (int an) {		// { dg-message "note: non-uglified name 'an'" }
-+      int ao = an;			// { dg-message "note: non-uglified name 'ao'" }
-+      return ao;
-+    }
-+  };
-+}
---- gcc/testsuite/g++.dg/plugin/uglification-c++98.C.jj	2026-03-18 16:48:34.395699755 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++98.C	2026-03-18 16:48:34.395699755 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++98" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++11.C.jj	2026-03-18 16:48:34.395778236 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++11.C	2026-03-18 16:48:34.395778236 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++11" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++14.C.jj	2026-03-18 16:48:34.395852292 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++14.C	2026-03-18 16:48:34.395852292 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++14" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++17.C.jj	2026-03-18 16:48:34.395946403 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++17.C	2026-03-18 16:48:34.395946403 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++17" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++20.C.jj	2026-03-18 16:48:34.396022165 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++20.C	2026-03-18 16:48:34.396022165 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++20" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++23.C.jj	2026-03-18 16:48:34.396096554 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++23.C	2026-03-18 16:48:34.396096554 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++23" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
---- gcc/testsuite/g++.dg/plugin/uglification-c++26.C.jj	2026-03-18 16:48:34.396169901 +0100
-+++ gcc/testsuite/g++.dg/plugin/uglification-c++26.C	2026-03-18 16:48:34.396169901 +0100
-@@ -0,0 +1,9 @@
-+// Verify template parameter names, names of arguments and block scope decls
-+// in functions and function templates are uglified and don't contain
-+// badnames.
-+// { dg-options "-O0 -std=c++26 -freflection -fcontracts" }
-+
-+#include <bits/stdc++.h>
-+
-+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
-+// { dg-bogus "note: badname" "" { target *-*-* } 0 }

diff --git a/gcc17-uglification2.patch b/gcc17-uglification2.patch
deleted file mode 100644
index e53ed27..0000000
--- a/gcc17-uglification2.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-2026-04-09  Jakub Jelinek  <jakub@redhat.com>
-
-	* g++.dg/plugin/uglification_plugin.cc (plugin_check_tree): Walk
-	REQUIRES_EXPR_PARMS of REQUIRES_EXPR.
-	(plugin_walk_decl): Walk TEMPLATE_PARMS_CONSTRAINTS using
-	plugin_check_tree.  Walk DECL_INITIAL of CONCEPT_DECL as well.
-	* g++.dg/plugin/uglification.C: Add tests for non-uglified names
-	in lambda parameters, lambda captures and requires expressions.
-
---- gcc/testsuite/g++.dg/plugin/uglification_plugin.cc.jj	2026-04-09 12:23:44.001071999 +0200
-+++ gcc/testsuite/g++.dg/plugin/uglification_plugin.cc	2026-04-09 13:31:41.924617700 +0200
-@@ -89,6 +89,9 @@ plugin_check_tree (tree *tp, int */*walk
-       plugin_check_decl (var);
-   if (TREE_CODE (*tp) == DECL_EXPR)
-     plugin_check_decl (DECL_EXPR_DECL (*tp));
-+  if (TREE_CODE (*tp) == REQUIRES_EXPR)
-+    for (tree parm = REQUIRES_EXPR_PARMS (*tp); parm; parm = DECL_CHAIN (parm))
-+      plugin_check_decl (parm);
-   return NULL_TREE;
- }
- 
-@@ -153,6 +156,10 @@ plugin_walk_decl (tree decl)
-       tree parms = DECL_INNERMOST_TEMPLATE_PARMS (decl);
-       for (tree node : tree_vec_range (parms))
- 	plugin_check_decl (TREE_VALUE (node));
-+      if (tree constr
-+	  = TEMPLATE_PARMS_CONSTRAINTS (DECL_TEMPLATE_PARMS (decl)))
-+        cp_walk_tree_without_duplicates (&constr, plugin_check_tree,
-+					 NULL);
-     }
- 
-   if (DECL_FUNCTION_TEMPLATE_P (decl))
-@@ -162,6 +169,10 @@ plugin_walk_decl (tree decl)
- 	   && DECL_TEMPLATE_INFO (decl))
-     plugin_check_fn (decl);
- 
-+  if (TREE_CODE (STRIP_TEMPLATE (decl)) == CONCEPT_DECL)
-+    cp_walk_tree_without_duplicates (&DECL_INITIAL (STRIP_TEMPLATE (decl)),
-+				     plugin_check_tree, NULL);
-+
-   if (DECL_CLASS_TEMPLATE_P (decl))
-     decl = DECL_TEMPLATE_RESULT (decl);
-   if (TREE_CODE (decl) == TYPE_DECL
---- gcc/testsuite/g++.dg/plugin/uglification.C.jj	2026-04-09 12:23:44.001236292 +0200
-+++ gcc/testsuite/g++.dg/plugin/uglification.C	2026-04-09 12:56:06.267164891 +0200
-@@ -148,4 +148,16 @@ namespace std {
-       return ao;
-     }
-   };
-+  void sed (int __ap) {
-+    auto __aq = [] (int ar) {};		// { dg-message "note: non-uglified name 'ar'" }
-+    auto __as = [at = __ap] () {};	// { dg-message "note: non-uglified name 'at'" }
-+  }
-+  template <typename _Tp>
-+  concept eiusmod = requires (_Tp au) {	// { dg-message "note: non-uglified name 'au'" }
-+    au++;
-+  };
-+  template <typename ..._Tp>
-+  requires ((requires (const _Tp av) {	// { dg-message "note: non-uglified name 'av'" }
-+    av++; }) && ...)
-+  void tempor (_Tp ...aw) {}		// { dg-message "note: non-uglified name 'aw'" }
- }

diff --git a/.gitignore b/.gitignore
index 10ec44b..1acf67d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,8 +36,11 @@
 /gcc-16.0.1-20260209.tar.xz
 /gcc-16.0.1-20260302.tar.xz
 /gcc-16.0.1-20260305.tar.xz
+/gcc-16.0.1-20260326s.tar.xz
+/gcc-16.0.1-20260327s.tar.xz
+/gcc-16.0.1-20260402s.tar.xz
 /gcc-16.0.1-20260321.tar.xz
 /gcc-16.0.1-20260416.tar.xz
 /nvptx-tools-212da2e781ed0f9423824e85eb04819958513f7a.tar.xz
-/gcc-16.1.1-20260501.tar.xz
-/gcc-16.1.1-20260515.tar.xz
+/gcc-17.0.0-20260424s.tar.xz
+/gcc-17.0.0-20260514s.tar.xz

diff --git a/gcc-redhat-customizations.patch b/gcc-redhat-customizations.patch
new file mode 100644
index 0000000..56039cf
--- /dev/null
+++ b/gcc-redhat-customizations.patch
@@ -0,0 +1,1014 @@
+From ec0e37c5cf7eeb131b5b07863ca629103be2c233 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Wed, 14 Oct 2020 12:07:05 +0200
+Subject: [PATCH] Red Hat customizations.
+
+Note that this patch is not identical to the above quoted commit ref.  It has
+been edited to apply to snapshots taken from gcc trunk to build snapshot
+packages for Fedora.
+
+Changes from the original:
+
+2026-03-24
+
+- Drop the translation PO file changes; posted upstream.
+
+2025-12-02
+
+- ChangeLogs moved out from the patch itself
+- Translation PO file diff context has been updated to allow the patch to
+  apply.
+
+gcc/ChangeLog:
+2010-06-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
+	* config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use
+	rs6000_elf_end_indicate_exec_stack.
+	* config/ia64/ia64.c (ia64_linux_file_end): New.
+	* config/ia64/linux.h (TARGET_ASM_FILE_END): Use ia64_linux_file_end.
+
+	* cppbuiltin.c (define__GNUC__): Also define __GNUC_RH_RELEASE__.
+
+	* config/ia64/ia64.h (FRAME_GROWS_DOWNWARD): Define to 1 if
+	-fstack-protect.
+	* config/ia64/ia64.c (ia64_compute_frame_size): Make sure
+	size is a multiple of 16 if FRAME_GROWS_DOWNWARD.
+	(ia64_initial_elimination_offset): Support FRAME_GROWS_DOWNWARD
+	layout.
+	* config/ia64/linux.h (TARGET_LIBC_PROVIDES_SSP): Define.
+	* config/ia64/ia64.md (stack_protect_set, stack_protect_test): New
+	expanders.
+
+	Revert:
+	2005-04-29  Alan Modra  <amodra@bigpond.net.au>
+	PR target/21098
+	* config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
+	* config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use the above.
+
+	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
+	on ppc64-linux.
+
+	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
+
+	* configure.ac (HAVE_LD_OVERLAPPING_OPD): New test.
+	* configure: Rebuilt.
+	* config.in: Rebuilt.
+	* config/rs6000/rs6000.c (OVERLAPPING_OPD): Define.
+	(rs6000_elf_declare_function_name): Use it.
+
+gcc/ada/ChangeLog:
+2010-06-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* gnat-style.texi: Change dircategory to GNU Ada tools.
+
+gcc/testsuite/ChangeLog:
+2010-06-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* g++.dg/opt/ctor1.C: New test.
+
+libgcc/ChangeLog:
+2010-06-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/ia64/lib1funcs.S: Add .note.GNU-stack section on
+	ia64-linux.
+	* config/ia64/crtbegin.S: Likewise.
+	* config/ia64/crtend.S: Likewise.
+	* config/ia64/crti.S: Likewise.
+	* config/ia64/crtn.S: Likewise.
+
+(cherry picked from commit 75c21855ac707188d6e09bec81612ebeb650b713)
+---
+ gcc/Makefile.in                  |   3 +-
+ gcc/ada/gnat-style.texi          |   2 +-
+ gcc/config.in                    |   6 +
+ gcc/config/ia64/ia64.cc          |  42 +--
+ gcc/config/ia64/ia64.h           |   2 +-
+ gcc/config/ia64/ia64.md          |  37 +++
+ gcc/config/ia64/linux.h          |   7 +
+ gcc/config/rs6000/ppc-asm.h      |   2 +-
+ gcc/config/rs6000/rs6000.cc      |  19 +-
+ gcc/configure                    |  25 ++
+ gcc/configure.ac                 |  18 ++
+ gcc/cppbuiltin.cc                |   4 +-
+ gcc/po/sr.po                     |   4 +-
+ gcc/po/tr.po                     |   2 +-
+ gcc/testsuite/g++.dg/opt/ctor1.C | 470 +++++++++++++++++++++++++++++++
+ libgcc/config/ia64/crtbegin.S    |   4 +
+ libgcc/config/ia64/crtend.S      |   4 +
+ libgcc/config/ia64/crti.S        |   4 +
+ libgcc/config/ia64/crtn.S        |   4 +
+ libgcc/config/ia64/lib1funcs.S   |   4 +
+ libgcc/crtstuff.c                |   8 +-
+ 25 files changed, 693 insertions(+), 32 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/opt/ctor1.C
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index d2fe8218737..3149122b9af 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3372,7 +3372,8 @@ PREPROCESSOR_DEFINES = \
+   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
+   @TARGET_SYSTEM_ROOT_DEFINE@
+ 
+-CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s)
++CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s) \
++		       -DDEVPHASE=$(DEVPHASE_s)
+ cppbuiltin.o: $(BASEVER)
+ 
+ CFLAGS-cppdefault.o += $(PREPROCESSOR_DEFINES)
+diff --git a/gcc/ada/gnat-style.texi b/gcc/ada/gnat-style.texi
+index d0ba53a7fff..c11b173d046 100644
+--- a/gcc/ada/gnat-style.texi
++++ b/gcc/ada/gnat-style.texi
+@@ -12,7 +12,7 @@
+ @finalout
+ @dircategory GNU Ada Tools 
+ @direntry
+-* gnat-style: (gnat-style.info). gnat-style
++* gnat-style: (gnat-style).      GNAT Coding Style
+ @end direntry
+ 
+ @c %**end of header
+diff --git a/gcc/config.in b/gcc/config.in
+index 972c0c2034d..508bb96275c 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -1801,6 +1801,12 @@
+ #endif
+ 
+ 
++/* Define if your PowerPC64 linker handles overlapping .opd entries. */
++#ifndef USED_FOR_TARGET
++#undef HAVE_LD_OVERLAPPING_OPD
++#endif
++
++
+ /* Define if your linker can relax absolute .eh_frame personality pointers
+    into PC-relative form. */
+ #ifndef USED_FOR_TARGET
+diff --git a/gcc/config/ia64/ia64.cc b/gcc/config/ia64/ia64.cc
+index 4acbd82bc65..fbd7d94ae74 100644
+--- a/gcc/config/ia64/ia64.cc
++++ b/gcc/config/ia64/ia64.cc
+@@ -289,6 +289,8 @@ static section *ia64_select_rtx_section (machine_mode, rtx,
+ static void ia64_output_dwarf_dtprel (FILE *, int, rtx)
+      ATTRIBUTE_UNUSED;
+ static unsigned int ia64_section_type_flags (tree, const char *, int);
++static void ia64_linux_file_end (void)
++     ATTRIBUTE_UNUSED;
+ static void ia64_init_libfuncs (void)
+      ATTRIBUTE_UNUSED;
+ static void ia64_hpux_init_libfuncs (void)
+@@ -2961,6 +2963,9 @@ ia64_compute_frame_size (HOST_WIDE_INT size)
+   else
+     pretend_args_size = crtl->args.pretend_args_size;
+ 
++  if (FRAME_GROWS_DOWNWARD)
++    size = IA64_STACK_ALIGN (size);
++
+   total_size = (spill_size + extra_spill_size + size + pretend_args_size
+ 		+ crtl->outgoing_args_size);
+   total_size = IA64_STACK_ALIGN (total_size);
+@@ -2995,29 +3000,19 @@ ia64_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to)
+ HOST_WIDE_INT
+ ia64_initial_elimination_offset (int from, int to)
+ {
+-  HOST_WIDE_INT offset;
++  HOST_WIDE_INT offset, size = get_frame_size ();
+ 
+-  ia64_compute_frame_size (get_frame_size ());
++  ia64_compute_frame_size (size);
+   switch (from)
+     {
+     case FRAME_POINTER_REGNUM:
+-      switch (to)
+-	{
+-	case HARD_FRAME_POINTER_REGNUM:
+-	  offset = -current_frame_info.total_size;
+-	  if (!crtl->is_leaf || cfun->calls_alloca)
+-	    offset += 16 + crtl->outgoing_args_size;
+-	  break;
+-
+-	case STACK_POINTER_REGNUM:
+-	  offset = 0;
+-	  if (!crtl->is_leaf || cfun->calls_alloca)
+-	    offset += 16 + crtl->outgoing_args_size;
+-	  break;
+-
+-	default:
+-	  gcc_unreachable ();
+-	}
++      offset = FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0;
++      if (!crtl->is_leaf || cfun->calls_alloca)
++	offset += 16 + crtl->outgoing_args_size;
++      if (to == HARD_FRAME_POINTER_REGNUM)
++	offset -= current_frame_info.total_size;
++      else
++	gcc_assert (to == STACK_POINTER_REGNUM);
+       break;
+ 
+     case ARG_POINTER_REGNUM:
+@@ -11961,4 +11956,13 @@ ia64_can_change_mode_class (machine_mode from, machine_mode to,
+ 
+ struct gcc_target targetm = TARGET_INITIALIZER;
+ 
++static void
++ia64_linux_file_end (void)
++{
++  int saved_trampolines_created = trampolines_created;
++  trampolines_created = 0;
++  file_end_indicate_exec_stack ();
++  trampolines_created = saved_trampolines_created;
++}
++
+ #include "gt-ia64.h"
+diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
+index 763b1c3ed48..1a0d03d9a13 100644
+--- a/gcc/config/ia64/ia64.h
++++ b/gcc/config/ia64/ia64.h
+@@ -733,7 +733,7 @@ enum reg_class
+ 
+ /* Define this macro to nonzero if the addresses of local variable slots
+    are at negative offsets from the frame pointer.  */
+-#define FRAME_GROWS_DOWNWARD 0
++#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0)
+ 
+ /* Offset from the stack pointer register to the first location at which
+    outgoing arguments are placed.  If not specified, the default value of zero
+diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
+index c533a9c106c..34e51c8eb63 100644
+--- a/gcc/config/ia64/ia64.md
++++ b/gcc/config/ia64/ia64.md
+@@ -5238,6 +5238,43 @@ (define_insn "probe_stack_range"
+   [(set_attr "itanium_class" "unknown")
+    (set_attr "predicable" "no")])
+ 
++;;
++;; Stack guard expanders
++
++(define_expand "stack_protect_set"
++  [(set (match_operand 0 "memory_operand" "")
++        (match_operand 1 "memory_operand" ""))]
++  ""
++{
++#ifdef TARGET_THREAD_SSP_OFFSET
++  rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
++  rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
++					GEN_INT (TARGET_THREAD_SSP_OFFSET)));
++  MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
++  operands[1] = canary;
++#endif
++  emit_move_insn (operands[0], operands[1]);
++  DONE;
++})
++
++(define_expand "stack_protect_test"
++  [(match_operand 0 "memory_operand" "")
++   (match_operand 1 "memory_operand" "")
++   (match_operand 2 "" "")]
++  ""
++{
++#ifdef TARGET_THREAD_SSP_OFFSET
++  rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
++  rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
++					GEN_INT (TARGET_THREAD_SSP_OFFSET)));
++  MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
++  operands[1] = canary;
++#endif
++  emit_cmp_and_jump_insns (operands[0], operands[1], EQ, NULL_RTX,
++			   ptr_mode, 1, operands[2]);
++  DONE;
++})
++
+ ;; Vector operations
+ (include "vect.md")
+ ;; Atomic operations
+diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
+index 3280193260f..50312cbd1a7 100644
+--- a/gcc/config/ia64/linux.h
++++ b/gcc/config/ia64/linux.h
+@@ -23,6 +23,8 @@ 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/>.  */
+ 
++#define TARGET_ASM_FILE_END ia64_linux_file_end
++
+ /* This is for -profile to use -lc_p instead of -lc.  */
+ #undef CC1_SPEC
+ #define CC1_SPEC "%{profile:-p} %{G*}"
+@@ -81,3 +83,8 @@ do {						\
+ 
+ /* Define this to be nonzero if static stack checking is supported.  */
+ #define STACK_CHECK_STATIC_BUILTIN 1
++
++#ifdef TARGET_LIBC_PROVIDES_SSP
++/* IA-64 glibc provides __stack_chk_guard in [r13-8].  */
++#define TARGET_THREAD_SSP_OFFSET	-8
++#endif
+diff --git a/gcc/config/rs6000/ppc-asm.h b/gcc/config/rs6000/ppc-asm.h
+index 07554c26785..c1d2c69fe20 100644
+--- a/gcc/config/rs6000/ppc-asm.h
++++ b/gcc/config/rs6000/ppc-asm.h
+@@ -384,7 +384,7 @@ GLUE(.L,name): \
+ #endif
+ #endif
+ 
+-#if defined __linux__ && !defined __powerpc64__
++#if defined __linux__
+ 	.section .note.GNU-stack
+ 	.previous
+ #endif
+diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
+index 02a2f1152db..e9c56cedb79 100644
+--- a/gcc/config/rs6000/rs6000.cc
++++ b/gcc/config/rs6000/rs6000.cc
+@@ -21267,6 +21267,15 @@ rs6000_elf_asm_out_destructor (rtx symbol, int priority)
+     assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
+ }
+ 
++#ifdef HAVE_LD_OVERLAPPING_OPD
++/* If the linker supports overlapping .opd entries and we know this function
++   doesn't ever use r11 passed to it, we can overlap the fd_aux function
++   descriptor field with next function descriptor's fd_func field.  */
++# define OVERLAPPING_OPD (cfun->static_chain_decl == NULL)
++#else
++# define OVERLAPPING_OPD 0
++#endif
++
+ void
+ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl)
+ {
+@@ -21276,7 +21285,8 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl)
+       ASM_OUTPUT_LABEL (file, name);
+       fputs (DOUBLE_INT_ASM_OP, file);
+       rs6000_output_function_entry (file, name);
+-      fputs (",.TOC.@tocbase,0\n\t.previous\n", file);
++      fprintf (file, ",.TOC.@tocbase%s\n\t.previous\n",
++	       OVERLAPPING_OPD ? "" : ",0");
+       if (DOT_SYMBOLS)
+ 	{
+ 	  fputs ("\t.size\t", file);
+@@ -21403,6 +21413,13 @@ rs6000_elf_file_end (void)
+ #if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
+   if (TARGET_32BIT || DEFAULT_ABI == ABI_ELFv2)
+     file_end_indicate_exec_stack ();
++  else
++    {
++      int saved_trampolines_created = trampolines_created;
++      trampolines_created = 0;
++      file_end_indicate_exec_stack ();
++      trampolines_created = saved_trampolines_created;
++    }
+ #endif
+ 
+   if (flag_split_stack)
+diff --git a/gcc/configure b/gcc/configure
+index 8bb71cfe348..799f58fe1f3 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -33087,6 +33087,31 @@ cat >>confdefs.h <<_ACEOF
+ #define POWERPC64_TOC_POINTER_ALIGNMENT $gcc_cv_ld_toc_align
+ _ACEOF
+ 
++    fi
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for overlapping .opd entries" >&5
++$as_echo_n "checking linker support for overlapping .opd entries... " >&6; }
++if test "${gcc_cv_ld_overlapping_opd+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  gcc_cv_ld_overlapping_opd=no
++    if test $in_tree_ld = yes ; then
++      if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then
++        gcc_cv_ld_overlapping_opd=yes
++      fi
++    elif test x$gcc_cv_ld != x ; then
++      if $gcc_cv_ld -melf64ppc --help 2>/dev/null | grep non-overlapping-opd > /dev/null; then
++        gcc_cv_ld_overlapping_opd=yes
++      fi
++    fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_overlapping_opd" >&5
++$as_echo "$gcc_cv_ld_overlapping_opd" >&6; }
++    if test x"$gcc_cv_ld_overlapping_opd" = xyes; then
++
++$as_echo "#define HAVE_LD_OVERLAPPING_OPD 1" >>confdefs.h
++
+     fi
+     ;;
+ esac
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 88a1a44fcf7..3d97d27ab49 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -6771,6 +6771,24 @@ EOF
+       AC_DEFINE_UNQUOTED(POWERPC64_TOC_POINTER_ALIGNMENT, $gcc_cv_ld_toc_align,
+     [Define to .TOC. alignment forced by your linker.])
+     fi
++
++    AC_CACHE_CHECK(linker support for overlapping .opd entries,
++    gcc_cv_ld_overlapping_opd,
++    [gcc_cv_ld_overlapping_opd=no
++    if test $in_tree_ld = yes ; then
++      if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then
++        gcc_cv_ld_overlapping_opd=yes
++      fi
++    elif test x$gcc_cv_ld != x ; then
++      if $gcc_cv_ld -melf64ppc --help 2>/dev/null | grep non-overlapping-opd > /dev/null; then
++        gcc_cv_ld_overlapping_opd=yes
++      fi
++    fi
++    ])
++    if test x"$gcc_cv_ld_overlapping_opd" = xyes; then
++      AC_DEFINE(HAVE_LD_OVERLAPPING_OPD, 1,
++    [Define if your PowerPC64 linker handles overlapping .opd entries.])
++    fi
+     ;;
+ esac
+ 
+diff --git a/gcc/cppbuiltin.cc b/gcc/cppbuiltin.cc
+index c4bfc2917dc..a9d50cf00a0 100644
+--- a/gcc/cppbuiltin.cc
++++ b/gcc/cppbuiltin.cc
+@@ -58,13 +58,15 @@ parse_basever (int *major, int *minor, int *patchlevel)
+ static void
+ define__GNUC__ (cpp_reader *pfile)
+ {
+-  int major, minor, patchlevel;
++  int major, minor, patchlevel, rhrevision;
+ 
+   parse_basever (&major, &minor, &patchlevel);
+   cpp_define_formatted (pfile, "__GNUC__=%d", major);
+   cpp_define_formatted (pfile, "__GNUC_MINOR__=%d", minor);
+   cpp_define_formatted (pfile, "__GNUC_PATCHLEVEL__=%d", patchlevel);
+   cpp_define_formatted (pfile, "__VERSION__=\"%s\"", version_string);
++  if (sscanf (DEVPHASE, " (Red Hat %*d.%*d.%*d-%d", &rhrevision) == 1)
++    cpp_define_formatted (pfile, "__GNUC_RH_RELEASE__=%d", rhrevision);
+   cpp_define_formatted (pfile, "__ATOMIC_RELAXED=%d", MEMMODEL_RELAXED);
+   cpp_define_formatted (pfile, "__ATOMIC_SEQ_CST=%d", MEMMODEL_SEQ_CST);
+   cpp_define_formatted (pfile, "__ATOMIC_ACQUIRE=%d", MEMMODEL_ACQUIRE);
+diff --git a/gcc/testsuite/g++.dg/opt/ctor1.C b/gcc/testsuite/g++.dg/opt/ctor1.C
+new file mode 100644
+index 00000000000..1f406e57c49
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/opt/ctor1.C
+@@ -0,0 +1,470 @@
++// http://bugzilla.redhat.com/show_bug.cgi?id=547286
++// { dg-do compile }
++// { dg-options "-Os -w" }
++
++struct A
++{
++  void dispose ();
++  void release () { dispose (); }
++};
++struct B
++{
++  A *pi_;
++  B () { pi_ = __null; }
++  ~B () { pi_->release (); }
++  B (B const &) : pi_ () {}
++};
++template <class>
++struct C
++{
++  B pn;
++};
++struct D
++{
++  char *getStr ();
++};
++struct E
++{
++};
++D EToD (E, unsigned = 0x4406U);
++struct F;
++enum G
++{
++  GX1,
++  GX2,
++  GX3,
++  GX4,
++  GX5,
++  GX6,
++  GX7
++};
++struct H;
++typedef C <H> I;
++struct J {};
++template <typename T, bool, bool>
++struct K
++{
++  typedef T param_type;
++};
++template <typename T>
++struct L
++{
++  typedef T const_reference;
++  typedef typename K <T, false, false>::param_type param_type;
++};
++struct M;
++template <bool, typename, typename>
++struct N;
++template <typename T1, typename T2>
++struct N <false, T1, T2>
++{
++  typedef T2 type;
++};
++template <typename T1 = M, typename T2 = M, typename T3 = M>
++struct O
++{
++  typedef N <static_cast <bool> (T1::value), T2, T3> almost_type_;
++  typedef typename almost_type_::type type;
++};
++template <typename T>
++struct P
++{
++  typedef T type;
++};
++template <typename>
++struct Q
++{
++};
++template <typename T>
++struct R
++{
++  typedef T *TP;
++  typedef TP R::*type;
++};
++template <typename DerivedT, typename BaseT = Q <DerivedT> >
++struct S : BaseT
++{
++  typedef R <DerivedT> impl_t;
++  typedef typename impl_t::type bool_type;
++  operator bool_type ();
++};
++template <typename = J>
++struct U : public S <U <> >
++{
++};
++struct parser_tag_base
++{
++};
++struct parser_address_tag : parser_tag_base
++{
++};
++struct iteration_policy;
++struct action_policy;
++struct U_policy;
++template <typename = iteration_policy, typename = U_policy, typename = action_policy>
++struct scanner_policies;
++template <typename = char *, typename = scanner_policies <> >
++struct scanner;
++struct iteration_policy
++{
++};
++struct U_policy
++{
++  template <typename>
++  struct result
++  {
++    typedef U <> type;
++  };
++};
++template <typename MatchPolicyT, typename T>
++struct U_result
++{
++  typedef typename MatchPolicyT::template result <T>::type type;
++};
++struct action_policy
++{
++};
++template <typename IterationPolicyT, typename MatchPolicyT, typename ActionPolicyT>
++struct scanner_policies:public IterationPolicyT, MatchPolicyT, ActionPolicyT
++{
++};
++struct scanner_base;
++template <typename IteratorT, typename PoliciesT>
++struct scanner : public PoliciesT
++{
++  typedef typename L <IteratorT>::param_type iter_param_t;
++  scanner (IteratorT, iter_param_t, PoliciesT = PoliciesT ()) : PoliciesT (), first (), last () {}
++  IteratorT first;
++  IteratorT last;
++};
++template <typename, typename>
++struct action;
++template <typename ParserT, typename ScannerT>
++struct parser_result
++{
++  typedef typename P <ParserT>::type parser_type;
++  typedef typename parser_type::template result <ScannerT>::type type;
++};
++template <typename DerivedT>
++struct parser
++{
++  typedef DerivedT embed_t;
++  template <typename ScannerT>
++  struct result
++  {
++    typedef typename U_result <ScannerT, J>::type type;
++  };
++  DerivedT derived () const;
++  template <typename ActionT>
++  action <DerivedT, ActionT> operator[] (ActionT);
++};
++template <typename = char *>
++struct parse_info
++{
++};
++struct space_parser;
++template <typename SkipT>
++struct phrase_parser
++{
++  template <typename IteratorT, typename ParserT>
++  static parse_info <> parse (IteratorT first_, IteratorT last, ParserT p, space_parser const &)
++  {
++    typedef scanner <> scanner_t;
++    IteratorT first = first_;
++    scanner_t scan (first, last);
++    U <> hit = p.parse (scan);
++    return parse_info <> ();
++  }
++};
++template <typename IteratorT, typename ParserT, typename SkipT>
++parse_info <> parse (IteratorT first, IteratorT last, parser <ParserT> p, parser <SkipT> skip)
++{
++  phrase_parser <SkipT>::parse (first, last, p.derived (), skip.derived ());
++  return parse_info <> ();
++}
++template <typename DerivedT>
++struct char_parser : public parser <DerivedT>
++{
++};
++template <typename = char>
++struct chlit : public char_parser <chlit <> >
++{
++};
++template <typename = char *>
++struct strlit : public parser <strlit <> >
++{
++};
++template <typename CharT>
++strlit <CharT *> str_p (CharT)
++{
++  return strlit <CharT *> ();
++}
++struct space_parser : public char_parser <space_parser>
++{
++};
++space_parser space_p = space_parser ();
++struct end_parser : public parser <end_parser>
++{
++};
++end_parser end_p = end_parser ();
++template <class, class, bool, bool, bool>
++struct compressed_pair_switch;
++template <class T1, class T2>
++struct compressed_pair_switch <T1, T2, false, false, false>
++{
++  static const int value = 0;
++};
++template <class, class, int>
++struct compressed_pair_imp;
++template <class T1, class T2>
++struct compressed_pair_imp <T1, T2, 0>
++{
++  typedef T1 first_type;
++  typedef T2 second_type;
++  typedef typename L <first_type>::param_type first_param_type;
++  typedef typename L <second_type>::param_type second_param_type;
++  compressed_pair_imp (first_param_type x, second_param_type y) : first_ (x), second_ (y) {}
++  first_type first_;
++  second_type second_;
++};
++template <class T1, class T2>
++struct compressed_pair : private compressed_pair_imp <T1, T2, compressed_pair_switch <T1, T2, false, false, false>::value>
++{
++  typedef compressed_pair_imp <T1, T2, compressed_pair_switch <T1, T2, false, false, false>::value> base;
++  typedef T1 first_type;
++  typedef T2 second_type;
++  typedef typename L <first_type>::param_type first_param_type;
++  typedef typename L <second_type>::param_type second_param_type;
++  compressed_pair (first_param_type x, second_param_type y):base (x, y) {}
++};
++template <typename S, typename BaseT>
++struct unary : public BaseT
++{
++  typedef typename S::embed_t subject_embed_t;
++  subject_embed_t subj;
++};
++template <typename A, typename B, typename BaseT>
++struct binary : public BaseT
++{
++  typedef BaseT base_t;
++  typedef typename L <A>::param_type left_param_t;
++  typedef typename L <A>::const_reference left_return_t;
++  typedef typename L <B>::param_type right_param_t;
++  typedef typename A::embed_t left_embed_t;
++  typedef typename B::embed_t right_embed_t;
++  binary (left_param_t a, right_param_t b) : base_t (), subj (a, b) {}
++  left_return_t left ();
++  compressed_pair <left_embed_t, right_embed_t> subj;
++};
++struct parser_context_base
++{
++};
++template <typename>
++struct parser_context_linker;
++template <typename AttrT = J>
++struct parser_context : parser_context_base
++{
++  typedef AttrT attr_t;
++  typedef parser_context_linker <parser_context <> > context_linker_t;
++};
++template <typename ContextT, typename DerivedT>
++struct context_aux : public ContextT::base_t::template aux <DerivedT>
++{
++};
++template <typename ContextT>
++struct parser_context_linker : ContextT
++{
++};
++template <class T>
++struct scoped_ptr
++{
++  T *px;
++  scoped_ptr (T * = 0) {}
++};
++template < typename Base, typename Derived > struct is_base_and_derived
++{
++  static const bool value = false;
++};
++template <typename BaseT, typename DefaultT, typename T0, typename T1, typename T2>
++struct get_param
++{
++  typedef typename O <is_base_and_derived <BaseT, T0>, T0, typename O <is_base_and_derived <BaseT, T1>, T1, typename O <is_base_and_derived <BaseT, T2>, T2, DefaultT>::type>::type>::type type;
++};
++template <typename T0, typename T1, typename T2>
++struct get_context
++{
++  typedef typename get_param <parser_context_base, parser_context <>, T0, T1, T2>::type type;
++};
++template <typename T0, typename T1, typename T2>
++struct get_tag
++{
++  typedef typename get_param <parser_tag_base, parser_address_tag, T0, T1, T2>::type type;
++};
++template <typename T0, typename T1, typename T2>
++struct get_scanner
++{
++  typedef typename get_param <scanner_base, scanner <>, T0, T1, T2>::type type;
++};
++template <typename DerivedT, typename, typename T0, typename T1, typename T2>
++struct rule_base : parser <DerivedT>, get_tag <T0, T1, T2>::type
++{
++  typedef typename get_scanner <T0, T1, T2>::type scanner_t;
++  typedef typename get_context <T0, T1, T2>::type context_t;
++  typedef typename context_t::context_linker_t linked_context_t;
++  typedef typename linked_context_t::attr_t attr_t;
++};
++template <typename ScannerT, typename AttrT>
++struct abstract_parser
++{
++  virtual ~abstract_parser () {}
++};
++template <typename ParserT, typename ScannerT, typename AttrT>
++struct concrete_parser : abstract_parser <ScannerT, AttrT>
++{
++  concrete_parser (ParserT const &p) : p (p) {}
++  virtual abstract_parser <ScannerT, AttrT> *
++  clone ()
++  {
++    return new concrete_parser (p);
++  }
++  typename ParserT::embed_t p;
++};
++template <typename T0, typename T1 = J, typename T2 = J>
++struct rule : rule_base <rule <T2>, rule <T0>, T0, T1, T2>
++{
++  typedef rule <T2> base_t;
++  typedef typename base_t::scanner_t scanner_t;
++  typedef typename base_t::attr_t attr_t;
++  typedef abstract_parser <scanner_t, attr_t> abstract_parser_t;
++  rule () : ptr () {}
++  template <typename ParserT>
++  rule (ParserT const &p) : ptr (new concrete_parser <ParserT, scanner_t, attr_t> (p))
++  {
++  }
++  scoped_ptr <abstract_parser_t> ptr;
++};
++template <typename, typename>
++struct grammar;
++template <typename DerivedT, typename ContextT, typename ScannerT>
++typename DerivedT::template definition <ScannerT> get_definition (grammar <DerivedT, ContextT> *self)
++{
++  typedef typename DerivedT::template definition <ScannerT> definition_t;
++  definition_t d (self->derived ());
++  return d;
++}
++template <int, typename DerivedT, typename ContextT, typename ScannerT>
++typename parser_result <grammar <DerivedT, ContextT>, ScannerT>::type
++grammar_parser_parse (grammar < DerivedT, ContextT > *self, ScannerT)
++{
++  typedef typename parser_result <grammar <DerivedT, ContextT>, ScannerT>::type result_t;
++  get_definition <DerivedT, ContextT, ScannerT> (self);
++  return result_t ();
++}
++template <typename DerivedT, typename ContextT = parser_context <> >
++struct grammar : parser <DerivedT>
++{
++  typedef grammar <DerivedT> self_t;
++  template <typename ScannerT>
++  typename parser_result <self_t, ScannerT>::type parse_main (ScannerT & scan)
++  {
++    typedef typename parser_result <self_t, ScannerT>::type tt;
++    grammar_parser_parse <0> (this, scan);
++    return tt ();
++  }
++  template <typename ScannerT>
++  typename parser_result <self_t, ScannerT>::type parse (ScannerT & scan)
++  {
++    return parse_main (scan);
++  }
++};
++template <typename ParserT, typename ActionT>
++struct action : unary <ParserT, parser <action <ParserT, ActionT> > >
++{
++  ActionT actor;
++};
++template <typename A, typename B>
++struct sequence : binary <A, B, parser <sequence <A, B> > >
++{
++  typedef sequence <A, B> self_t;
++  template <typename ScannerT>
++  typename parser_result <self_t, ScannerT>::type parse (ScannerT & scan)
++  {
++    typedef typename parser_result <self_t, ScannerT>::type result_t;
++    if (result_t ma = this->left ().parse (scan))
++      {
++      }
++    return this->left ().parse (scan);
++  }
++};
++template <typename A, typename B>
++sequence <A, B> operator>> (parser <A>, parser <B>);
++template <typename B>
++sequence <chlit <>, B> operator>> (char, parser <B>);
++template <typename A, typename B>
++struct alternative : binary <A, B, parser <alternative <A, B> > >
++{
++  typedef alternative <A, B> self_t;
++  typedef binary <A, B, parser <self_t> > base_t;
++  alternative (A const &a, B const &b):
++  base_t (a, b) {}
++};
++template <typename A, typename B>
++alternative <A, B> operator| (parser <A> const &a, parser <B> const &b)
++{
++  alternative <A, B> c (a.derived (), b.derived ());
++  return c;
++}
++namespace
++{
++  typedef char *StringIteratorT;
++  struct ParserContext;
++  typedef C <ParserContext> ParserContextSharedPtr;
++  struct EnumFunctor
++  {
++    G meFunct;
++    double mnValue;
++    ParserContextSharedPtr mpContext;
++    EnumFunctor (G, ParserContextSharedPtr):
++    mpContext () {}
++  };
++  struct BinaryFunctionFunctor
++  {
++    G meFunct;
++    ParserContextSharedPtr mpContext;
++    BinaryFunctionFunctor (G, ParserContextSharedPtr):
++    mpContext () {}
++  };
++  struct ExpressionGrammar : grammar <ExpressionGrammar>
++  {
++    ExpressionGrammar (ParserContextSharedPtr) {}
++    template <typename ScannerT>
++    struct definition
++    {
++      definition (ExpressionGrammar self)
++      {
++	id = str_p ("pi")[EnumFunctor (GX1, self.getContext ())] |
++	     str_p ("left")[EnumFunctor (GX2, self.getContext ())] |
++	     str_p ("bottom")[EnumFunctor (GX3, self.getContext ())] |
++	     str_p ("xstretch")[EnumFunctor (GX4, self.getContext ())] |
++	     str_p ("ystretch")[EnumFunctor (GX5, self.getContext ())] |
++	     modifierReference |
++	     (('+' >> multiplicativeExpression)[BinaryFunctionFunctor (GX6, self.getContext ())] |
++	      ('-' >> multiplicativeExpression)[BinaryFunctionFunctor (GX7, self.getContext ())]);
++      }
++      rule <ScannerT> multiplicativeExpression;
++      rule <ScannerT> modifierReference;
++      rule <ScannerT> id;
++    };
++    ParserContextSharedPtr getContext ();
++  };
++}
++void
++FunctionParser (E rFunction, F &)
++{
++  D rAsciiFunction (EToD (rFunction, 11U));
++  StringIteratorT aStart (rAsciiFunction.getStr ());
++  StringIteratorT aEnd;
++  ParserContextSharedPtr pContext;
++  ExpressionGrammar aExpressionGrammer (pContext);
++  parse_info <> x (parse (aStart, aEnd, aExpressionGrammer >> end_p, space_p));
++}
+diff --git a/libgcc/config/ia64/crtbegin.S b/libgcc/config/ia64/crtbegin.S
+index c03e35a17fe..37aa90498e8 100644
+--- a/libgcc/config/ia64/crtbegin.S
++++ b/libgcc/config/ia64/crtbegin.S
+@@ -185,3 +185,7 @@ __do_global_dtors_aux:
+ .weak __cxa_finalize
+ #endif
+ .weak _Jv_RegisterClasses
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+diff --git a/libgcc/config/ia64/crtend.S b/libgcc/config/ia64/crtend.S
+index 91e82db6cfe..a7a7929c67e 100644
+--- a/libgcc/config/ia64/crtend.S
++++ b/libgcc/config/ia64/crtend.S
+@@ -114,3 +114,7 @@ __do_global_ctors_aux:
+ 
+ 	br.ret.sptk.many rp
+ 	.endp __do_global_ctors_aux
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+diff --git a/libgcc/config/ia64/crti.S b/libgcc/config/ia64/crti.S
+index aad51e6288f..1d382d6a9c5 100644
+--- a/libgcc/config/ia64/crti.S
++++ b/libgcc/config/ia64/crti.S
+@@ -51,3 +51,7 @@ _fini:
+ 	.body
+ 
+ # end of crti.S
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+diff --git a/libgcc/config/ia64/crtn.S b/libgcc/config/ia64/crtn.S
+index af551991700..2fe28ee945c 100644
+--- a/libgcc/config/ia64/crtn.S
++++ b/libgcc/config/ia64/crtn.S
+@@ -41,3 +41,7 @@
+ 	br.ret.sptk.many b0
+ 
+ # end of crtn.S
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+diff --git a/libgcc/config/ia64/lib1funcs.S b/libgcc/config/ia64/lib1funcs.S
+index 452809ebe11..fee0e821348 100644
+--- a/libgcc/config/ia64/lib1funcs.S
++++ b/libgcc/config/ia64/lib1funcs.S
+@@ -793,3 +793,7 @@ __floattitf:
+ 	.endp __floattitf
+ #endif
+ #endif
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
+index aeac22bf1e4..e4e6afbe63e 100644
+--- a/libgcc/crtstuff.c
++++ b/libgcc/crtstuff.c
+@@ -336,15 +336,15 @@ register_tm_clones (void)
+    doesn't need to be defined.  */
+ 
+ #ifdef TARGET_LIBGCC_SDATA_SECTION
+-extern void *__dso_handle __attribute__ ((__section__ (TARGET_LIBGCC_SDATA_SECTION)));
++extern void *const __dso_handle __attribute__ ((__section__ (TARGET_LIBGCC_SDATA_SECTION)));
+ #endif
+ #ifdef HAVE_GAS_HIDDEN
+-extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
++extern void *const __dso_handle __attribute__ ((__visibility__ ("hidden")));
+ #endif
+ #ifdef CRTSTUFFS_O
+-void *__dso_handle = &__dso_handle;
++void *const __dso_handle = (void * const)&__dso_handle;
+ #else
+-void *__dso_handle = 0;
++void *const __dso_handle = 0;
+ #endif
+ #endif /* DEFAULT_USE_CXA_ATEXIT */
+ 
+-- 
+2.52.0
+

diff --git a/gcc.spec b/gcc.spec
index af09678..cc368a2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,19 @@
-%global DATE 20260515
-%global gitrev d776f42bb910ebccf652b010b80c22bcca736f7f
-%global gcc_version 16.1.1
-%global gcc_major 16
+%global snapshot_build 1
+%global DATE 20260514
+%global gitrev c1f6fd0c61bf30333a5f2101b7bac6e487c56964
+%global gcc_version 17.0.0
+%global gcc_major 17
 # Note, gcc_release must be integer, if you want to add suffixes to
-# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 2
+# %%{release}, set gcc_release_suffix.
+%if %{snapshot_build}
+%global snapext s
+%global gcc_release 999
+%global gcc_release_suffix .%{DATE}%{snapext}.0
+%else
+%global gcc_release 0
+%global gcc_release_suffix .11
+%endif
+%global gcc_basedir gcc-%{version}-%{DATE}%{?snapext}
 %global nvptx_tools_gitrev 212da2e781ed0f9423824e85eb04819958513f7a
 %global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99
 %global _unpackaged_files_terminate_build 0
@@ -156,10 +165,30 @@
 %else
 %global build_annobin_plugin 0
 %endif
+# A snapshot build only has C, C++ and Fortran support.  Explicitly disable
+# everything else.
+%if %{snapshot_build}
+%global build_ada 0
+%global build_cobol 0
+%global build_d 0
+%global build_go 0
+%global build_isl 0
+%global build_libasan 0
+%global build_libatomic 0
+%global build_libhwasan 0
+%global build_libitm 0
+%global build_liblsan 0
+%global build_libtsan 0
+%global build_libubsan 0
+%global build_m2 0
+%global build_objc 0
+%global build_offload_amdgcn 0
+%global build_offload_nvptx 0
+%endif
 Summary: Various compilers (C, C++, Objective-C, ...)
 Name: gcc
 Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
+Release: %{gcc_release}%{?gcc_release_suffix}%{?dist}
 # License notes for some of the less obvious ones:
 #   gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
 #   isl: MIT, BSD-2-Clause
@@ -168,16 +197,18 @@ Release: %{gcc_release}%{?dist}
 # All of the remaining license soup is in newlib.
 License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
 # The source for this package was pulled from upstream's vcs.
-# %%{gitrev} is some commit from the
+# For release packages, %%{gitrev} is some commit from the
 # https://gcc.gnu.org/git/?p=gcc.git;h=refs/vendors/redhat/heads/gcc-%%{gcc_major}-branch
-# branch.  Use the following command to generate the tarball:
+# branch.  For snapshots this git ref is from trunk.
+#
+# Use the following command to generate the tarball:
 # ./update-gcc.sh %%{gitrev}
 # optionally if say /usr/src/gcc/.git/ is an existing gcc git clone
 # ./update-gcc.sh %%{gitrev} /usr/src/gcc/.git/
 # to speed up the clone operations.  Note, %%{gitrev} macro in
 # gcc.spec shouldn't be updated before running the script, the script
 # will update it, fill in some %%changelog details etc.
-Source0: gcc-%{version}-%{DATE}.tar.xz
+Source0: %{gcc_basedir}.tar.xz
 # The source for nvptx-tools package was pulled from upstream's vcs.  Use the
 # following commands to generate the tarball:
 # git clone --depth 1 https://github.com/MentorEmbedded/nvptx-tools.git nvptx-tools-dir.tmp
@@ -311,22 +342,26 @@ Provides: bundled(libbacktrace)
 Provides: bundled(libffi)
 Provides: gcc(major) = %{gcc_major}
 
-Patch0: gcc16-hack.patch
-Patch2: gcc16-sparc-config-detection.patch
-Patch3: gcc16-libgomp-omp_h-multilib.patch
-Patch4: gcc16-libtool-no-rpath.patch
-Patch5: gcc16-isl-dl.patch
-Patch6: gcc16-isl-dl2.patch
-Patch7: gcc16-libstdc++-docs.patch
-Patch8: gcc16-no-add-needed.patch
-Patch9: gcc16-Wno-format-security.patch
-Patch10: gcc16-rh1574936.patch
-Patch11: gcc16-d-shared-libphobos.patch
-Patch12: gcc16-pr119006.patch
+# Only used for snapshot builds; the vendor branch upstream has these changes
+# in the branch itself.
+Patch0: gcc-redhat-customizations.patch
+
+Patch1: gcc17-hack.patch
+Patch2: gcc17-sparc-config-detection.patch
+Patch3: gcc17-libgomp-omp_h-multilib.patch
+Patch4: gcc17-libtool-no-rpath.patch
+Patch5: gcc17-isl-dl.patch
+Patch6: gcc17-isl-dl2.patch
+Patch7: gcc17-libstdc++-docs.patch
+Patch8: gcc17-no-add-needed.patch
+Patch9: gcc17-Wno-format-security.patch
+Patch10: gcc17-rh1574936.patch
+Patch11: gcc17-d-shared-libphobos.patch
+Patch12: gcc17-pr119006.patch
 
 Patch50: isl-rh2155127.patch
 
-Patch100: gcc16-fortran-fdec-duplicates.patch
+Patch100: gcc17-fortran-fdec-duplicates.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -965,8 +1000,11 @@ of the plugin is explicitly built by the same version of gcc that is installed
 so that there cannot be any synchronization problems.
 
 %prep
-%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3
-%autopatch -p0 -m 0 -M 4
+%setup -q -n %{gcc_basedir} -a 1 -a 2 -a 3
+%if %{snapshot_build}
+%patch -P 0 -p1
+%endif
+%autopatch -p0 -m 1 -M 4
 %if %{build_isl}
 %autopatch -p0 -m 5 -M 6
 %endif
@@ -990,7 +1028,7 @@ rm -f gcc/testsuite/go.test/test/fixedbugs/issue19182.go
 rm -f libphobos/testsuite/libphobos.gc/forkgc2.d
 #rm -rf libphobos/testsuite/libphobos.gc
 
-echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
+echo 'Red Hat %{version}-%{gcc_release}%{gcc_release_suffix}' > gcc/DEV-PHASE
 
 ./contrib/gcc_update --touch
 
@@ -1366,6 +1404,9 @@ CONFIGURE_OPTS="\
 %if %{build_libitm} == 0
 	--disable-libitm \
 %endif
+%if %{snapshot_build}
+	--disable-libsanitizer \
+%endif
 	"
 
 CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
@@ -1514,10 +1555,10 @@ tar xf %{_usrsrc}/annobin/latest-annobin.tar.xz
 cd annobin*
 touch aclocal.m4 configure Makefile.in */configure */config.h.in */Makefile.in
 ANNOBIN_FLAGS=../../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags
-ANNOBIN_CFLAGS1="%build_cflags -I %{_builddir}/gcc-%{version}-%{DATE}/gcc"
-ANNOBIN_CFLAGS1="$ANNOBIN_CFLAGS1 -I %{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/gcc"
-ANNOBIN_CFLAGS2="-I %{_builddir}/gcc-%{version}-%{DATE}/include -I %{_builddir}/gcc-%{version}-%{DATE}/libcpp/include"
-ANNOBIN_LDFLAGS="%build_ldflags -L%{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs"
+ANNOBIN_CFLAGS1="%build_cflags -I %{_builddir}/%{gcc_basedir}/gcc"
+ANNOBIN_CFLAGS1="$ANNOBIN_CFLAGS1 -I %{_builddir}/%{gcc_basedir}/obj-%{gcc_target_platform}/gcc"
+ANNOBIN_CFLAGS2="-I %{_builddir}/%{gcc_basedir}/include -I %{_builddir}/%{gcc_basedir}/libcpp/include"
+ANNOBIN_LDFLAGS="%build_ldflags -L%{_builddir}/%{gcc_basedir}/obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs"
 CC="`$ANNOBIN_FLAGS --build-cc`" CXX="`$ANNOBIN_FLAGS --build-cxx`" \
   CFLAGS="$ANNOBIN_CFLAGS1 $ANNOBIN_CFLAGS2 $ANNOBIN_LDFLAGS" \
   CXXFLAGS="$ANNOBIN_CFLAGS1 `$ANNOBIN_FLAGS --build-includes` $ANNOBIN_CFLAGS2 $ANNOBIN_LDFLAGS" \
@@ -1744,9 +1785,9 @@ mv %{buildroot}%{_prefix}/%{_lib}/libga68.spec $FULLPATH/
 %endif
 
 mkdir -p %{buildroot}/%{_lib}
-mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
-chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
-ln -sf libgcc_s-%{gcc_major}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
+mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}%{?snapext}.so.1
+chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}%{?snapext}.so.1
+ln -sf libgcc_s-%{gcc_major}-%{DATE}%{?snapext}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
 %ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} aarch64 riscv64
 rm -f $FULLPATH/libgcc_s.so
 echo '/* GNU ld script
@@ -2586,7 +2627,7 @@ ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \
 %if %{build_annobin_plugin}
 mkdir -p $FULLPATH/plugin
 rm -f $FULLPATH/plugin/gcc-annobin*
-cp -a %{_builddir}/gcc-%{version}-%{DATE}/annobin-plugin/annobin*/gcc-plugin/.libs/annobin.so.0.0.0 \
+cp -a %{_builddir}/%{gcc_basedir}/annobin-plugin/annobin*/gcc-plugin/.libs/annobin.so.0.0.0 \
   $FULLPATH/plugin/gcc-annobin.so.0.0.0
 ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so.0
 ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so
@@ -3116,7 +3157,7 @@ end
 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1
 
 %files -n libgcc
-/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
+/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}%{?snapext}.so.1
 /%{_lib}/libgcc_s.so.1
 %{!?_licensedir:%global license %%doc}
 %license gcc/COPYING* COPYING.RUNTIME
@@ -3980,42 +4021,72 @@ end
 %endif
 
 %changelog
-* Fri May 15 2026 Jakub Jelinek <jakub@redhat.com> 16.1.1-2
-- update from releases/gcc-16 branch
-  - PRs ada/125168, ada/125240, c++/100903, c++/115181, c++/124628,
-	c++/124770, c++/124957, c++/124979, c++/124991, c++/125043,
-	c++/125111, c++/125115, c++/125179, c++/125184, c++/125206,
-	c++/125208, c++/125280, c++/125315, d/125089, fortran/111952,
-	fortran/125059, fortran/125192, fortran/125198, libfortran/125095,
-	libstdc++/109965, libstdc++/121919, middle-end/125146,
-	middle-end/125259, rtl-optimization/123967, target/53929,
-	target/120587, target/124316, target/125049, target/125057,
-	target/125155, target/125180, target/125194, target/125308,
-	tree-optimization/120003, tree-optimization/125025,
-	tree-optimization/125153, tree-optimization/125185
-- create and include ga68.m68 files in gcc-algol68 package (#2463921)
-
-* Fri May  1 2026 Jakub Jelinek <jakub@redhat.com> 16.1.1-1
-- update from trunk and releases/gcc-16 branch
-  - GCC 16.1.0 release
-  - PRs ada/107391, ada/107392, ada/124918, ada/125044, c/84717, c++/120502,
-	c++/123879, c++/124582, c++/124632, c++/124706, c++/124756,
-	c++/124855, c++/124910, c++/124926, c++/124927, c++/124944,
-	c++/124950, c++/124953, c++/124973, c++/124981, c++/124989,
-	c++/125035, c++/125096, cobol/119818, d/123411, d/124157, d/124922,
-	fortran/63858, fortran/93329, fortran/93463, fortran/108382,
-	fortran/117077, fortran/120431, ipa/120098, libfortran/120431,
-	libstdc++/112490, libstdc++/119714, libstdc++/124410,
-	libstdc++/124540, libstdc++/124890, libstdc++/125024,
-	libstdc++/125112, middle-end/95551, middle-end/122021,
-	middle-end/124900, middle-end/124971, modula2/120189,
-	preprocessor/124930, rtl-optimization/124643, sanitizer/124248,
-	sanitizer/124969, target/103383, target/124133, target/124933,
-	target/124959, target/124984, target/125117, testsuite/124682,
-	testsuite/124939, tree-optimization/116463, tree-optimization/124909,
-	tree-optimization/124941, tree-optimization/124988,
-	tree-optimization/125019, tree-optimization/125039,
-	tree-optimization/125079
+* Thu May 14 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-17.0.0-999.20260514s.0
+- update from trunk
+  - PRs ada/87936, ada/110336, ada/125044, ada/125168, ada/125232, ada/125240,
+	analyzer/105890, analyzer/124217, c/121911, c/124303, c/124576,
+	c/124985, c/125261, c++/50479, c++/62244, c++/65271, c++/100903,
+	c++/115181, c++/115314, c++/119567, c++/123609, c++/124241,
+	c++/124347, c++/124582, c++/124621, c++/124628, c++/124756,
+	c++/124770, c++/124910, c++/124953, c++/124957, c++/124978,
+	c++/124979, c++/124991, c++/125007, c++/125022, c++/125035,
+	c++/125043, c++/125096, c++/125111, c++/125115, c++/125179,
+	c++/125184, c++/125206, c++/125208, c++/125280, d/125089,
+	fortran/111952, fortran/125021, fortran/125051, fortran/125059,
+	fortran/125092, fortran/125172, fortran/125192, fortran/125198,
+	libfortran/125005, libfortran/125087, libfortran/125095,
+	libstdc++/71301, libstdc++/78302, libstdc++/97001, libstdc++/109965,
+	libstdc++/113761, libstdc++/114400, libstdc++/119126,
+	libstdc++/121919, libstdc++/123165, libstdc++/124657,
+	libstdc++/124851, libstdc++/124852, libstdc++/125024,
+	libstdc++/125112, middle-end/117871, middle-end/122871,
+	middle-end/124637, middle-end/124651, middle-end/124805,
+	middle-end/125146, middle-end/125156, middle-end/125259,
+	modula2/120189, other/125275, rtl-optimization/56096,
+	rtl-optimization/80770, rtl-optimization/96692,
+	rtl-optimization/121426, rtl-optimization/123967,
+	rtl-optimization/124766, rtl-optimization/125209, target/32803,
+	target/53929, target/109038, target/113353, target/113948,
+	target/120077, target/120144, target/120587, target/120870,
+	target/121268, target/122558, target/122665, target/123838,
+	target/123839, target/123904, target/124009, target/124133,
+	target/124316, target/124559, target/124760, target/124878,
+	target/124895, target/124955, target/124984, target/125009,
+	target/125026, target/125032, target/125049, target/125057,
+	target/125100, target/125102, target/125117, target/125152,
+	target/125155, target/125174, target/125180, target/125194,
+	target/125215, target/125217, target/125238, target/125239,
+	target/125245, testsuite/70150, testsuite/125003,
+	tree-optimization/57650, tree-optimization/64567,
+	tree-optimization/93504, tree-optimization/93556,
+	tree-optimization/94892, tree-optimization/106244,
+	tree-optimization/109878, tree-optimization/110010,
+	tree-optimization/110262, tree-optimization/112659,
+	tree-optimization/113379, tree-optimization/116008,
+	tree-optimization/116700, tree-optimization/116823,
+	tree-optimization/119420, tree-optimization/119422,
+	tree-optimization/120003, tree-optimization/120398,
+	tree-optimization/122569, tree-optimization/122679,
+	tree-optimization/122989, tree-optimization/122996,
+	tree-optimization/123120, tree-optimization/123514,
+	tree-optimization/123603, tree-optimization/123966,
+	tree-optimization/124061, tree-optimization/124151,
+	tree-optimization/124222, tree-optimization/124560,
+	tree-optimization/124715, tree-optimization/124843,
+	tree-optimization/124886, tree-optimization/124946,
+	tree-optimization/124947, tree-optimization/124988,
+	tree-optimization/125019, tree-optimization/125025,
+	tree-optimization/125036, tree-optimization/125039,
+	tree-optimization/125067, tree-optimization/125079,
+	tree-optimization/125080, tree-optimization/125088,
+	tree-optimization/125124, tree-optimization/125139,
+	tree-optimization/125153, tree-optimization/125174,
+	tree-optimization/125185, tree-optimization/125214,
+	tree-optimization/125234, tree-optimization/125250
+
+* Fri Apr 24 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-17.0.0-999.20260424s.0
+- update from trunk
+  - PRs 
 
 * Thu Apr 16 2026 Jakub Jelinek <jakub@redhat.com> 16.0.1-0.11
 - update from trunk
@@ -4068,6 +4139,34 @@ end
 	tree-optimization/124826, tree-optimization/124868,
 	tree-optimization/124875, tree-optimization/124891
 
+* Thu Apr 02 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-16.0.1-999.20260402s.0
+- update from trunk
+  - PRs ada/124596, c/61896, c/124635, c++/124645, c++/124646, fortran/79330,
+	fortran/84245, fortran/95879, fortran/100194, fortran/102619,
+	fortran/121185, fortran/124631, fortran/124656, fortran/124661,
+	fortran/124666, fortran/124739, fortran/124751, libfortran/124543,
+	middle-end/124634, middle-end/124671, middle-end/124697,
+	preprocessor/70917, rtl-optimization/124649, rtl-optimization/124696,
+	target/102309, target/120839, target/123238, target/124670,
+	target/124674, target/124684, target/124705, target/124712,
+	testsuite/93080, testsuite/124548, tree-optimization/88576,
+	tree-optimization/124677, tree-optimization/124692,
+	tree-optimization/124742, tree-optimization/124746
+
+* Fri Mar 27 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-16.0.1-0.snap20260327.0
+- update from trunk
+  - PRs c++/123613, debug/124644, fortran/101281, fortran/114021,
+	fortran/115315, libgomp/124123, target/124613
+
+* Thu Mar 26 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-16.0.1-0.snap20260326.0
+- update from trunk
+  - PRs fortran/119273, fortran/124567, gcov-profile/121074,
+	tree-optimization/124627
+
+* Tue Mar 24 2026 Siddhesh Poyarekar <siddhesh@redhat.com> gcc-16.0.1-0.snap20260324.0
+- update from trunk
+  - PRs 
+
 * Sat Mar 21 2026 Jakub Jelinek <jakub@redhat.com> 16.0.1-0.10
 - update from trunk
   - PRs ada/107475, ada/120669, ada/124369, ada/124376, algol68/124322,
@@ -4352,6 +4451,27 @@ end
   as-needed by default
 - remove libatomic-static package, move libatomic.a into gcc package
 
+* Mon Dec 29 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251229.0
+- update from trunk
+  - PRs ada/123185, ada/123289, ada/123302, ada/123306, c++/117518,
+	c++/121864, c++/122550, c++/122958, c++/122994, c++/123261,
+	fortran/121472, fortran/121475, fortran/122957, fortran/123201,
+	fortran/123253, middle-end/123067, rtl-optimization/123114,
+	rtl-optimization/123267, rtl-optimization/123276, target/122769,
+	target/123274, target/123278, target/123283
+
+* Sun Dec 21 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251221.0
+- update from trunk
+  - PRs bootstrap/12407, c++/91388, c++/117034, c++/122509, c++/122690,
+	c++/122712, c++/122772, c++/122834, c++/122922, c++/122995,
+	c++/123030, c++/123044, c++/123186, debug/122968, fortran/71565,
+	fortran/92613, libstdc++/123147, middle-end/123222,
+	rtl-optimization/123223, target/55212, target/122970, target/123216,
+	target/123217, tree-optimization/123089, tree-optimization/123097,
+	tree-optimization/123117, tree-optimization/123118,
+	tree-optimization/123152, tree-optimization/123192,
+	tree-optimization/123205
+
 * Sat Dec 20 2025 Jakub Jelinek <jakub@redhat.com> 16.0.0-0.3
 - update from trunk
   - PRs bootstrap/12407, c/123156, c++/91388, c++/117034, c++/122070,
@@ -4367,3 +4487,58 @@ end
 
 * Thu Dec 18 2025 Jakub Jelinek <jakub@redhat.com> 16.0.0-0.2
 - new package
+
+* Thu Dec 18 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251218.0
+- update from trunk
+  - PRs algol68/123006, algol68/123132, c/123156, c++/112652, c++/121443,
+	c++/122070, libstdc++/123180, modula2/23178, modula2/123151,
+	target/123171, testsuite/123166, tree-optimization/123153
+
+* Wed Dec 17 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251217.0
+- update from trunk
+  - PRs ada/123060, ada/123138, algol68/123131, analyzer/122003,
+	analyzer/122975, analyzer/123085, analyzer/123136, c++/114764,
+	c++/122668, c++/122752, c++/123075, c++/123128, diagnostics/123142,
+	driver/108866, ipa/107666, ipa/122456, ipa/122955, libfortran/122936,
+	libstdc++/113299, libstdc++/119739, libstdc++/122907, other/122243,
+	rtl-optimization/121852, rtl-optimization/122274, target/108866,
+	target/119404, target/123155, testsuite/123137,
+	tree-optimization/103680, tree-optimization/106409,
+	tree-optimization/119293, tree-optimization/122734,
+	tree-optimization/122987, tree-optimization/123032,
+	tree-optimization/123043, tree-optimization/123110,
+	tree-optimization/123111
+
+* Fri Dec 12 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251212.0
+- update from trunk
+  - PRs fortran/107406
+
+* Thu Dec 11 2025 Siddhesh Poyarekar <siddhesh@gotplt.org> gcc-16.0.0-0.snap20251211.0
+- update from trunk
+  - PRs ada/123062, ada/123088, ada/123096, fortran/107142, fortran/110012,
+	libstdc++/121114, middle-end/123069, testsuite/123098,
+	tree-optimization/123014
+
+* Wed Dec 10 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 16.0.0-0.snap20251210.0
+- update from trunk
+  - PRs ada/115305, ada/115349, ada/123037, algol68/123007, c/122982,
+	c/123018, c++/119343, c++/120446, c++/122819, fortran/103414,
+	fortran/122578, fortran/122669, fortran/122670, fortran/122693,
+	fortran/122977, fortran/123025, ipa/122798, libstdc++/80564,
+	libstdc++/110352, libstdc++/111327, libstdc++/111550,
+	libstdc++/112591, libstdc++/120446, libstdc++/122946,
+	middle-end/99782, rtl-optimization/122215, rtl-optimization/122675,
+	rtl-optimization/122947, target/80881, target/91420, target/115325,
+	target/121230, target/122343, target/122983, target/122991,
+	target/122999, target/123022, target/123026, target/123027,
+	testsuite/120167, tree-optimization/46555, tree-optimization/120939,
+	tree-optimization/122635, tree-optimization/122776,
+	tree-optimization/122868, tree-optimization/123002,
+	tree-optimization/123038, tree-optimization/123040,
+	tree-optimization/123074
+
+* Thu Dec  4 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 16.0.0-0.snap20251204.0
+- Create gnatgcc symlink only when building ada.
+- Avoid building libssp and disabled libraries.
+- First snapshot: update from trunk
+

diff --git a/gcc16-Wno-format-security.patch b/gcc16-Wno-format-security.patch
deleted file mode 100644
index 2a4f0f3..0000000
--- a/gcc16-Wno-format-security.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-2022-01-07  Jakub Jelinek  <jakub@redhat.com>
-
-	* Makefile.tpl (GOCFLAGS, GDCFLAGS): Filter out -Wformat-security.
-	* Makefile.in: Regenerated.
-
-2017-02-25  Jakub Jelinek  <jakub@redhat.com>
-
-	* configure.ac: When adding -Wno-format, also add -Wno-format-security.
-	* configure: Regenerated.
-
---- gcc/configure.ac.jj	2017-02-13 12:20:53.000000000 +0100
-+++ gcc/configure.ac	2024-11-30 13:34:11.100296256 +0100
-@@ -592,7 +592,7 @@ AC_ARG_ENABLE(build-format-warnings,
-   AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
-   [],[enable_build_format_warnings=yes])
- AS_IF([test $enable_build_format_warnings = no],
--      [wf_opt=-Wno-format],[wf_opt=])
-+      [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
- ACX_PROG_CXX_WARNING_OPTS(
- 	m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
- 		       [-Wcast-qual $wf_opt])),
---- gcc/configure.jj	2017-02-13 12:20:52.000000000 +0100
-+++ gcc/configure	2017-02-25 12:42:50.041946391 +0100
-@@ -7077,7 +7077,7 @@ else
- fi
- 
- if test $enable_build_format_warnings = no; then :
--  wf_opt=-Wno-format
-+  wf_opt="-Wno-format -Wno-format-security"
- else
-   wf_opt=
- fi
---- Makefile.tpl.jj	2023-11-29 13:21:41.680292662 +0100
-+++ Makefile.tpl	2024-11-30 13:35:29.303196246 +0100
-@@ -450,10 +450,10 @@ LDFLAGS = @LDFLAGS@
- LIBCFLAGS = $(CFLAGS)
- CXXFLAGS = @CXXFLAGS@
- LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
--GOCFLAGS = $(CFLAGS)
--A68FLAGS = @A68FLAGS@
--GDCFLAGS = @GDCFLAGS@
--GM2FLAGS = $(CFLAGS)
-+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
-+A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
-+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
-+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
- 
- CRAB1_LIBS = @CRAB1_LIBS@
- 
---- Makefile.in.jj	2023-11-29 13:21:41.691292507 +0100
-+++ Makefile.in	2024-11-30 13:36:12.113594079 +0100
-@@ -447,10 +447,10 @@ LDFLAGS = @LDFLAGS@
- LIBCFLAGS = $(CFLAGS)
- CXXFLAGS = @CXXFLAGS@
- LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
--GOCFLAGS = $(CFLAGS)
--A68FLAGS = @A68FLAGS@
--GDCFLAGS = @GDCFLAGS@
--GM2FLAGS = $(CFLAGS)
-+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
-+A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
-+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
-+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
- 
- CRAB1_LIBS = @CRAB1_LIBS@
- 

diff --git a/gcc16-d-shared-libphobos.patch b/gcc16-d-shared-libphobos.patch
deleted file mode 100644
index 6384bbb..0000000
--- a/gcc16-d-shared-libphobos.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-2019-01-17  Jakub Jelinek  <jakub@redhat.com>
-
-	* d-spec.cc (lang_specific_driver): Make -shared-libphobos
-	the default rather than -static-libphobos.
-
---- gcc/d/d-spec.cc.jj	2019-01-01 12:37:49.502444257 +0100
-+++ gcc/d/d-spec.cc	2019-01-17 17:09:45.364949246 +0100
-@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
-   /* Add `-lgphobos' if we haven't already done so.  */
-   if (phobos_library != PHOBOS_NOLINK)
-     {
--      /* Default to static linking.  */
--      if (phobos_library != PHOBOS_DYNAMIC)
--	phobos_library = PHOBOS_STATIC;
-+      /* Default to shared linking.  */
-+      if (phobos_library != PHOBOS_STATIC)
-+	phobos_library = PHOBOS_DYNAMIC;
- 
- #ifdef HAVE_LD_STATIC_DYNAMIC
-       if (phobos_library == PHOBOS_STATIC && !static_link)

diff --git a/gcc16-fortran-fdec-duplicates.patch b/gcc16-fortran-fdec-duplicates.patch
deleted file mode 100644
index 5298baa..0000000
--- a/gcc16-fortran-fdec-duplicates.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 23b1fcb104c666429451ffaf936f8da5fcd3d43a Mon Sep 17 00:00:00 2001
-From: Mark Eggleston <markeggleston@gcc.gnu.org>
-Date: Fri, 22 Jan 2021 12:29:47 +0000
-Subject: [PATCH 01/10] Allow duplicate declarations.
-
-Enabled by -fdec-duplicates and -fdec.
-
-Some fixes by Jim MacArthur <jim.macarthur@codethink.co.uk>
-Addition of -fdec-duplicates by Mark Eggleston <mark.eggleston@codethink.com>
----
- gcc/fortran/lang.opt                          |  4 ++++
- gcc/fortran/options.cc                        |  1 +
- gcc/fortran/symbol.cc                         | 21 +++++++++++++++++--
- .../gfortran.dg/duplicate_type_4.f90          | 13 ++++++++++++
- .../gfortran.dg/duplicate_type_5.f90          | 13 ++++++++++++
- .../gfortran.dg/duplicate_type_6.f90          | 13 ++++++++++++
- .../gfortran.dg/duplicate_type_7.f90          | 13 ++++++++++++
- .../gfortran.dg/duplicate_type_8.f90          | 12 +++++++++++
- .../gfortran.dg/duplicate_type_9.f90          | 12 +++++++++++
- 9 files changed, 100 insertions(+), 2 deletions(-)
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_4.f90
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_5.f90
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_6.f90
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_7.f90
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_8.f90
- create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_9.f90
-
-diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
-index 2b1977c523b..52bd522051e 100644
---- a/gcc/fortran/lang.opt
-+++ b/gcc/fortran/lang.opt
-@@ -469,6 +469,10 @@ Fortran Var(flag_dec_char_conversions)
- Enable the use of character literals in assignments and data statements
- for non-character variables.
- 
-+fdec-duplicates
-+Fortran Var(flag_dec_duplicates)
-+Allow varibles to be duplicated in the type specification matches.
-+
- fdec-include
- Fortran Var(flag_dec_include)
- Enable legacy parsing of INCLUDE as statement.
-diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
-index 3a0b98bf1ec..f19ba87f8a0 100644
---- a/gcc/fortran/options.cc
-+++ b/gcc/fortran/options.cc
-@@ -77,6 +77,7 @@ set_dec_flags (int value)
-   SET_BITFLAG (flag_dec_format_defaults, value, value);
-   SET_BITFLAG (flag_dec_blank_format_item, value, value);
-   SET_BITFLAG (flag_dec_char_conversions, value, value);
-+  SET_BITFLAG (flag_dec_duplicates, value, value);
- }
- 
- /* Finalize DEC flags.  */
-diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
-index 3b988d1be22..9843175cc2a 100644
---- a/gcc/fortran/symbol.cc
-+++ b/gcc/fortran/symbol.cc
-@@ -1995,6 +1995,8 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
-   if (sym->attr.result && type == BT_UNKNOWN && sym->ns->proc_name)
-     type = sym->ns->proc_name->ts.type;
- 
-+  flavor = sym->attr.flavor;
-+
-   if (type != BT_UNKNOWN && !(sym->attr.function && sym->attr.implicit_type)
-       && !(gfc_state_stack->previous && gfc_state_stack->previous->previous
- 	   && gfc_state_stack->previous->previous->state == COMP_SUBMODULE)
-@@ -2007,6 +2009,23 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
-       else if (sym->attr.function && sym->attr.result)
- 	gfc_error ("Symbol %qs at %L already has basic type of %s",
- 		   sym->ns->proc_name->name, where, gfc_basic_typename (type));
-+      else if (flag_dec_duplicates)
-+	{
-+	  /* Ignore temporaries and class/procedure names */
-+	  if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS
-+	      || sym->ts.type == BT_PROCEDURE)
-+	    return false;
-+
-+	  if (gfc_compare_types (&sym->ts, ts)
-+	      && (flavor == FL_UNKNOWN || flavor == FL_VARIABLE
-+	      || flavor == FL_PROCEDURE))
-+	    {
-+	      return gfc_notify_std (GFC_STD_LEGACY,
-+				     "Symbol '%qs' at %L already has "
-+				     "basic type of %s", sym->name, where,
-+				     gfc_basic_typename (type));
-+	    }
-+	}
-       else
- 	gfc_error ("Symbol %qs at %L already has basic type of %s", sym->name,
- 		   where, gfc_basic_typename (type));
-@@ -2020,8 +2039,6 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
-       return false;
-     }
- 
--  flavor = sym->attr.flavor;
--
-   if (flavor == FL_PROGRAM || flavor == FL_BLOCK_DATA || flavor == FL_MODULE
-       || flavor == FL_LABEL
-       || (flavor == FL_PROCEDURE && sym->attr.subroutine)
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_4.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
-new file mode 100644
-index 00000000000..cdd29ea8846
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
-@@ -0,0 +1,13 @@
-+! { dg-do compile }
-+! { dg-options "-std=f95" }
-+
-+! PR fortran/30239
-+! Check for errors when a symbol gets declared a type twice, even if it
-+! is the same.
-+
-+INTEGER FUNCTION foo ()
-+  IMPLICIT NONE
-+  INTEGER :: x
-+  INTEGER :: x ! { dg-error "basic type of" }
-+  x = 42
-+END FUNCTION foo
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_5.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
-new file mode 100644
-index 00000000000..00f931809aa
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
-@@ -0,0 +1,13 @@
-+! { dg-do run }
-+! { dg-options "-fdec" }
-+!
-+! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
-+!
-+
-+program test
-+  implicit none
-+  integer :: x
-+  integer :: x
-+  x = 42
-+  if (x /= 42) stop 1
-+end program test
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_6.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
-new file mode 100644
-index 00000000000..f0df27e323c
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
-@@ -0,0 +1,13 @@
-+! { dg-do run }
-+! { dg-options "-std=legacy -fdec-duplicates" }
-+!
-+! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
-+!
-+
-+program test
-+  implicit none
-+  integer :: x
-+  integer :: x
-+  x = 42
-+  if (x /= 42) stop 1
-+end program test
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_7.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
-new file mode 100644
-index 00000000000..f32472ff586
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
-@@ -0,0 +1,13 @@
-+! { dg-do run }
-+! { dg-options "-fdec-duplicates" }
-+!
-+! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
-+!
-+
-+program test
-+  implicit none
-+  integer :: x
-+  integer :: x! { dg-warning "Legacy Extension" }
-+  x = 42
-+  if (x /= 42) stop 1
-+end program test
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_8.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
-new file mode 100644
-index 00000000000..23c94add179
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
-@@ -0,0 +1,12 @@
-+! { dg-do compile }
-+! { dg-options "-fdec -fno-dec-duplicates" }
-+!
-+! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
-+!
-+
-+integer function foo ()
-+  implicit none
-+  integer :: x
-+  integer :: x ! { dg-error "basic type of" }
-+  x = 42
-+end function foo
-diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_9.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
-new file mode 100644
-index 00000000000..d5edee4d8ee
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
-@@ -0,0 +1,12 @@
-+! { dg-do compile }
-+! { dg-options "-fdec-duplicates -fno-dec-duplicates" }
-+!
-+! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
-+!
-+
-+integer function foo ()
-+  implicit none
-+  integer :: x
-+  integer :: x ! { dg-error "basic type of" }
-+  x = 42
-+end function foo
--- 
-2.27.0
-

diff --git a/gcc16-hack.patch b/gcc16-hack.patch
deleted file mode 100644
index 61331bf..0000000
--- a/gcc16-hack.patch
+++ /dev/null
@@ -1,182 +0,0 @@
---- libada/Makefile.in.jj	2019-01-09 13:01:18.015608205 +0100
-+++ libada/Makefile.in	2019-01-11 18:16:23.441726931 +0100
-@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
- libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
- ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
- 
-+DEFAULTMULTIFLAGS :=
-+ifeq ($(MULTISUBDIR),)
-+targ:=$(subst -, ,$(target))
-+arch:=$(word 1,$(targ))
-+ifeq ($(words $(targ)),2)
-+osys:=$(word 2,$(targ))
-+else
-+osys:=$(word 3,$(targ))
-+endif
-+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
-+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
-+DEFAULTMULTIFLAGS := -m64
-+else
-+ifeq ($(strip $(filter-out s390%, $(arch))),)
-+DEFAULTMULTIFLAGS := -m31
-+else
-+DEFAULTMULTIFLAGS := -m32
-+endif
-+endif
-+endif
-+endif
-+
- # exeext should not be used because it's the *host* exeext.  We're building
- # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
- # definitions just in case something slips through the safety net provided
- # by recursive make invocations in gcc/ada/Makefile.in
- LIBADA_FLAGS_TO_PASS = \
-         "MAKEOVERRIDES=" \
--        "LDFLAGS=$(LDFLAGS)" \
-+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
-         "LN_S=$(LN_S)" \
-         "SHELL=$(SHELL)" \
--        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
--        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
--        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
-+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
-+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
-+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
-         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
-         "THREAD_KIND=$(THREAD_KIND)" \
-         "TRACE=$(TRACE)" \
-@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
-         "exeext=.exeext.should.not.be.used " \
- 	'CC=the.host.compiler.should.not.be.needed' \
- 	"GCC_FOR_TARGET=$(CC)" \
--        "CFLAGS=$(CFLAGS)"
-+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
- 
- .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
- 
---- config-ml.in.jj	2019-01-09 12:50:16.646501448 +0100
-+++ config-ml.in	2019-01-11 18:16:23.442726914 +0100
-@@ -511,6 +511,8 @@ multi-do:
- 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
- 				prefix="$(prefix)" \
- 				exec_prefix="$(exec_prefix)" \
-+				mandir="$(mandir)" \
-+				infodir="$(infodir)" \
- 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
- 				GDCFLAGS="$(GDCFLAGS) $${flags}" \
- 				A68FLAGS="$(A68FLAGS) $${flags}" \
---- libcpp/macro.cc.jj	2019-01-09 13:01:21.420552123 +0100
-+++ libcpp/macro.cc	2024-11-30 13:16:41.163056391 +0100
-@@ -3680,8 +3680,6 @@ static cpp_macro *
- create_iso_definition (cpp_reader *pfile)
- {
-   bool following_paste_op = false;
--  const char *paste_op_error_msg =
--    N_("%<##%> cannot appear at either end of a macro expansion");
-   unsigned int num_extra_tokens = 0;
-   unsigned nparms = 0;
-   cpp_hashnode **params = NULL;
-@@ -3809,7 +3807,9 @@ create_iso_definition (cpp_reader *pfile
- 	     function-like macros, but not at the end.  */
- 	  if (following_paste_op)
- 	    {
--	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+	      cpp_error (pfile, CPP_DL_ERROR,
-+			 "%<##%> cannot appear at either end of a macro "
-+			 "expansion");
- 	      goto out;
- 	    }
- 	  if (!vaopt_tracker.completed ())
-@@ -3824,7 +3824,9 @@ create_iso_definition (cpp_reader *pfile
- 	     function-like macros, but not at the beginning.  */
- 	  if (macro->count == 1)
- 	    {
--	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+	      cpp_error (pfile, CPP_DL_ERROR,
-+			 "%<##%> cannot appear at either end of a macro "
-+			 "expansion");
- 	      goto out;
- 	    }
- 
---- libcpp/expr.cc.jj	2019-01-09 13:01:22.415535734 +0100
-+++ libcpp/expr.cc	2024-11-30 13:14:52.468583689 +0100
-@@ -874,50 +874,54 @@ cpp_classify_number (cpp_reader *pfile,
-       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
- 	  && CPP_OPTION (pfile, cpp_warn_long_long))
-         {
--          const char *message = CPP_OPTION (pfile, cplusplus)
--				? N_("use of C++11 long long integer constant")
--		                : N_("use of C99 long long integer constant");
--
- 	  if (CPP_OPTION (pfile, c99))
--            cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
--				   0, message);
-+            cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, 0,
-+				   CPP_OPTION (pfile, cplusplus)
-+				   ? N_("use of C++11 long long integer "
-+					"constant")
-+				   : N_("use of C99 long long integer "
-+					"constant"));
-           else
-             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
--				      virtual_location, 0, message);
-+				      virtual_location, 0,
-+				      CPP_OPTION (pfile, cplusplus)
-+				      ? N_("use of C++11 long long integer "
-+					   "constant")
-+				      : N_("use of C99 long long integer "
-+					   "constant"));
-         }
- 
-       if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T
- 	  && !CPP_OPTION (pfile, size_t_literals))
--       {
--	  const char *message
--	    = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
--	      ? N_("use of C++23 %<size_t%> integer constant")
--	      : N_("use of C++23 %<make_signed_t<size_t>%> integer constant");
--	  cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
--				 virtual_location, 0, message);
--       }
-+	cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
-+			       virtual_location, 0,
-+			       (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
-+				? N_("use of C++23 %<size_t%> integer "
-+				     "constant")
-+				: N_("use of C++23 %<make_signed_t<size_t>%> "
-+				     "integer constant"));
- 
-       if ((result & CPP_N_BITINT) != 0
- 	  && CPP_OPTION (pfile, cpp_warn_c11_c23_compat) != 0)
- 	{
- 	  if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
- 	    {
--	      const char *message = N_("ISO C does not support literal "
--				       "%<wb%> suffixes before C23");
- 	      if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false))
- 		cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
--					  virtual_location, 0, message);
-+					  virtual_location, 0,
-+					  "ISO C does not support literal "
-+					  "%<wb%> suffixes before C23");
- 	      else
- 		cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
--				       virtual_location, 0, message);
--	    }
--	  else if (!CPP_OPTION (pfile, true_false))
--	    {
--	      const char *message = N_("ISO C does not support literal "
-+				       virtual_location, 0,
-+				       "ISO C does not support literal "
- 				       "%<wb%> suffixes before C23");
--	      cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
--					virtual_location, 0, message);
- 	    }
-+	  else if (!CPP_OPTION (pfile, true_false))
-+	    cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
-+				      virtual_location, 0,
-+				      "ISO C does not support literal "
-+				      "%<wb%> suffixes before C23");
- 	}
- 
-       result |= CPP_N_INTEGER;

diff --git a/gcc16-isl-dl.patch b/gcc16-isl-dl.patch
deleted file mode 100644
index dc0c49b..0000000
--- a/gcc16-isl-dl.patch
+++ /dev/null
@@ -1,716 +0,0 @@
---- gcc/Makefile.in.jj	2015-06-06 10:00:25.000000000 +0200
-+++ gcc/Makefile.in	2015-11-04 14:56:02.643536437 +0100
-@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
- # and the system's installed libraries.
- LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
- 	$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
--BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
-+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
- 	$(ZLIB) $(ZSTD_LIB)
- # Any system libraries needed just for GNAT.
- SYSLIBS = @GNAT_LIBEXC@
-@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
- $(common_out_object_file): $(common_out_file)
- 	$(COMPILE) $<
- 	$(POSTCOMPILE)
-+
-+graphite%.o : \
-+  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
-+graphite.o : \
-+  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
-+graphite%.o : \
-+  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
-+graphite.o : \
-+  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
- #\f
- # Generate header and source files from the machine description,
- # and compile them.
---- gcc/graphite.h.jj	2016-01-27 12:44:06.000000000 +0100
-+++ gcc/graphite.h	2022-11-03 19:14:50.369690720 +0100
-@@ -24,6 +24,591 @@ along with GCC; see the file COPYING3.
- 
- #include "sese.h"
- 
-+#include <isl/version.h>
-+#include <dlfcn.h>
-+
-+#define DYNSYMS \
-+  DYNSYM (isl_aff_add_coefficient_si); \
-+  DYNSYM (isl_aff_free); \
-+  DYNSYM (isl_aff_get_space); \
-+  DYNSYM (isl_aff_set_coefficient_si); \
-+  DYNSYM (isl_aff_set_constant_si); \
-+  DYNSYM (isl_aff_zero_on_domain); \
-+  /* DYNSYM (isl_band_free); */ \
-+  /* DYNSYM (isl_band_get_children); */ \
-+  /* DYNSYM (isl_band_get_partial_schedule); */ \
-+  /* DYNSYM (isl_band_has_children); */ \
-+  /* DYNSYM (isl_band_list_free); */ \
-+  /* DYNSYM (isl_band_list_get_band); */ \
-+  /* DYNSYM (isl_band_list_get_ctx); */ \
-+  /* DYNSYM (isl_band_list_n_band); */ \
-+  /* DYNSYM (isl_band_n_member); */ \
-+  DYNSYM (isl_basic_map_add_constraint); \
-+  DYNSYM (isl_basic_map_project_out); \
-+  DYNSYM (isl_basic_map_universe); \
-+  DYNSYM (isl_constraint_set_coefficient_si); \
-+  DYNSYM (isl_constraint_set_constant_si); \
-+  DYNSYM (isl_ctx_alloc); \
-+  DYNSYM (isl_ctx_free); \
-+  DYNSYM (isl_equality_alloc); \
-+  DYNSYM (isl_id_alloc); \
-+  DYNSYM (isl_id_copy); \
-+  DYNSYM (isl_id_free); \
-+  DYNSYM (isl_inequality_alloc); \
-+  DYNSYM (isl_local_space_copy); \
-+  DYNSYM (isl_local_space_free); \
-+  DYNSYM (isl_local_space_from_space); \
-+  DYNSYM (isl_local_space_range); \
-+  DYNSYM (isl_map_add_constraint); \
-+  DYNSYM (isl_map_add_dims); \
-+  DYNSYM (isl_map_align_params); \
-+  DYNSYM (isl_map_apply_range); \
-+  DYNSYM (isl_map_copy); \
-+  DYNSYM (isl_map_dim); \
-+  DYNSYM (isl_map_dump); \
-+  DYNSYM (isl_map_equate); \
-+  DYNSYM (isl_map_fix_si); \
-+  DYNSYM (isl_map_flat_product); \
-+  DYNSYM (isl_map_flat_range_product); \
-+  DYNSYM (isl_map_free); \
-+  DYNSYM (isl_map_from_basic_map); \
-+  DYNSYM (isl_map_from_pw_aff); \
-+  DYNSYM (isl_map_from_union_map); \
-+  DYNSYM (isl_map_get_ctx); \
-+  DYNSYM (isl_map_get_space); \
-+  DYNSYM (isl_map_get_tuple_id); \
-+  DYNSYM (isl_map_insert_dims); \
-+  DYNSYM (isl_map_intersect); \
-+  DYNSYM (isl_map_intersect_domain); \
-+  DYNSYM (isl_map_intersect_range); \
-+  DYNSYM (isl_map_is_empty); \
-+  DYNSYM (isl_map_lex_ge); \
-+  DYNSYM (isl_map_lex_le); \
-+  /* DYNSYM (isl_map_n_out); */ \
-+  DYNSYM (isl_map_range); \
-+  DYNSYM (isl_map_set_tuple_id); \
-+  DYNSYM (isl_map_universe); \
-+  DYNSYM (isl_options_set_on_error); \
-+  DYNSYM (isl_options_set_schedule_serialize_sccs); \
-+  DYNSYM (isl_printer_set_yaml_style); \
-+  DYNSYM (isl_options_set_schedule_max_constant_term); \
-+  DYNSYM (isl_options_set_schedule_maximize_band_depth); \
-+  DYNSYM (isl_printer_free); \
-+  DYNSYM (isl_printer_print_aff); \
-+  DYNSYM (isl_printer_print_constraint); \
-+  DYNSYM (isl_printer_print_map); \
-+  DYNSYM (isl_printer_print_set); \
-+  DYNSYM (isl_printer_to_file); \
-+  DYNSYM (isl_pw_aff_add); \
-+  DYNSYM (isl_pw_aff_alloc); \
-+  DYNSYM (isl_pw_aff_copy); \
-+  DYNSYM (isl_pw_aff_eq_set); \
-+  DYNSYM (isl_pw_aff_free); \
-+  DYNSYM (isl_pw_aff_from_aff); \
-+  DYNSYM (isl_pw_aff_ge_set); \
-+  DYNSYM (isl_pw_aff_gt_set); \
-+  DYNSYM (isl_pw_aff_is_cst); \
-+  DYNSYM (isl_pw_aff_le_set); \
-+  DYNSYM (isl_pw_aff_lt_set); \
-+  DYNSYM (isl_pw_aff_mul); \
-+  DYNSYM (isl_pw_aff_ne_set); \
-+  DYNSYM (isl_pw_aff_nonneg_set); \
-+  DYNSYM (isl_pw_aff_set_tuple_id); \
-+  DYNSYM (isl_pw_aff_sub); \
-+  DYNSYM (isl_pw_aff_zero_set); \
-+  DYNSYM (isl_schedule_free); \
-+  /* DYNSYM (isl_schedule_get_band_forest); */ \
-+  DYNSYM (isl_set_add_constraint); \
-+  DYNSYM (isl_set_add_dims); \
-+  DYNSYM (isl_set_apply); \
-+  DYNSYM (isl_set_coalesce); \
-+  DYNSYM (isl_set_copy); \
-+  DYNSYM (isl_set_dim); \
-+  DYNSYM (isl_set_fix_si); \
-+  DYNSYM (isl_set_free); \
-+  DYNSYM (isl_set_get_space); \
-+  DYNSYM (isl_set_get_tuple_id); \
-+  DYNSYM (isl_set_intersect); \
-+  DYNSYM (isl_set_is_empty); \
-+  DYNSYM (isl_set_n_dim); \
-+  DYNSYM (isl_set_nat_universe); \
-+  DYNSYM (isl_set_project_out); \
-+  DYNSYM (isl_set_set_tuple_id); \
-+  DYNSYM (isl_set_universe); \
-+  DYNSYM (isl_space_add_dims); \
-+  DYNSYM (isl_space_alloc); \
-+  DYNSYM (isl_space_copy); \
-+  DYNSYM (isl_space_dim); \
-+  DYNSYM (isl_space_domain); \
-+  DYNSYM (isl_space_find_dim_by_id); \
-+  DYNSYM (isl_space_free); \
-+  DYNSYM (isl_space_from_domain); \
-+  DYNSYM (isl_space_get_tuple_id); \
-+  DYNSYM (isl_space_params_alloc); \
-+  DYNSYM (isl_space_range); \
-+  DYNSYM (isl_space_set_alloc); \
-+  DYNSYM (isl_space_set_dim_id); \
-+  DYNSYM (isl_space_set_tuple_id); \
-+  DYNSYM (isl_union_map_add_map); \
-+  DYNSYM (isl_union_map_align_params); \
-+  DYNSYM (isl_union_map_apply_domain); \
-+  DYNSYM (isl_union_map_apply_range); \
-+  DYNSYM (isl_union_map_compute_flow); \
-+  DYNSYM (isl_union_map_copy); \
-+  DYNSYM (isl_union_map_empty); \
-+  DYNSYM (isl_union_map_flat_range_product); \
-+  DYNSYM (isl_union_map_foreach_map); \
-+  DYNSYM (isl_union_map_free); \
-+  DYNSYM (isl_union_map_from_map); \
-+  DYNSYM (isl_union_map_get_ctx); \
-+  DYNSYM (isl_union_map_get_space); \
-+  DYNSYM (isl_union_map_gist_domain); \
-+  DYNSYM (isl_union_map_gist_range); \
-+  DYNSYM (isl_union_map_intersect_domain); \
-+  DYNSYM (isl_union_map_is_empty); \
-+  DYNSYM (isl_union_map_subtract); \
-+  DYNSYM (isl_union_map_union); \
-+  DYNSYM (isl_union_set_add_set); \
-+  DYNSYM (isl_union_set_compute_schedule); \
-+  DYNSYM (isl_union_set_copy); \
-+  DYNSYM (isl_union_set_empty); \
-+  DYNSYM (isl_union_set_from_set); \
-+  DYNSYM (isl_aff_add_constant_val); \
-+  DYNSYM (isl_aff_get_coefficient_val); \
-+  DYNSYM (isl_aff_get_ctx); \
-+  DYNSYM (isl_aff_mod_val); \
-+  DYNSYM (isl_ast_build_ast_from_schedule); \
-+  DYNSYM (isl_ast_build_free); \
-+  DYNSYM (isl_ast_build_from_context); \
-+  DYNSYM (isl_ast_build_get_ctx); \
-+  DYNSYM (isl_ast_build_get_schedule); \
-+  DYNSYM (isl_ast_build_get_schedule_space); \
-+  DYNSYM (isl_ast_build_set_before_each_for); \
-+  DYNSYM (isl_ast_build_set_options); \
-+  DYNSYM (isl_ast_expr_free); \
-+  DYNSYM (isl_ast_expr_from_val); \
-+  DYNSYM (isl_ast_expr_get_ctx); \
-+  DYNSYM (isl_ast_expr_get_id); \
-+  DYNSYM (isl_ast_expr_get_op_arg); \
-+  DYNSYM (isl_ast_expr_get_op_n_arg); \
-+  DYNSYM (isl_ast_expr_get_op_type); \
-+  DYNSYM (isl_ast_expr_get_type); \
-+  DYNSYM (isl_ast_expr_get_val); \
-+  DYNSYM (isl_ast_expr_sub); \
-+  DYNSYM (isl_ast_node_block_get_children); \
-+  DYNSYM (isl_ast_node_for_get_body); \
-+  DYNSYM (isl_ast_node_for_get_cond); \
-+  DYNSYM (isl_ast_node_for_get_inc); \
-+  DYNSYM (isl_ast_node_for_get_init); \
-+  DYNSYM (isl_ast_node_for_get_iterator); \
-+  DYNSYM (isl_ast_node_free); \
-+  DYNSYM (isl_ast_node_get_annotation); \
-+  DYNSYM (isl_ast_node_get_type); \
-+  DYNSYM (isl_ast_node_if_get_cond); \
-+  DYNSYM (isl_ast_node_if_get_else); \
-+  DYNSYM (isl_ast_node_if_get_then); \
-+  DYNSYM (isl_ast_node_list_free); \
-+  DYNSYM (isl_ast_node_list_get_ast_node); \
-+  DYNSYM (isl_ast_node_list_n_ast_node); \
-+  DYNSYM (isl_ast_node_user_get_expr); \
-+  DYNSYM (isl_constraint_set_coefficient_val); \
-+  DYNSYM (isl_constraint_set_constant_val); \
-+  DYNSYM (isl_id_get_user); \
-+  DYNSYM (isl_local_space_get_ctx); \
-+  DYNSYM (isl_map_fix_val); \
-+  DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \
-+  DYNSYM (isl_printer_print_ast_node); \
-+  DYNSYM (isl_printer_print_str); \
-+  DYNSYM (isl_printer_set_output_format); \
-+  DYNSYM (isl_pw_aff_mod_val); \
-+  DYNSYM (isl_schedule_constraints_compute_schedule); \
-+  DYNSYM (isl_schedule_constraints_on_domain); \
-+  DYNSYM (isl_schedule_constraints_set_coincidence); \
-+  DYNSYM (isl_schedule_constraints_set_proximity); \
-+  DYNSYM (isl_schedule_constraints_set_validity); \
-+  DYNSYM (isl_set_get_dim_id); \
-+  DYNSYM (isl_set_max_val); \
-+  DYNSYM (isl_set_min_val); \
-+  DYNSYM (isl_set_params); \
-+  DYNSYM (isl_space_align_params); \
-+  DYNSYM (isl_space_map_from_domain_and_range); \
-+  DYNSYM (isl_space_set_tuple_name); \
-+  DYNSYM (isl_space_wrap); \
-+  DYNSYM (isl_union_map_from_domain_and_range); \
-+  DYNSYM (isl_union_map_range); \
-+  DYNSYM (isl_union_set_union); \
-+  DYNSYM (isl_union_set_universe); \
-+  DYNSYM (isl_val_2exp); \
-+  DYNSYM (isl_val_add_ui); \
-+  DYNSYM (isl_val_copy); \
-+  DYNSYM (isl_val_free); \
-+  DYNSYM (isl_val_int_from_si); \
-+  DYNSYM (isl_val_int_from_ui); \
-+  DYNSYM (isl_val_mul); \
-+  DYNSYM (isl_val_neg); \
-+  DYNSYM (isl_val_sub); \
-+  DYNSYM (isl_printer_print_union_map); \
-+  DYNSYM (isl_pw_aff_get_ctx); \
-+  DYNSYM (isl_val_is_int); \
-+  DYNSYM (isl_ctx_get_max_operations); \
-+  DYNSYM (isl_ctx_set_max_operations); \
-+  DYNSYM (isl_ctx_last_error); \
-+  DYNSYM (isl_ctx_reset_operations); \
-+  DYNSYM (isl_map_coalesce); \
-+  DYNSYM (isl_printer_print_schedule); \
-+  DYNSYM (isl_set_set_dim_id); \
-+  DYNSYM (isl_union_map_coalesce); \
-+  DYNSYM (isl_multi_val_set_val); \
-+  DYNSYM (isl_multi_val_zero); \
-+  DYNSYM (isl_options_set_schedule_max_coefficient); \
-+  DYNSYM (isl_options_set_tile_scale_tile_loops); \
-+  DYNSYM (isl_schedule_copy); \
-+  DYNSYM (isl_schedule_get_map); \
-+  DYNSYM (isl_schedule_map_schedule_node_bottom_up); \
-+  DYNSYM (isl_schedule_node_band_get_permutable); \
-+  DYNSYM (isl_schedule_node_band_get_space); \
-+  DYNSYM (isl_schedule_node_band_tile); \
-+  DYNSYM (isl_schedule_node_child); \
-+  DYNSYM (isl_schedule_node_free); \
-+  DYNSYM (isl_schedule_node_get_child); \
-+  DYNSYM (isl_schedule_node_get_ctx); \
-+  DYNSYM (isl_schedule_node_get_type); \
-+  DYNSYM (isl_schedule_node_n_children); \
-+  DYNSYM (isl_union_map_is_equal); \
-+  DYNSYM (isl_union_access_info_compute_flow); \
-+  DYNSYM (isl_union_access_info_from_sink); \
-+  DYNSYM (isl_union_access_info_set_may_source); \
-+  DYNSYM (isl_union_access_info_set_must_source); \
-+  DYNSYM (isl_union_access_info_set_schedule); \
-+  DYNSYM (isl_union_flow_free); \
-+  DYNSYM (isl_union_flow_get_may_dependence); \
-+  DYNSYM (isl_union_flow_get_must_dependence); \
-+  DYNSYM (isl_aff_var_on_domain); \
-+  DYNSYM (isl_multi_aff_from_aff); \
-+  DYNSYM (isl_schedule_get_ctx); \
-+  DYNSYM (isl_multi_aff_set_tuple_id); \
-+  DYNSYM (isl_multi_aff_dim); \
-+  DYNSYM (isl_schedule_get_domain); \
-+  DYNSYM (isl_union_set_is_empty); \
-+  DYNSYM (isl_union_set_get_space); \
-+  DYNSYM (isl_union_pw_multi_aff_empty); \
-+  DYNSYM (isl_union_set_foreach_set); \
-+  DYNSYM (isl_union_set_free); \
-+  DYNSYM (isl_multi_union_pw_aff_from_union_pw_multi_aff); \
-+  DYNSYM (isl_multi_union_pw_aff_apply_multi_aff); \
-+  DYNSYM (isl_schedule_insert_partial_schedule); \
-+  DYNSYM (isl_union_pw_multi_aff_free); \
-+  DYNSYM (isl_pw_multi_aff_project_out_map); \
-+  DYNSYM (isl_union_pw_multi_aff_add_pw_multi_aff); \
-+  DYNSYM (isl_schedule_from_domain); \
-+  DYNSYM (isl_schedule_sequence); \
-+  DYNSYM (isl_ast_build_node_from_schedule); \
-+  DYNSYM (isl_ast_node_mark_get_node); \
-+  DYNSYM (isl_schedule_node_band_member_get_ast_loop_type); \
-+  DYNSYM (isl_schedule_node_band_member_set_ast_loop_type); \
-+  DYNSYM (isl_val_n_abs_num_chunks); \
-+  DYNSYM (isl_val_get_abs_num_chunks); \
-+  DYNSYM (isl_val_int_from_chunks); \
-+  DYNSYM (isl_val_is_neg); \
-+  DYNSYM (isl_version); \
-+  DYNSYM (isl_options_get_on_error); \
-+  DYNSYM (isl_ctx_reset_error);
-+
-+extern struct isl_pointers_s__
-+{
-+  bool inited;
-+  void *h;
-+#define DYNSYM(x) __typeof (x) *p_##x
-+  DYNSYMS
-+#undef DYNSYM
-+} isl_pointers__;
-+
-+#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si)
-+#define isl_aff_free (*isl_pointers__.p_isl_aff_free)
-+#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space)
-+#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si)
-+#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si)
-+#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain)
-+#define isl_band_free (*isl_pointers__.p_isl_band_free)
-+#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children)
-+#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule)
-+#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children)
-+#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free)
-+#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band)
-+#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx)
-+#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band)
-+#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member)
-+#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint)
-+#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out)
-+#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe)
-+#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si)
-+#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si)
-+#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc)
-+#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free)
-+#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc)
-+#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc)
-+#define isl_id_copy (*isl_pointers__.p_isl_id_copy)
-+#define isl_id_free (*isl_pointers__.p_isl_id_free)
-+#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc)
-+#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy)
-+#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free)
-+#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space)
-+#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range)
-+#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint)
-+#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims)
-+#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params)
-+#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range)
-+#define isl_map_copy (*isl_pointers__.p_isl_map_copy)
-+#define isl_map_dim (*isl_pointers__.p_isl_map_dim)
-+#define isl_map_dump (*isl_pointers__.p_isl_map_dump)
-+#define isl_map_equate (*isl_pointers__.p_isl_map_equate)
-+#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si)
-+#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product)
-+#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product)
-+#define isl_map_free (*isl_pointers__.p_isl_map_free)
-+#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map)
-+#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff)
-+#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map)
-+#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx)
-+#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space)
-+#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id)
-+#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims)
-+#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect)
-+#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain)
-+#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range)
-+#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty)
-+#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge)
-+#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le)
-+#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out)
-+#define isl_map_range (*isl_pointers__.p_isl_map_range)
-+#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id)
-+#define isl_map_universe (*isl_pointers__.p_isl_map_universe)
-+#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error)
-+#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs)
-+#define isl_printer_set_yaml_style (*isl_pointers__.p_isl_printer_set_yaml_style)
-+#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term)
-+#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth)
-+#define isl_printer_free (*isl_pointers__.p_isl_printer_free)
-+#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff)
-+#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint)
-+#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map)
-+#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set)
-+#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file)
-+#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add)
-+#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc)
-+#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy)
-+#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set)
-+#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free)
-+#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff)
-+#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set)
-+#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set)
-+#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst)
-+#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set)
-+#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set)
-+#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul)
-+#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set)
-+#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set)
-+#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id)
-+#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub)
-+#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set)
-+#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free)
-+#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest)
-+#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint)
-+#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims)
-+#define isl_set_apply (*isl_pointers__.p_isl_set_apply)
-+#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce)
-+#define isl_set_copy (*isl_pointers__.p_isl_set_copy)
-+#define isl_set_dim (*isl_pointers__.p_isl_set_dim)
-+#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si)
-+#define isl_set_free (*isl_pointers__.p_isl_set_free)
-+#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space)
-+#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id)
-+#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect)
-+#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty)
-+#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim)
-+#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe)
-+#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out)
-+#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id)
-+#define isl_set_universe (*isl_pointers__.p_isl_set_universe)
-+#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims)
-+#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc)
-+#define isl_space_copy (*isl_pointers__.p_isl_space_copy)
-+#define isl_space_dim (*isl_pointers__.p_isl_space_dim)
-+#define isl_space_domain (*isl_pointers__.p_isl_space_domain)
-+#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id)
-+#define isl_space_free (*isl_pointers__.p_isl_space_free)
-+#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain)
-+#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id)
-+#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc)
-+#define isl_space_range (*isl_pointers__.p_isl_space_range)
-+#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc)
-+#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id)
-+#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id)
-+#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map)
-+#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params)
-+#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain)
-+#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range)
-+#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow)
-+#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy)
-+#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty)
-+#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product)
-+#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map)
-+#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free)
-+#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map)
-+#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx)
-+#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space)
-+#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain)
-+#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range)
-+#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain)
-+#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty)
-+#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract)
-+#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union)
-+#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set)
-+#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule)
-+#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy)
-+#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty)
-+#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set)
-+#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val)
-+#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val)
-+#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx)
-+#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val)
-+#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule)
-+#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free)
-+#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context)
-+#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx)
-+#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule)
-+#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space)
-+#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for)
-+#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options)
-+#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free)
-+#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val)
-+#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx)
-+#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id)
-+#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg)
-+#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg)
-+#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type)
-+#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type)
-+#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val)
-+#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub)
-+#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children)
-+#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body)
-+#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond)
-+#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc)
-+#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init)
-+#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator)
-+#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free)
-+#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation)
-+#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type)
-+#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond)
-+#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else)
-+#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then)
-+#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free)
-+#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node)
-+#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node)
-+#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr)
-+#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val)
-+#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val)
-+#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user)
-+#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx)
-+#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val)
-+#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound)
-+#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node)
-+#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str)
-+#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format)
-+#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val)
-+#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule)
-+#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain)
-+#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence)
-+#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity)
-+#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity)
-+#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id)
-+#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val)
-+#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val)
-+#define isl_set_params (*isl_pointers__.p_isl_set_params)
-+#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params)
-+#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range)
-+#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name)
-+#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap)
-+#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range)
-+#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range)
-+#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union)
-+#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe)
-+#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp)
-+#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui)
-+#define isl_val_copy (*isl_pointers__.p_isl_val_copy)
-+#define isl_val_free (*isl_pointers__.p_isl_val_free)
-+#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si)
-+#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui)
-+#define isl_val_mul (*isl_pointers__.p_isl_val_mul)
-+#define isl_val_neg (*isl_pointers__.p_isl_val_neg)
-+#define isl_val_sub (*isl_pointers__.p_isl_val_sub)
-+#define isl_printer_print_union_map (*isl_pointers__.p_isl_printer_print_union_map)
-+#define isl_pw_aff_get_ctx (*isl_pointers__.p_isl_pw_aff_get_ctx)
-+#define isl_val_is_int (*isl_pointers__.p_isl_val_is_int)
-+#define isl_ctx_get_max_operations (*isl_pointers__.p_isl_ctx_get_max_operations)
-+#define isl_ctx_set_max_operations (*isl_pointers__.p_isl_ctx_set_max_operations)
-+#define isl_ctx_last_error (*isl_pointers__.p_isl_ctx_last_error)
-+#define isl_ctx_reset_operations (*isl_pointers__.p_isl_ctx_reset_operations)
-+#define isl_map_coalesce (*isl_pointers__.p_isl_map_coalesce)
-+#define isl_printer_print_schedule (*isl_pointers__.p_isl_printer_print_schedule)
-+#define isl_set_set_dim_id (*isl_pointers__.p_isl_set_set_dim_id)
-+#define isl_union_map_coalesce (*isl_pointers__.p_isl_union_map_coalesce)
-+#define isl_multi_val_set_val (*isl_pointers__.p_isl_multi_val_set_val)
-+#define isl_multi_val_zero (*isl_pointers__.p_isl_multi_val_zero)
-+#define isl_options_set_schedule_max_coefficient (*isl_pointers__.p_isl_options_set_schedule_max_coefficient)
-+#define isl_options_set_tile_scale_tile_loops (*isl_pointers__.p_isl_options_set_tile_scale_tile_loops)
-+#define isl_schedule_copy (*isl_pointers__.p_isl_schedule_copy)
-+#define isl_schedule_get_map (*isl_pointers__.p_isl_schedule_get_map)
-+#define isl_schedule_map_schedule_node_bottom_up (*isl_pointers__.p_isl_schedule_map_schedule_node_bottom_up)
-+#define isl_schedule_node_band_get_permutable (*isl_pointers__.p_isl_schedule_node_band_get_permutable)
-+#define isl_schedule_node_band_get_space (*isl_pointers__.p_isl_schedule_node_band_get_space)
-+#define isl_schedule_node_band_tile (*isl_pointers__.p_isl_schedule_node_band_tile)
-+#define isl_schedule_node_child (*isl_pointers__.p_isl_schedule_node_child)
-+#define isl_schedule_node_free (*isl_pointers__.p_isl_schedule_node_free)
-+#define isl_schedule_node_get_child (*isl_pointers__.p_isl_schedule_node_get_child)
-+#define isl_schedule_node_get_ctx (*isl_pointers__.p_isl_schedule_node_get_ctx)
-+#define isl_schedule_node_get_type (*isl_pointers__.p_isl_schedule_node_get_type)
-+#define isl_schedule_node_n_children (*isl_pointers__.p_isl_schedule_node_n_children)
-+#define isl_union_map_is_equal (*isl_pointers__.p_isl_union_map_is_equal)
-+#define isl_union_access_info_compute_flow (*isl_pointers__.p_isl_union_access_info_compute_flow)
-+#define isl_union_access_info_from_sink (*isl_pointers__.p_isl_union_access_info_from_sink)
-+#define isl_union_access_info_set_may_source (*isl_pointers__.p_isl_union_access_info_set_may_source)
-+#define isl_union_access_info_set_must_source (*isl_pointers__.p_isl_union_access_info_set_must_source)
-+#define isl_union_access_info_set_schedule (*isl_pointers__.p_isl_union_access_info_set_schedule)
-+#define isl_union_flow_free (*isl_pointers__.p_isl_union_flow_free)
-+#define isl_union_flow_get_may_dependence (*isl_pointers__.p_isl_union_flow_get_may_dependence)
-+#define isl_union_flow_get_must_dependence (*isl_pointers__.p_isl_union_flow_get_must_dependence)
-+#define isl_aff_var_on_domain (*isl_pointers__.p_isl_aff_var_on_domain)
-+#define isl_multi_aff_from_aff (*isl_pointers__.p_isl_multi_aff_from_aff)
-+#define isl_schedule_get_ctx (*isl_pointers__.p_isl_schedule_get_ctx)
-+#define isl_multi_aff_set_tuple_id (*isl_pointers__.p_isl_multi_aff_set_tuple_id)
-+#define isl_multi_aff_dim (*isl_pointers__.p_isl_multi_aff_dim)
-+#define isl_schedule_get_domain (*isl_pointers__.p_isl_schedule_get_domain)
-+#define isl_union_set_is_empty (*isl_pointers__.p_isl_union_set_is_empty)
-+#define isl_union_set_get_space (*isl_pointers__.p_isl_union_set_get_space)
-+#define isl_union_pw_multi_aff_empty (*isl_pointers__.p_isl_union_pw_multi_aff_empty)
-+#define isl_union_set_foreach_set (*isl_pointers__.p_isl_union_set_foreach_set)
-+#define isl_union_set_free (*isl_pointers__.p_isl_union_set_free)
-+#define isl_multi_union_pw_aff_from_union_pw_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_from_union_pw_multi_aff)
-+#define isl_multi_union_pw_aff_apply_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_apply_multi_aff)
-+#define isl_schedule_insert_partial_schedule (*isl_pointers__.p_isl_schedule_insert_partial_schedule)
-+#define isl_union_pw_multi_aff_free (*isl_pointers__.p_isl_union_pw_multi_aff_free)
-+#define isl_pw_multi_aff_project_out_map (*isl_pointers__.p_isl_pw_multi_aff_project_out_map)
-+#define isl_union_pw_multi_aff_add_pw_multi_aff (*isl_pointers__.p_isl_union_pw_multi_aff_add_pw_multi_aff)
-+#define isl_schedule_from_domain (*isl_pointers__.p_isl_schedule_from_domain)
-+#define isl_schedule_sequence (*isl_pointers__.p_isl_schedule_sequence)
-+#define isl_ast_build_node_from_schedule (*isl_pointers__.p_isl_ast_build_node_from_schedule)
-+#define isl_ast_node_mark_get_node (*isl_pointers__.p_isl_ast_node_mark_get_node)
-+#define isl_schedule_node_band_member_get_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_get_ast_loop_type)
-+#define isl_schedule_node_band_member_set_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_set_ast_loop_type)
-+#define isl_val_n_abs_num_chunks (*isl_pointers__.p_isl_val_n_abs_num_chunks)
-+#define isl_val_get_abs_num_chunks (*isl_pointers__.p_isl_val_get_abs_num_chunks)
-+#define isl_val_int_from_chunks (*isl_pointers__.p_isl_val_int_from_chunks)
-+#define isl_val_is_neg (*isl_pointers__.p_isl_val_is_neg)
-+#define isl_version (*isl_pointers__.p_isl_version)
-+#define isl_options_get_on_error (*isl_pointers__.p_isl_options_get_on_error)
-+#define isl_ctx_reset_error (*isl_pointers__.p_isl_ctx_reset_error)
-+
- typedef struct poly_dr *poly_dr_p;
- 
- typedef struct poly_bb *poly_bb_p;
-@@ -448,5 +1033,6 @@ extern tree cached_scalar_evolution_in_r
- extern void dot_all_sese (FILE *, vec<sese_l> &);
- extern void dot_sese (sese_l &);
- extern void dot_cfg ();
-+extern const char *get_isl_version (bool);
- 
- #endif
---- gcc/graphite.cc.jj	2015-11-04 14:15:32.000000000 +0100
-+++ gcc/graphite.cc	2015-11-04 14:56:02.645536409 +0100
-@@ -60,6 +60,35 @@ along with GCC; see the file COPYING3.
- #include "tree-ssa-propagate.h"
- #include "graphite.h"
- 
-+__typeof (isl_pointers__) isl_pointers__;
-+
-+static bool
-+init_isl_pointers (void)
-+{
-+  void *h;
-+
-+  if (isl_pointers__.inited)
-+    return isl_pointers__.h != NULL;
-+  h = dlopen ("libisl.so.23", RTLD_LAZY);
-+  isl_pointers__.h = h;
-+  if (h == NULL)
-+    return false;
-+#define DYNSYM(x) \
-+  do \
-+    { \
-+      union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \
-+      u.q = dlsym (h, #x); \
-+      if (u.q == NULL) \
-+	return false; \
-+      isl_pointers__.p_##x = u.p; \
-+    } \
-+  while (0)
-+  DYNSYMS
-+#undef DYNSYM
-+  isl_pointers__.inited = true;
-+  return true;
-+}
-+
- /* Print global statistics to FILE.  */
- 
- static void
-@@ -424,6 +453,15 @@ graphite_transform_loops (void)
-   if (parallelized_function_p (cfun->decl))
-     return;
- 
-+  if (number_of_loops (cfun) <= 1)
-+    return;
-+
-+  if (!init_isl_pointers ())
-+    {
-+      sorry ("Graphite loop optimizations cannot be used");
-+      return;
-+    }
-+
-   calculate_dominance_info (CDI_DOMINATORS);
- 
-   /* We rely on post-dominators during merging of SESE regions so those
-@@ -519,6 +557,14 @@ graphite_transform_loops (void)
-     }
- }
- 
-+const char *
-+get_isl_version (bool force)
-+{
-+  if (force)
-+    init_isl_pointers ();
-+  return (isl_pointers__.inited && isl_version) ? isl_version () : "none";
-+}
-+
- #else /* If isl is not available: #ifndef HAVE_isl.  */
- 
- static void
---- gcc/toplev.cc.jj	2017-02-19 13:02:31.000000000 +0100
-+++ gcc/toplev.cc	2024-11-30 13:22:34.175096117 +0100
-@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3.
- 
- #ifdef HAVE_isl
- #include <isl/version.h>
-+extern const char *get_isl_version (bool);
- #endif
- 
- static void general_init (const char *, bool, unique_argv original_argv);
-@@ -652,7 +653,7 @@ print_version (FILE *file, const char *i
- #ifndef HAVE_isl
- 	   "none"
- #else
--	   isl_version ()
-+	   get_isl_version (*indent == 0)
- #endif
- 	   );
-   if (strcmp (GCC_GMP_STRINGIFY_VERSION, gmp_version))

diff --git a/gcc16-isl-dl2.patch b/gcc16-isl-dl2.patch
deleted file mode 100644
index a07ff1d..0000000
--- a/gcc16-isl-dl2.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-2011-04-04  Jakub Jelinek  <jakub@redhat.com>
-
-	* toplev.cc (toplev_main_argv): New variable.
-	(toplev_main): Initialize it.
-	* graphite.cc (init_isl_pointers): Load libisl.so.23 from gcc's private
-	directory.
-
---- gcc/toplev.cc.jj	2008-12-09 23:59:10.000000000 +0100
-+++ gcc/toplev.cc	2024-11-30 13:26:05.085132543 +0100
-@@ -112,6 +112,8 @@ static void finalize ();
- static void crash_signal (int) ATTRIBUTE_NORETURN;
- static void compile_file (void);
- 
-+const char **toplev_main_argv;
-+
- /* Decoded options, and number of such options.  */
- struct cl_decoded_option *save_decoded_options;
- unsigned int save_decoded_options_count;
-@@ -2296,6 +2298,8 @@ toplev::main (int argc, char **argv)
- 
-   expandargv (&argc, &argv);
- 
-+  toplev_main_argv = const_cast <const char **> (argv);
-+
-   /* Initialization of GCC's environment, and diagnostics.  */
-   general_init (argv[0], m_init_signals, std::move (original_argv));
- 
---- gcc/graphite.cc.jj	2010-12-01 10:24:32.000000000 -0500
-+++ gcc/graphite.cc	2010-12-01 11:46:07.832118193 -0500
-@@ -64,11 +64,39 @@ __typeof (isl_pointers__) isl_pointers__
- static bool
- init_isl_pointers (void)
- {
--  void *h;
-+  void *h = NULL;
-+  extern const char **toplev_main_argv;
-+  char *buf, *p;
-+  size_t len;
- 
-   if (isl_pointers__.inited)
-     return isl_pointers__.h != NULL;
--  h = dlopen ("libisl.so.23", RTLD_LAZY);
-+  len = progname - toplev_main_argv[0];
-+  buf = XALLOCAVAR (char, len + sizeof "libisl.so.23");
-+  memcpy (buf, toplev_main_argv[0], len);
-+  strcpy (buf + len, "libisl.so.23");
-+  len += sizeof "libisl.so.23";
-+  p = strstr (buf, "/libexec/");
-+  if (p != NULL)
-+    {
-+      while (1)
-+	{
-+	  char *q = strstr (p + 8, "/libexec/");
-+	  if (q == NULL)
-+	    break;
-+	  p = q;
-+	}
-+      memmove (p + 4, p + 8, len - (p + 8 - buf));
-+      h = dlopen (buf, RTLD_LAZY);
-+      if (h == NULL)
-+	{
-+	  len = progname - toplev_main_argv[0];
-+	  memcpy (buf, toplev_main_argv[0], len);
-+	  strcpy (buf + len, "libisl.so.23");
-+	}
-+    }
-+  if (h == NULL)
-+    h = dlopen (buf, RTLD_LAZY);
-   isl_pointers__.h = h;
-   if (h == NULL)
-     return false;

diff --git a/gcc16-libgomp-omp_h-multilib.patch b/gcc16-libgomp-omp_h-multilib.patch
deleted file mode 100644
index d0e98d1..0000000
--- a/gcc16-libgomp-omp_h-multilib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-2008-06-09  Jakub Jelinek  <jakub@redhat.com>
-
-	* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.
-
---- libgomp/omp.h.in.jj	2008-06-09 13:34:05.000000000 +0200
-+++ libgomp/omp.h.in	2008-06-09 13:34:48.000000000 +0200
-@@ -42,8 +42,8 @@ typedef struct
- 
- typedef struct
- {
--  unsigned char _x[@OMP_NEST_LOCK_SIZE@] 
--    __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
-+  unsigned char _x[8 + sizeof (void *)] 
-+    __attribute__((__aligned__(sizeof (void *))));
- } omp_nest_lock_t;
- #endif
- 

diff --git a/gcc16-libstdc++-docs.patch b/gcc16-libstdc++-docs.patch
deleted file mode 100644
index f971627..0000000
--- a/gcc16-libstdc++-docs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- libstdc++-v3/doc/html/index.html.jj	2011-01-03 12:53:21.282829010 +0100
-+++ libstdc++-v3/doc/html/index.html	2011-01-04 18:06:28.999851145 +0100
-@@ -5,6 +5,8 @@
-       <a class="link" href="https://www.fsf.org" target="_top">FSF
-       </a>
-     </p><p>
-+      Release 16.1.1
-+    </p><p>
-       Permission is granted to copy, distribute and/or modify this
-       document under the terms of the GNU Free Documentation
-       License, Version 1.2 or any later version published by the
---- libstdc++-v3/doc/html/api.html.jj	2011-01-03 12:53:21.000000000 +0100
-+++ libstdc++-v3/doc/html/api.html	2024-11-30 13:30:16.607594623 +0100
-@@ -20,7 +20,9 @@
-   member functions for the library classes, finding out what is in a
-   particular include file, looking at inheritance diagrams, etc.
- </p><p>
--  The API documentation, rendered into HTML, can be viewed online
-+  The API documentation, rendered into HTML, can be viewed locally
-+  <a class="link" href="api/index.html" target="_top">for the 16.1.1 release</a>,
-+  online
-   <a class="link" href="https://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
-   and
-   <a class="link" href="https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">

diff --git a/gcc16-libtool-no-rpath.patch b/gcc16-libtool-no-rpath.patch
deleted file mode 100644
index 8429a4c..0000000
--- a/gcc16-libtool-no-rpath.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-libtool sucks.
---- ltmain.sh.jj	2007-12-07 14:53:21.000000000 +0100
-+++ ltmain.sh	2008-09-05 21:51:48.000000000 +0200
-@@ -5394,6 +5394,7 @@ EOF
- 	  rpath="$finalize_rpath"
- 	  test "$mode" != relink && rpath="$compile_rpath$rpath"
- 	  for libdir in $rpath; do
-+	    case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
- 	    if test -n "$hardcode_libdir_flag_spec"; then
- 	      if test -n "$hardcode_libdir_separator"; then
- 		if test -z "$hardcode_libdirs"; then
-@@ -6071,6 +6072,7 @@ EOF
-       rpath=
-       hardcode_libdirs=
-       for libdir in $compile_rpath $finalize_rpath; do
-+	case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
- 	if test -n "$hardcode_libdir_flag_spec"; then
- 	  if test -n "$hardcode_libdir_separator"; then
- 	    if test -z "$hardcode_libdirs"; then
-@@ -6120,6 +6122,7 @@ EOF
-       rpath=
-       hardcode_libdirs=
-       for libdir in $finalize_rpath; do
-+	case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
- 	if test -n "$hardcode_libdir_flag_spec"; then
- 	  if test -n "$hardcode_libdir_separator"; then
- 	    if test -z "$hardcode_libdirs"; then

diff --git a/gcc16-no-add-needed.patch b/gcc16-no-add-needed.patch
deleted file mode 100644
index 74f5c1f..0000000
--- a/gcc16-no-add-needed.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-2010-02-08  Roland McGrath  <roland@redhat.com>
-
-	* config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
-	* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
-	* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
-
---- gcc/config/alpha/elf.h.jj	2011-01-03 12:52:31.118056764 +0100
-+++ gcc/config/alpha/elf.h	2011-01-04 18:14:10.931874160 +0100
-@@ -168,5 +168,5 @@ extern int alpha_this_gpdisp_sequence_nu
-    I imagine that other systems will catch up.  In the meantime, it
-    doesn't harm to make sure that the data exists to be used later.  */
- #if defined(HAVE_LD_EH_FRAME_HDR)
--#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
-+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
- #endif
---- gcc/config/ia64/linux.h.jj	2011-01-03 13:02:11.462994522 +0100
-+++ gcc/config/ia64/linux.h	2011-01-04 18:14:10.931874160 +0100
-@@ -76,7 +76,7 @@ do {						\
-    Signalize that because we have fde-glibc, we don't need all C shared libs
-    linked against -lgcc_s.  */
- #undef LINK_EH_SPEC
--#define LINK_EH_SPEC ""
-+#define LINK_EH_SPEC "--no-add-needed "
- 
- #undef TARGET_INIT_LIBFUNCS
- #define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
---- gcc/config/gnu-user.h.jj	2011-01-03 12:53:03.739057299 +0100
-+++ gcc/config/gnu-user.h	2011-01-04 18:14:10.932814884 +0100
-@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
- #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
- 
- #if defined(HAVE_LD_EH_FRAME_HDR)
--#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
-+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
- #endif
- 
- 

diff --git a/gcc16-pr119006.patch b/gcc16-pr119006.patch
deleted file mode 100644
index dfbdaa9..0000000
--- a/gcc16-pr119006.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-2025-02-27  Jakub Jelinek  <jakub@redhat.com>
-
-	PR ipa/119006
-	* ipa-icf-gimple.cc (func_checker::compare_operand): If t1 and t2
-	are ADDR_EXPRs, call operand_equal_p on their operands rather than on
-	the ADDR_EXPRs themselves.  Formatting fix.
-
-	* g++.dg/opt/pr119006.C: New test.
-
---- gcc/ipa-icf-gimple.cc.jj	2025-02-01 00:50:02.080774328 +0100
-+++ gcc/ipa-icf-gimple.cc	2025-02-27 14:35:19.931183246 +0100
-@@ -437,12 +437,23 @@ func_checker::compare_operand (tree t1,
- 		 ("compare_ao_refs failed (dependence clique difference)");
-       gcc_unreachable ();
-     }
-+  else if (TREE_CODE (t1) == ADDR_EXPR && TREE_CODE (t2) == ADDR_EXPR)
-+    {
-+      /* For ADDR_EXPR compare the operands of the ADDR_EXPR rather than
-+	 the ADDR_EXPRs themselves.  operand_equal_p will compare the
-+	 operands with OEP_ADDRESS_OF and only care about the value
-+	 of the ADDR_EXPR, rather than e.g. types of MEM_REFs in there.
-+	 Some optimizations use such details though, see PR119006.  */
-+      if (operand_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0),
-+			   OEP_MATCH_SIDE_EFFECTS))
-+	return true;
-+      return return_false_with_msg ("operand_equal_p failed");
-+    }
-   else
-     {
-       if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS))
- 	return true;
--      return return_false_with_msg
--		 ("operand_equal_p failed");
-+      return return_false_with_msg ("operand_equal_p failed");
-     }
- }
- 
---- gcc/testsuite/g++.dg/opt/pr119006.C.jj	2025-02-27 14:37:05.952707350 +0100
-+++ gcc/testsuite/g++.dg/opt/pr119006.C	2025-02-27 14:36:29.251218260 +0100
-@@ -0,0 +1,36 @@
-+// PR ipa/119006
-+// { dg-do run { target c++11 } }
-+// { dg-options "-O2 -fwhole-program" }
-+
-+struct A {
-+  bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
-+  char a[11];
-+};
-+
-+struct B {
-+  bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
-+  bool operator!= (const char *x) const { return !(*this == x); }
-+  char a[128];
-+};
-+
-+[[gnu::noinline,gnu::used]] int
-+foo (const A& lhs, const char* rhs)
-+{
-+  return lhs == rhs;
-+}
-+
-+constexpr const char *t = "abcdefghijklmno";
-+
-+[[gnu::noinline,gnu::used]] void
-+bar (B x)
-+{
-+  if (x != t) __builtin_abort ();
-+}
-+
-+int
-+main ()
-+{
-+  B b;
-+  __builtin_strcpy (b.a, t);
-+  bar (b);
-+}

diff --git a/gcc16-rh1574936.patch b/gcc16-rh1574936.patch
deleted file mode 100644
index bcc7000..0000000
--- a/gcc16-rh1574936.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-crt files and statically linked libgcc objects cause false positives
-in annobin coverage, so we add the assembler flag to generate notes
-for them.
-
-The patch also adds notes to libgcc_s.so, but this is harmless because
-these notes only confer that there is no other annobin markup.
-
-2018-07-25  Florian Weimer  <fweimer@redhat.com>
-
-	* config/t-linux (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
-	-Wa,--generate-missing-build-notes=yes.
-
---- libgcc/config/t-linux	2022-12-15 19:25:20.581394950 +0100
-+++ libgcc/config/t-linux	2023-03-21 22:00:37.054478562 +0100
-@@ -1,3 +1,6 @@
- # Override t-slibgcc-elf-ver to export some libgcc symbols with
- # the symbol versions that glibc used.
- SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
-+
-+LIBGCC2_CFLAGS += -Wa,--generate-missing-build-notes=yes
-+CRTSTUFF_CFLAGS += -Wa,--generate-missing-build-notes=yes

diff --git a/gcc16-sparc-config-detection.patch b/gcc16-sparc-config-detection.patch
deleted file mode 100644
index bbe8ec3..0000000
--- a/gcc16-sparc-config-detection.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- gcc/config.gcc.jj	2008-04-24 15:42:46.000000000 -0500
-+++ gcc/config.gcc	2008-04-24 15:44:51.000000000 -0500
-@@ -3330,7 +3330,7 @@ sparc-*-rtems*)
- 	tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
- 	;;
--sparc-*-linux*)
-+sparc-*-linux* | sparcv9-*-linux*)
- 	tm_file="${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
- 	extra_options="${extra_options} sparc/long-double-switch.opt"
- 	case ${target} in
-@@ -3384,7 +3384,7 @@ sparc64-*-rtems*)
- 	extra_options="${extra_options}"
- 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
- 	;;
--sparc64-*-linux*)
-+sparc64*-*-linux*)
- 	tm_file="sparc/biarch64.h ${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
- 	extra_options="${extra_options} sparc/long-double-switch.opt"
- 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
---- libgcc/config.host.jj	2008-04-24 15:46:19.000000000 -0500
-+++ libgcc/config.host	2008-04-24 15:46:49.000000000 -0500
-@@ -1002,7 +1002,7 @@ sparc-*-elf*)
- 	tmake_file="${tmake_file} t-fdpbit t-crtfm"
- 	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
- 	;;
--sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
-+sparc-*-linux* | sparcv9-*-linux*)		# SPARC's running GNU/Linux, libc6
- 	tmake_file="${tmake_file} t-crtfm"
- 	if test "${host_address}" = 64; then
- 		tmake_file="$tmake_file sparc/t-linux64"
-@@ -1050,7 +1050,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
- 	tmake_file="$tmake_file t-crtfm"
- 	extra_parts="$extra_parts crtfastmath.o"
- 	;;
--sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
-+sparc64*-*-linux*)		# 64-bit SPARC's running GNU/Linux
- 	extra_parts="$extra_parts crtfastmath.o"
- 	tmake_file="${tmake_file} t-crtfm sparc/t-linux"
- 	if test "${host_address}" = 64; then

diff --git a/gcc17-Wno-format-security.patch b/gcc17-Wno-format-security.patch
new file mode 100644
index 0000000..2a4f0f3
--- /dev/null
+++ b/gcc17-Wno-format-security.patch
@@ -0,0 +1,66 @@
+2022-01-07  Jakub Jelinek  <jakub@redhat.com>
+
+	* Makefile.tpl (GOCFLAGS, GDCFLAGS): Filter out -Wformat-security.
+	* Makefile.in: Regenerated.
+
+2017-02-25  Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.ac: When adding -Wno-format, also add -Wno-format-security.
+	* configure: Regenerated.
+
+--- gcc/configure.ac.jj	2017-02-13 12:20:53.000000000 +0100
++++ gcc/configure.ac	2024-11-30 13:34:11.100296256 +0100
+@@ -592,7 +592,7 @@ AC_ARG_ENABLE(build-format-warnings,
+   AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
+   [],[enable_build_format_warnings=yes])
+ AS_IF([test $enable_build_format_warnings = no],
+-      [wf_opt=-Wno-format],[wf_opt=])
++      [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
+ ACX_PROG_CXX_WARNING_OPTS(
+ 	m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
+ 		       [-Wcast-qual $wf_opt])),
+--- gcc/configure.jj	2017-02-13 12:20:52.000000000 +0100
++++ gcc/configure	2017-02-25 12:42:50.041946391 +0100
+@@ -7077,7 +7077,7 @@ else
+ fi
+ 
+ if test $enable_build_format_warnings = no; then :
+-  wf_opt=-Wno-format
++  wf_opt="-Wno-format -Wno-format-security"
+ else
+   wf_opt=
+ fi
+--- Makefile.tpl.jj	2023-11-29 13:21:41.680292662 +0100
++++ Makefile.tpl	2024-11-30 13:35:29.303196246 +0100
+@@ -450,10 +450,10 @@ LDFLAGS = @LDFLAGS@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-GOCFLAGS = $(CFLAGS)
+-A68FLAGS = @A68FLAGS@
+-GDCFLAGS = @GDCFLAGS@
+-GM2FLAGS = $(CFLAGS)
++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
++GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
++GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+ 
+ CRAB1_LIBS = @CRAB1_LIBS@
+ 
+--- Makefile.in.jj	2023-11-29 13:21:41.691292507 +0100
++++ Makefile.in	2024-11-30 13:36:12.113594079 +0100
+@@ -447,10 +447,10 @@ LDFLAGS = @LDFLAGS@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-GOCFLAGS = $(CFLAGS)
+-A68FLAGS = @A68FLAGS@
+-GDCFLAGS = @GDCFLAGS@
+-GM2FLAGS = $(CFLAGS)
++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
++GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
++GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+ 
+ CRAB1_LIBS = @CRAB1_LIBS@
+ 

diff --git a/gcc17-d-shared-libphobos.patch b/gcc17-d-shared-libphobos.patch
new file mode 100644
index 0000000..6384bbb
--- /dev/null
+++ b/gcc17-d-shared-libphobos.patch
@@ -0,0 +1,20 @@
+2019-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* d-spec.cc (lang_specific_driver): Make -shared-libphobos
+	the default rather than -static-libphobos.
+
+--- gcc/d/d-spec.cc.jj	2019-01-01 12:37:49.502444257 +0100
++++ gcc/d/d-spec.cc	2019-01-17 17:09:45.364949246 +0100
+@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
+   /* Add `-lgphobos' if we haven't already done so.  */
+   if (phobos_library != PHOBOS_NOLINK)
+     {
+-      /* Default to static linking.  */
+-      if (phobos_library != PHOBOS_DYNAMIC)
+-	phobos_library = PHOBOS_STATIC;
++      /* Default to shared linking.  */
++      if (phobos_library != PHOBOS_STATIC)
++	phobos_library = PHOBOS_DYNAMIC;
+ 
+ #ifdef HAVE_LD_STATIC_DYNAMIC
+       if (phobos_library == PHOBOS_STATIC && !static_link)

diff --git a/gcc17-fortran-fdec-duplicates.patch b/gcc17-fortran-fdec-duplicates.patch
new file mode 100644
index 0000000..5298baa
--- /dev/null
+++ b/gcc17-fortran-fdec-duplicates.patch
@@ -0,0 +1,215 @@
+From 23b1fcb104c666429451ffaf936f8da5fcd3d43a Mon Sep 17 00:00:00 2001
+From: Mark Eggleston <markeggleston@gcc.gnu.org>
+Date: Fri, 22 Jan 2021 12:29:47 +0000
+Subject: [PATCH 01/10] Allow duplicate declarations.
+
+Enabled by -fdec-duplicates and -fdec.
+
+Some fixes by Jim MacArthur <jim.macarthur@codethink.co.uk>
+Addition of -fdec-duplicates by Mark Eggleston <mark.eggleston@codethink.com>
+---
+ gcc/fortran/lang.opt                          |  4 ++++
+ gcc/fortran/options.cc                        |  1 +
+ gcc/fortran/symbol.cc                         | 21 +++++++++++++++++--
+ .../gfortran.dg/duplicate_type_4.f90          | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_5.f90          | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_6.f90          | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_7.f90          | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_8.f90          | 12 +++++++++++
+ .../gfortran.dg/duplicate_type_9.f90          | 12 +++++++++++
+ 9 files changed, 100 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 2b1977c523b..52bd522051e 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -469,6 +469,10 @@ Fortran Var(flag_dec_char_conversions)
+ Enable the use of character literals in assignments and data statements
+ for non-character variables.
+ 
++fdec-duplicates
++Fortran Var(flag_dec_duplicates)
++Allow varibles to be duplicated in the type specification matches.
++
+ fdec-include
+ Fortran Var(flag_dec_include)
+ Enable legacy parsing of INCLUDE as statement.
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
+index 3a0b98bf1ec..f19ba87f8a0 100644
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
+@@ -77,6 +77,7 @@ set_dec_flags (int value)
+   SET_BITFLAG (flag_dec_format_defaults, value, value);
+   SET_BITFLAG (flag_dec_blank_format_item, value, value);
+   SET_BITFLAG (flag_dec_char_conversions, value, value);
++  SET_BITFLAG (flag_dec_duplicates, value, value);
+ }
+ 
+ /* Finalize DEC flags.  */
+diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
+index 3b988d1be22..9843175cc2a 100644
+--- a/gcc/fortran/symbol.cc
++++ b/gcc/fortran/symbol.cc
+@@ -1995,6 +1995,8 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+   if (sym->attr.result && type == BT_UNKNOWN && sym->ns->proc_name)
+     type = sym->ns->proc_name->ts.type;
+ 
++  flavor = sym->attr.flavor;
++
+   if (type != BT_UNKNOWN && !(sym->attr.function && sym->attr.implicit_type)
+       && !(gfc_state_stack->previous && gfc_state_stack->previous->previous
+ 	   && gfc_state_stack->previous->previous->state == COMP_SUBMODULE)
+@@ -2007,6 +2009,23 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+       else if (sym->attr.function && sym->attr.result)
+ 	gfc_error ("Symbol %qs at %L already has basic type of %s",
+ 		   sym->ns->proc_name->name, where, gfc_basic_typename (type));
++      else if (flag_dec_duplicates)
++	{
++	  /* Ignore temporaries and class/procedure names */
++	  if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS
++	      || sym->ts.type == BT_PROCEDURE)
++	    return false;
++
++	  if (gfc_compare_types (&sym->ts, ts)
++	      && (flavor == FL_UNKNOWN || flavor == FL_VARIABLE
++	      || flavor == FL_PROCEDURE))
++	    {
++	      return gfc_notify_std (GFC_STD_LEGACY,
++				     "Symbol '%qs' at %L already has "
++				     "basic type of %s", sym->name, where,
++				     gfc_basic_typename (type));
++	    }
++	}
+       else
+ 	gfc_error ("Symbol %qs at %L already has basic type of %s", sym->name,
+ 		   where, gfc_basic_typename (type));
+@@ -2020,8 +2039,6 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+       return false;
+     }
+ 
+-  flavor = sym->attr.flavor;
+-
+   if (flavor == FL_PROGRAM || flavor == FL_BLOCK_DATA || flavor == FL_MODULE
+       || flavor == FL_LABEL
+       || (flavor == FL_PROCEDURE && sym->attr.subroutine)
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_4.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+new file mode 100644
+index 00000000000..cdd29ea8846
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++! { dg-options "-std=f95" }
++
++! PR fortran/30239
++! Check for errors when a symbol gets declared a type twice, even if it
++! is the same.
++
++INTEGER FUNCTION foo ()
++  IMPLICIT NONE
++  INTEGER :: x
++  INTEGER :: x ! { dg-error "basic type of" }
++  x = 42
++END FUNCTION foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_5.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+new file mode 100644
+index 00000000000..00f931809aa
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
++!
++
++program test
++  implicit none
++  integer :: x
++  integer :: x
++  x = 42
++  if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_6.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+new file mode 100644
+index 00000000000..f0df27e323c
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-std=legacy -fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
++!
++
++program test
++  implicit none
++  integer :: x
++  integer :: x
++  x = 42
++  if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_7.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+new file mode 100644
+index 00000000000..f32472ff586
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
++!
++
++program test
++  implicit none
++  integer :: x
++  integer :: x! { dg-warning "Legacy Extension" }
++  x = 42
++  if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_8.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+new file mode 100644
+index 00000000000..23c94add179
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
++!
++
++integer function foo ()
++  implicit none
++  integer :: x
++  integer :: x ! { dg-error "basic type of" }
++  x = 42
++end function foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_9.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+new file mode 100644
+index 00000000000..d5edee4d8ee
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec-duplicates -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston <mark.eggleston@codethink.com>
++!
++
++integer function foo ()
++  implicit none
++  integer :: x
++  integer :: x ! { dg-error "basic type of" }
++  x = 42
++end function foo
+-- 
+2.27.0
+

diff --git a/gcc17-hack.patch b/gcc17-hack.patch
new file mode 100644
index 0000000..61331bf
--- /dev/null
+++ b/gcc17-hack.patch
@@ -0,0 +1,182 @@
+--- libada/Makefile.in.jj	2019-01-09 13:01:18.015608205 +0100
++++ libada/Makefile.in	2019-01-11 18:16:23.441726931 +0100
+@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
+ libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
+ ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
+ 
++DEFAULTMULTIFLAGS :=
++ifeq ($(MULTISUBDIR),)
++targ:=$(subst -, ,$(target))
++arch:=$(word 1,$(targ))
++ifeq ($(words $(targ)),2)
++osys:=$(word 2,$(targ))
++else
++osys:=$(word 3,$(targ))
++endif
++ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
++ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
++DEFAULTMULTIFLAGS := -m64
++else
++ifeq ($(strip $(filter-out s390%, $(arch))),)
++DEFAULTMULTIFLAGS := -m31
++else
++DEFAULTMULTIFLAGS := -m32
++endif
++endif
++endif
++endif
++
+ # exeext should not be used because it's the *host* exeext.  We're building
+ # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
+ # definitions just in case something slips through the safety net provided
+ # by recursive make invocations in gcc/ada/Makefile.in
+ LIBADA_FLAGS_TO_PASS = \
+         "MAKEOVERRIDES=" \
+-        "LDFLAGS=$(LDFLAGS)" \
++        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
+         "LN_S=$(LN_S)" \
+         "SHELL=$(SHELL)" \
+-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
+-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
+-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
++        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
++        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
++        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
+         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
+         "THREAD_KIND=$(THREAD_KIND)" \
+         "TRACE=$(TRACE)" \
+@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
+         "exeext=.exeext.should.not.be.used " \
+ 	'CC=the.host.compiler.should.not.be.needed' \
+ 	"GCC_FOR_TARGET=$(CC)" \
+-        "CFLAGS=$(CFLAGS)"
++        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
+ 
+ .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
+ 
+--- config-ml.in.jj	2019-01-09 12:50:16.646501448 +0100
++++ config-ml.in	2019-01-11 18:16:23.442726914 +0100
+@@ -511,6 +511,8 @@ multi-do:
+ 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
+ 				prefix="$(prefix)" \
+ 				exec_prefix="$(exec_prefix)" \
++				mandir="$(mandir)" \
++				infodir="$(infodir)" \
+ 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
+ 				GDCFLAGS="$(GDCFLAGS) $${flags}" \
+ 				A68FLAGS="$(A68FLAGS) $${flags}" \
+--- libcpp/macro.cc.jj	2019-01-09 13:01:21.420552123 +0100
++++ libcpp/macro.cc	2024-11-30 13:16:41.163056391 +0100
+@@ -3680,8 +3680,6 @@ static cpp_macro *
+ create_iso_definition (cpp_reader *pfile)
+ {
+   bool following_paste_op = false;
+-  const char *paste_op_error_msg =
+-    N_("%<##%> cannot appear at either end of a macro expansion");
+   unsigned int num_extra_tokens = 0;
+   unsigned nparms = 0;
+   cpp_hashnode **params = NULL;
+@@ -3809,7 +3807,9 @@ create_iso_definition (cpp_reader *pfile
+ 	     function-like macros, but not at the end.  */
+ 	  if (following_paste_op)
+ 	    {
+-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++	      cpp_error (pfile, CPP_DL_ERROR,
++			 "%<##%> cannot appear at either end of a macro "
++			 "expansion");
+ 	      goto out;
+ 	    }
+ 	  if (!vaopt_tracker.completed ())
+@@ -3824,7 +3824,9 @@ create_iso_definition (cpp_reader *pfile
+ 	     function-like macros, but not at the beginning.  */
+ 	  if (macro->count == 1)
+ 	    {
+-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++	      cpp_error (pfile, CPP_DL_ERROR,
++			 "%<##%> cannot appear at either end of a macro "
++			 "expansion");
+ 	      goto out;
+ 	    }
+ 
+--- libcpp/expr.cc.jj	2019-01-09 13:01:22.415535734 +0100
++++ libcpp/expr.cc	2024-11-30 13:14:52.468583689 +0100
+@@ -874,50 +874,54 @@ cpp_classify_number (cpp_reader *pfile,
+       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
+ 	  && CPP_OPTION (pfile, cpp_warn_long_long))
+         {
+-          const char *message = CPP_OPTION (pfile, cplusplus)
+-				? N_("use of C++11 long long integer constant")
+-		                : N_("use of C99 long long integer constant");
+-
+ 	  if (CPP_OPTION (pfile, c99))
+-            cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
+-				   0, message);
++            cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, 0,
++				   CPP_OPTION (pfile, cplusplus)
++				   ? N_("use of C++11 long long integer "
++					"constant")
++				   : N_("use of C99 long long integer "
++					"constant"));
+           else
+             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
+-				      virtual_location, 0, message);
++				      virtual_location, 0,
++				      CPP_OPTION (pfile, cplusplus)
++				      ? N_("use of C++11 long long integer "
++					   "constant")
++				      : N_("use of C99 long long integer "
++					   "constant"));
+         }
+ 
+       if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T
+ 	  && !CPP_OPTION (pfile, size_t_literals))
+-       {
+-	  const char *message
+-	    = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
+-	      ? N_("use of C++23 %<size_t%> integer constant")
+-	      : N_("use of C++23 %<make_signed_t<size_t>%> integer constant");
+-	  cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
+-				 virtual_location, 0, message);
+-       }
++	cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
++			       virtual_location, 0,
++			       (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
++				? N_("use of C++23 %<size_t%> integer "
++				     "constant")
++				: N_("use of C++23 %<make_signed_t<size_t>%> "
++				     "integer constant"));
+ 
+       if ((result & CPP_N_BITINT) != 0
+ 	  && CPP_OPTION (pfile, cpp_warn_c11_c23_compat) != 0)
+ 	{
+ 	  if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
+ 	    {
+-	      const char *message = N_("ISO C does not support literal "
+-				       "%<wb%> suffixes before C23");
+ 	      if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false))
+ 		cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
+-					  virtual_location, 0, message);
++					  virtual_location, 0,
++					  "ISO C does not support literal "
++					  "%<wb%> suffixes before C23");
+ 	      else
+ 		cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
+-				       virtual_location, 0, message);
+-	    }
+-	  else if (!CPP_OPTION (pfile, true_false))
+-	    {
+-	      const char *message = N_("ISO C does not support literal "
++				       virtual_location, 0,
++				       "ISO C does not support literal "
+ 				       "%<wb%> suffixes before C23");
+-	      cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
+-					virtual_location, 0, message);
+ 	    }
++	  else if (!CPP_OPTION (pfile, true_false))
++	    cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
++				      virtual_location, 0,
++				      "ISO C does not support literal "
++				      "%<wb%> suffixes before C23");
+ 	}
+ 
+       result |= CPP_N_INTEGER;

diff --git a/gcc17-isl-dl.patch b/gcc17-isl-dl.patch
new file mode 100644
index 0000000..dc0c49b
--- /dev/null
+++ b/gcc17-isl-dl.patch
@@ -0,0 +1,716 @@
+--- gcc/Makefile.in.jj	2015-06-06 10:00:25.000000000 +0200
++++ gcc/Makefile.in	2015-11-04 14:56:02.643536437 +0100
+@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+ # and the system's installed libraries.
+ LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
+ 	$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
+-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
++BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+ 	$(ZLIB) $(ZSTD_LIB)
+ # Any system libraries needed just for GNAT.
+ SYSLIBS = @GNAT_LIBEXC@
+@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
+ $(common_out_object_file): $(common_out_file)
+ 	$(COMPILE) $<
+ 	$(POSTCOMPILE)
++
++graphite%.o : \
++  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++graphite.o : \
++  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++graphite%.o : \
++  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
++graphite.o : \
++  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
+ #\f
+ # Generate header and source files from the machine description,
+ # and compile them.
+--- gcc/graphite.h.jj	2016-01-27 12:44:06.000000000 +0100
++++ gcc/graphite.h	2022-11-03 19:14:50.369690720 +0100
+@@ -24,6 +24,591 @@ along with GCC; see the file COPYING3.
+ 
+ #include "sese.h"
+ 
++#include <isl/version.h>
++#include <dlfcn.h>
++
++#define DYNSYMS \
++  DYNSYM (isl_aff_add_coefficient_si); \
++  DYNSYM (isl_aff_free); \
++  DYNSYM (isl_aff_get_space); \
++  DYNSYM (isl_aff_set_coefficient_si); \
++  DYNSYM (isl_aff_set_constant_si); \
++  DYNSYM (isl_aff_zero_on_domain); \
++  /* DYNSYM (isl_band_free); */ \
++  /* DYNSYM (isl_band_get_children); */ \
++  /* DYNSYM (isl_band_get_partial_schedule); */ \
++  /* DYNSYM (isl_band_has_children); */ \
++  /* DYNSYM (isl_band_list_free); */ \
++  /* DYNSYM (isl_band_list_get_band); */ \
++  /* DYNSYM (isl_band_list_get_ctx); */ \
++  /* DYNSYM (isl_band_list_n_band); */ \
++  /* DYNSYM (isl_band_n_member); */ \
++  DYNSYM (isl_basic_map_add_constraint); \
++  DYNSYM (isl_basic_map_project_out); \
++  DYNSYM (isl_basic_map_universe); \
++  DYNSYM (isl_constraint_set_coefficient_si); \
++  DYNSYM (isl_constraint_set_constant_si); \
++  DYNSYM (isl_ctx_alloc); \
++  DYNSYM (isl_ctx_free); \
++  DYNSYM (isl_equality_alloc); \
++  DYNSYM (isl_id_alloc); \
++  DYNSYM (isl_id_copy); \
++  DYNSYM (isl_id_free); \
++  DYNSYM (isl_inequality_alloc); \
++  DYNSYM (isl_local_space_copy); \
++  DYNSYM (isl_local_space_free); \
++  DYNSYM (isl_local_space_from_space); \
++  DYNSYM (isl_local_space_range); \
++  DYNSYM (isl_map_add_constraint); \
++  DYNSYM (isl_map_add_dims); \
++  DYNSYM (isl_map_align_params); \
++  DYNSYM (isl_map_apply_range); \
++  DYNSYM (isl_map_copy); \
++  DYNSYM (isl_map_dim); \
++  DYNSYM (isl_map_dump); \
++  DYNSYM (isl_map_equate); \
++  DYNSYM (isl_map_fix_si); \
++  DYNSYM (isl_map_flat_product); \
++  DYNSYM (isl_map_flat_range_product); \
++  DYNSYM (isl_map_free); \
++  DYNSYM (isl_map_from_basic_map); \
++  DYNSYM (isl_map_from_pw_aff); \
++  DYNSYM (isl_map_from_union_map); \
++  DYNSYM (isl_map_get_ctx); \
++  DYNSYM (isl_map_get_space); \
++  DYNSYM (isl_map_get_tuple_id); \
++  DYNSYM (isl_map_insert_dims); \
++  DYNSYM (isl_map_intersect); \
++  DYNSYM (isl_map_intersect_domain); \
++  DYNSYM (isl_map_intersect_range); \
++  DYNSYM (isl_map_is_empty); \
++  DYNSYM (isl_map_lex_ge); \
++  DYNSYM (isl_map_lex_le); \
++  /* DYNSYM (isl_map_n_out); */ \
++  DYNSYM (isl_map_range); \
++  DYNSYM (isl_map_set_tuple_id); \
++  DYNSYM (isl_map_universe); \
++  DYNSYM (isl_options_set_on_error); \
++  DYNSYM (isl_options_set_schedule_serialize_sccs); \
++  DYNSYM (isl_printer_set_yaml_style); \
++  DYNSYM (isl_options_set_schedule_max_constant_term); \
++  DYNSYM (isl_options_set_schedule_maximize_band_depth); \
++  DYNSYM (isl_printer_free); \
++  DYNSYM (isl_printer_print_aff); \
++  DYNSYM (isl_printer_print_constraint); \
++  DYNSYM (isl_printer_print_map); \
++  DYNSYM (isl_printer_print_set); \
++  DYNSYM (isl_printer_to_file); \
++  DYNSYM (isl_pw_aff_add); \
++  DYNSYM (isl_pw_aff_alloc); \
++  DYNSYM (isl_pw_aff_copy); \
++  DYNSYM (isl_pw_aff_eq_set); \
++  DYNSYM (isl_pw_aff_free); \
++  DYNSYM (isl_pw_aff_from_aff); \
++  DYNSYM (isl_pw_aff_ge_set); \
++  DYNSYM (isl_pw_aff_gt_set); \
++  DYNSYM (isl_pw_aff_is_cst); \
++  DYNSYM (isl_pw_aff_le_set); \
++  DYNSYM (isl_pw_aff_lt_set); \
++  DYNSYM (isl_pw_aff_mul); \
++  DYNSYM (isl_pw_aff_ne_set); \
++  DYNSYM (isl_pw_aff_nonneg_set); \
++  DYNSYM (isl_pw_aff_set_tuple_id); \
++  DYNSYM (isl_pw_aff_sub); \
++  DYNSYM (isl_pw_aff_zero_set); \
++  DYNSYM (isl_schedule_free); \
++  /* DYNSYM (isl_schedule_get_band_forest); */ \
++  DYNSYM (isl_set_add_constraint); \
++  DYNSYM (isl_set_add_dims); \
++  DYNSYM (isl_set_apply); \
++  DYNSYM (isl_set_coalesce); \
++  DYNSYM (isl_set_copy); \
++  DYNSYM (isl_set_dim); \
++  DYNSYM (isl_set_fix_si); \
++  DYNSYM (isl_set_free); \
++  DYNSYM (isl_set_get_space); \
++  DYNSYM (isl_set_get_tuple_id); \
++  DYNSYM (isl_set_intersect); \
++  DYNSYM (isl_set_is_empty); \
++  DYNSYM (isl_set_n_dim); \
++  DYNSYM (isl_set_nat_universe); \
++  DYNSYM (isl_set_project_out); \
++  DYNSYM (isl_set_set_tuple_id); \
++  DYNSYM (isl_set_universe); \
++  DYNSYM (isl_space_add_dims); \
++  DYNSYM (isl_space_alloc); \
++  DYNSYM (isl_space_copy); \
++  DYNSYM (isl_space_dim); \
++  DYNSYM (isl_space_domain); \
++  DYNSYM (isl_space_find_dim_by_id); \
++  DYNSYM (isl_space_free); \
++  DYNSYM (isl_space_from_domain); \
++  DYNSYM (isl_space_get_tuple_id); \
++  DYNSYM (isl_space_params_alloc); \
++  DYNSYM (isl_space_range); \
++  DYNSYM (isl_space_set_alloc); \
++  DYNSYM (isl_space_set_dim_id); \
++  DYNSYM (isl_space_set_tuple_id); \
++  DYNSYM (isl_union_map_add_map); \
++  DYNSYM (isl_union_map_align_params); \
++  DYNSYM (isl_union_map_apply_domain); \
++  DYNSYM (isl_union_map_apply_range); \
++  DYNSYM (isl_union_map_compute_flow); \
++  DYNSYM (isl_union_map_copy); \
++  DYNSYM (isl_union_map_empty); \
++  DYNSYM (isl_union_map_flat_range_product); \
++  DYNSYM (isl_union_map_foreach_map); \
++  DYNSYM (isl_union_map_free); \
++  DYNSYM (isl_union_map_from_map); \
++  DYNSYM (isl_union_map_get_ctx); \
++  DYNSYM (isl_union_map_get_space); \
++  DYNSYM (isl_union_map_gist_domain); \
++  DYNSYM (isl_union_map_gist_range); \
++  DYNSYM (isl_union_map_intersect_domain); \
++  DYNSYM (isl_union_map_is_empty); \
++  DYNSYM (isl_union_map_subtract); \
++  DYNSYM (isl_union_map_union); \
++  DYNSYM (isl_union_set_add_set); \
++  DYNSYM (isl_union_set_compute_schedule); \
++  DYNSYM (isl_union_set_copy); \
++  DYNSYM (isl_union_set_empty); \
++  DYNSYM (isl_union_set_from_set); \
++  DYNSYM (isl_aff_add_constant_val); \
++  DYNSYM (isl_aff_get_coefficient_val); \
++  DYNSYM (isl_aff_get_ctx); \
++  DYNSYM (isl_aff_mod_val); \
++  DYNSYM (isl_ast_build_ast_from_schedule); \
++  DYNSYM (isl_ast_build_free); \
++  DYNSYM (isl_ast_build_from_context); \
++  DYNSYM (isl_ast_build_get_ctx); \
++  DYNSYM (isl_ast_build_get_schedule); \
++  DYNSYM (isl_ast_build_get_schedule_space); \
++  DYNSYM (isl_ast_build_set_before_each_for); \
++  DYNSYM (isl_ast_build_set_options); \
++  DYNSYM (isl_ast_expr_free); \
++  DYNSYM (isl_ast_expr_from_val); \
++  DYNSYM (isl_ast_expr_get_ctx); \
++  DYNSYM (isl_ast_expr_get_id); \
++  DYNSYM (isl_ast_expr_get_op_arg); \
++  DYNSYM (isl_ast_expr_get_op_n_arg); \
++  DYNSYM (isl_ast_expr_get_op_type); \
++  DYNSYM (isl_ast_expr_get_type); \
++  DYNSYM (isl_ast_expr_get_val); \
++  DYNSYM (isl_ast_expr_sub); \
++  DYNSYM (isl_ast_node_block_get_children); \
++  DYNSYM (isl_ast_node_for_get_body); \
++  DYNSYM (isl_ast_node_for_get_cond); \
++  DYNSYM (isl_ast_node_for_get_inc); \
++  DYNSYM (isl_ast_node_for_get_init); \
++  DYNSYM (isl_ast_node_for_get_iterator); \
++  DYNSYM (isl_ast_node_free); \
++  DYNSYM (isl_ast_node_get_annotation); \
++  DYNSYM (isl_ast_node_get_type); \
++  DYNSYM (isl_ast_node_if_get_cond); \
++  DYNSYM (isl_ast_node_if_get_else); \
++  DYNSYM (isl_ast_node_if_get_then); \
++  DYNSYM (isl_ast_node_list_free); \
++  DYNSYM (isl_ast_node_list_get_ast_node); \
++  DYNSYM (isl_ast_node_list_n_ast_node); \
++  DYNSYM (isl_ast_node_user_get_expr); \
++  DYNSYM (isl_constraint_set_coefficient_val); \
++  DYNSYM (isl_constraint_set_constant_val); \
++  DYNSYM (isl_id_get_user); \
++  DYNSYM (isl_local_space_get_ctx); \
++  DYNSYM (isl_map_fix_val); \
++  DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \
++  DYNSYM (isl_printer_print_ast_node); \
++  DYNSYM (isl_printer_print_str); \
++  DYNSYM (isl_printer_set_output_format); \
++  DYNSYM (isl_pw_aff_mod_val); \
++  DYNSYM (isl_schedule_constraints_compute_schedule); \
++  DYNSYM (isl_schedule_constraints_on_domain); \
++  DYNSYM (isl_schedule_constraints_set_coincidence); \
++  DYNSYM (isl_schedule_constraints_set_proximity); \
++  DYNSYM (isl_schedule_constraints_set_validity); \
++  DYNSYM (isl_set_get_dim_id); \
++  DYNSYM (isl_set_max_val); \
++  DYNSYM (isl_set_min_val); \
++  DYNSYM (isl_set_params); \
++  DYNSYM (isl_space_align_params); \
++  DYNSYM (isl_space_map_from_domain_and_range); \
++  DYNSYM (isl_space_set_tuple_name); \
++  DYNSYM (isl_space_wrap); \
++  DYNSYM (isl_union_map_from_domain_and_range); \
++  DYNSYM (isl_union_map_range); \
++  DYNSYM (isl_union_set_union); \
++  DYNSYM (isl_union_set_universe); \
++  DYNSYM (isl_val_2exp); \
++  DYNSYM (isl_val_add_ui); \
++  DYNSYM (isl_val_copy); \
++  DYNSYM (isl_val_free); \
++  DYNSYM (isl_val_int_from_si); \
++  DYNSYM (isl_val_int_from_ui); \
++  DYNSYM (isl_val_mul); \
++  DYNSYM (isl_val_neg); \
++  DYNSYM (isl_val_sub); \
++  DYNSYM (isl_printer_print_union_map); \
++  DYNSYM (isl_pw_aff_get_ctx); \
++  DYNSYM (isl_val_is_int); \
++  DYNSYM (isl_ctx_get_max_operations); \
++  DYNSYM (isl_ctx_set_max_operations); \
++  DYNSYM (isl_ctx_last_error); \
++  DYNSYM (isl_ctx_reset_operations); \
++  DYNSYM (isl_map_coalesce); \
++  DYNSYM (isl_printer_print_schedule); \
++  DYNSYM (isl_set_set_dim_id); \
++  DYNSYM (isl_union_map_coalesce); \
++  DYNSYM (isl_multi_val_set_val); \
++  DYNSYM (isl_multi_val_zero); \
++  DYNSYM (isl_options_set_schedule_max_coefficient); \
++  DYNSYM (isl_options_set_tile_scale_tile_loops); \
++  DYNSYM (isl_schedule_copy); \
++  DYNSYM (isl_schedule_get_map); \
++  DYNSYM (isl_schedule_map_schedule_node_bottom_up); \
++  DYNSYM (isl_schedule_node_band_get_permutable); \
++  DYNSYM (isl_schedule_node_band_get_space); \
++  DYNSYM (isl_schedule_node_band_tile); \
++  DYNSYM (isl_schedule_node_child); \
++  DYNSYM (isl_schedule_node_free); \
++  DYNSYM (isl_schedule_node_get_child); \
++  DYNSYM (isl_schedule_node_get_ctx); \
++  DYNSYM (isl_schedule_node_get_type); \
++  DYNSYM (isl_schedule_node_n_children); \
++  DYNSYM (isl_union_map_is_equal); \
++  DYNSYM (isl_union_access_info_compute_flow); \
++  DYNSYM (isl_union_access_info_from_sink); \
++  DYNSYM (isl_union_access_info_set_may_source); \
++  DYNSYM (isl_union_access_info_set_must_source); \
++  DYNSYM (isl_union_access_info_set_schedule); \
++  DYNSYM (isl_union_flow_free); \
++  DYNSYM (isl_union_flow_get_may_dependence); \
++  DYNSYM (isl_union_flow_get_must_dependence); \
++  DYNSYM (isl_aff_var_on_domain); \
++  DYNSYM (isl_multi_aff_from_aff); \
++  DYNSYM (isl_schedule_get_ctx); \
++  DYNSYM (isl_multi_aff_set_tuple_id); \
++  DYNSYM (isl_multi_aff_dim); \
++  DYNSYM (isl_schedule_get_domain); \
++  DYNSYM (isl_union_set_is_empty); \
++  DYNSYM (isl_union_set_get_space); \
++  DYNSYM (isl_union_pw_multi_aff_empty); \
++  DYNSYM (isl_union_set_foreach_set); \
++  DYNSYM (isl_union_set_free); \
++  DYNSYM (isl_multi_union_pw_aff_from_union_pw_multi_aff); \
++  DYNSYM (isl_multi_union_pw_aff_apply_multi_aff); \
++  DYNSYM (isl_schedule_insert_partial_schedule); \
++  DYNSYM (isl_union_pw_multi_aff_free); \
++  DYNSYM (isl_pw_multi_aff_project_out_map); \
++  DYNSYM (isl_union_pw_multi_aff_add_pw_multi_aff); \
++  DYNSYM (isl_schedule_from_domain); \
++  DYNSYM (isl_schedule_sequence); \
++  DYNSYM (isl_ast_build_node_from_schedule); \
++  DYNSYM (isl_ast_node_mark_get_node); \
++  DYNSYM (isl_schedule_node_band_member_get_ast_loop_type); \
++  DYNSYM (isl_schedule_node_band_member_set_ast_loop_type); \
++  DYNSYM (isl_val_n_abs_num_chunks); \
++  DYNSYM (isl_val_get_abs_num_chunks); \
++  DYNSYM (isl_val_int_from_chunks); \
++  DYNSYM (isl_val_is_neg); \
++  DYNSYM (isl_version); \
++  DYNSYM (isl_options_get_on_error); \
++  DYNSYM (isl_ctx_reset_error);
++
++extern struct isl_pointers_s__
++{
++  bool inited;
++  void *h;
++#define DYNSYM(x) __typeof (x) *p_##x
++  DYNSYMS
++#undef DYNSYM
++} isl_pointers__;
++
++#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si)
++#define isl_aff_free (*isl_pointers__.p_isl_aff_free)
++#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space)
++#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si)
++#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si)
++#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain)
++#define isl_band_free (*isl_pointers__.p_isl_band_free)
++#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children)
++#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule)
++#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children)
++#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free)
++#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band)
++#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx)
++#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band)
++#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member)
++#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint)
++#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out)
++#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe)
++#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si)
++#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si)
++#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc)
++#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free)
++#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc)
++#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc)
++#define isl_id_copy (*isl_pointers__.p_isl_id_copy)
++#define isl_id_free (*isl_pointers__.p_isl_id_free)
++#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc)
++#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy)
++#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free)
++#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space)
++#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range)
++#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint)
++#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims)
++#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params)
++#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range)
++#define isl_map_copy (*isl_pointers__.p_isl_map_copy)
++#define isl_map_dim (*isl_pointers__.p_isl_map_dim)
++#define isl_map_dump (*isl_pointers__.p_isl_map_dump)
++#define isl_map_equate (*isl_pointers__.p_isl_map_equate)
++#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si)
++#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product)
++#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product)
++#define isl_map_free (*isl_pointers__.p_isl_map_free)
++#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map)
++#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff)
++#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map)
++#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx)
++#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space)
++#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id)
++#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims)
++#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect)
++#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain)
++#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range)
++#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty)
++#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge)
++#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le)
++#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out)
++#define isl_map_range (*isl_pointers__.p_isl_map_range)
++#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id)
++#define isl_map_universe (*isl_pointers__.p_isl_map_universe)
++#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error)
++#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs)
++#define isl_printer_set_yaml_style (*isl_pointers__.p_isl_printer_set_yaml_style)
++#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term)
++#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth)
++#define isl_printer_free (*isl_pointers__.p_isl_printer_free)
++#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff)
++#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint)
++#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map)
++#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set)
++#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file)
++#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add)
++#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc)
++#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy)
++#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set)
++#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free)
++#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff)
++#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set)
++#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set)
++#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst)
++#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set)
++#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set)
++#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul)
++#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set)
++#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set)
++#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id)
++#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub)
++#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set)
++#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free)
++#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest)
++#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint)
++#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims)
++#define isl_set_apply (*isl_pointers__.p_isl_set_apply)
++#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce)
++#define isl_set_copy (*isl_pointers__.p_isl_set_copy)
++#define isl_set_dim (*isl_pointers__.p_isl_set_dim)
++#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si)
++#define isl_set_free (*isl_pointers__.p_isl_set_free)
++#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space)
++#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id)
++#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect)
++#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty)
++#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim)
++#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe)
++#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out)
++#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id)
++#define isl_set_universe (*isl_pointers__.p_isl_set_universe)
++#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims)
++#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc)
++#define isl_space_copy (*isl_pointers__.p_isl_space_copy)
++#define isl_space_dim (*isl_pointers__.p_isl_space_dim)
++#define isl_space_domain (*isl_pointers__.p_isl_space_domain)
++#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id)
++#define isl_space_free (*isl_pointers__.p_isl_space_free)
++#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain)
++#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id)
++#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc)
++#define isl_space_range (*isl_pointers__.p_isl_space_range)
++#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc)
++#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id)
++#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id)
++#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map)
++#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params)
++#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain)
++#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range)
++#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow)
++#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy)
++#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty)
++#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product)
++#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map)
++#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free)
++#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map)
++#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx)
++#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space)
++#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain)
++#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range)
++#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain)
++#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty)
++#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract)
++#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union)
++#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set)
++#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule)
++#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy)
++#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty)
++#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set)
++#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val)
++#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val)
++#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx)
++#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val)
++#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule)
++#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free)
++#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context)
++#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx)
++#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule)
++#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space)
++#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for)
++#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options)
++#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free)
++#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val)
++#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx)
++#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id)
++#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg)
++#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg)
++#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type)
++#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type)
++#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val)
++#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub)
++#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children)
++#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body)
++#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond)
++#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc)
++#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init)
++#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator)
++#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free)
++#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation)
++#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type)
++#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond)
++#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else)
++#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then)
++#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free)
++#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node)
++#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node)
++#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr)
++#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val)
++#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val)
++#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user)
++#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx)
++#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val)
++#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound)
++#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node)
++#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str)
++#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format)
++#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val)
++#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule)
++#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain)
++#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence)
++#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity)
++#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity)
++#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id)
++#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val)
++#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val)
++#define isl_set_params (*isl_pointers__.p_isl_set_params)
++#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params)
++#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range)
++#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name)
++#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap)
++#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range)
++#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range)
++#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union)
++#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe)
++#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp)
++#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui)
++#define isl_val_copy (*isl_pointers__.p_isl_val_copy)
++#define isl_val_free (*isl_pointers__.p_isl_val_free)
++#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si)
++#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui)
++#define isl_val_mul (*isl_pointers__.p_isl_val_mul)
++#define isl_val_neg (*isl_pointers__.p_isl_val_neg)
++#define isl_val_sub (*isl_pointers__.p_isl_val_sub)
++#define isl_printer_print_union_map (*isl_pointers__.p_isl_printer_print_union_map)
++#define isl_pw_aff_get_ctx (*isl_pointers__.p_isl_pw_aff_get_ctx)
++#define isl_val_is_int (*isl_pointers__.p_isl_val_is_int)
++#define isl_ctx_get_max_operations (*isl_pointers__.p_isl_ctx_get_max_operations)
++#define isl_ctx_set_max_operations (*isl_pointers__.p_isl_ctx_set_max_operations)
++#define isl_ctx_last_error (*isl_pointers__.p_isl_ctx_last_error)
++#define isl_ctx_reset_operations (*isl_pointers__.p_isl_ctx_reset_operations)
++#define isl_map_coalesce (*isl_pointers__.p_isl_map_coalesce)
++#define isl_printer_print_schedule (*isl_pointers__.p_isl_printer_print_schedule)
++#define isl_set_set_dim_id (*isl_pointers__.p_isl_set_set_dim_id)
++#define isl_union_map_coalesce (*isl_pointers__.p_isl_union_map_coalesce)
++#define isl_multi_val_set_val (*isl_pointers__.p_isl_multi_val_set_val)
++#define isl_multi_val_zero (*isl_pointers__.p_isl_multi_val_zero)
++#define isl_options_set_schedule_max_coefficient (*isl_pointers__.p_isl_options_set_schedule_max_coefficient)
++#define isl_options_set_tile_scale_tile_loops (*isl_pointers__.p_isl_options_set_tile_scale_tile_loops)
++#define isl_schedule_copy (*isl_pointers__.p_isl_schedule_copy)
++#define isl_schedule_get_map (*isl_pointers__.p_isl_schedule_get_map)
++#define isl_schedule_map_schedule_node_bottom_up (*isl_pointers__.p_isl_schedule_map_schedule_node_bottom_up)
++#define isl_schedule_node_band_get_permutable (*isl_pointers__.p_isl_schedule_node_band_get_permutable)
++#define isl_schedule_node_band_get_space (*isl_pointers__.p_isl_schedule_node_band_get_space)
++#define isl_schedule_node_band_tile (*isl_pointers__.p_isl_schedule_node_band_tile)
++#define isl_schedule_node_child (*isl_pointers__.p_isl_schedule_node_child)
++#define isl_schedule_node_free (*isl_pointers__.p_isl_schedule_node_free)
++#define isl_schedule_node_get_child (*isl_pointers__.p_isl_schedule_node_get_child)
++#define isl_schedule_node_get_ctx (*isl_pointers__.p_isl_schedule_node_get_ctx)
++#define isl_schedule_node_get_type (*isl_pointers__.p_isl_schedule_node_get_type)
++#define isl_schedule_node_n_children (*isl_pointers__.p_isl_schedule_node_n_children)
++#define isl_union_map_is_equal (*isl_pointers__.p_isl_union_map_is_equal)
++#define isl_union_access_info_compute_flow (*isl_pointers__.p_isl_union_access_info_compute_flow)
++#define isl_union_access_info_from_sink (*isl_pointers__.p_isl_union_access_info_from_sink)
++#define isl_union_access_info_set_may_source (*isl_pointers__.p_isl_union_access_info_set_may_source)
++#define isl_union_access_info_set_must_source (*isl_pointers__.p_isl_union_access_info_set_must_source)
++#define isl_union_access_info_set_schedule (*isl_pointers__.p_isl_union_access_info_set_schedule)
++#define isl_union_flow_free (*isl_pointers__.p_isl_union_flow_free)
++#define isl_union_flow_get_may_dependence (*isl_pointers__.p_isl_union_flow_get_may_dependence)
++#define isl_union_flow_get_must_dependence (*isl_pointers__.p_isl_union_flow_get_must_dependence)
++#define isl_aff_var_on_domain (*isl_pointers__.p_isl_aff_var_on_domain)
++#define isl_multi_aff_from_aff (*isl_pointers__.p_isl_multi_aff_from_aff)
++#define isl_schedule_get_ctx (*isl_pointers__.p_isl_schedule_get_ctx)
++#define isl_multi_aff_set_tuple_id (*isl_pointers__.p_isl_multi_aff_set_tuple_id)
++#define isl_multi_aff_dim (*isl_pointers__.p_isl_multi_aff_dim)
++#define isl_schedule_get_domain (*isl_pointers__.p_isl_schedule_get_domain)
++#define isl_union_set_is_empty (*isl_pointers__.p_isl_union_set_is_empty)
++#define isl_union_set_get_space (*isl_pointers__.p_isl_union_set_get_space)
++#define isl_union_pw_multi_aff_empty (*isl_pointers__.p_isl_union_pw_multi_aff_empty)
++#define isl_union_set_foreach_set (*isl_pointers__.p_isl_union_set_foreach_set)
++#define isl_union_set_free (*isl_pointers__.p_isl_union_set_free)
++#define isl_multi_union_pw_aff_from_union_pw_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_from_union_pw_multi_aff)
++#define isl_multi_union_pw_aff_apply_multi_aff (*isl_pointers__.p_isl_multi_union_pw_aff_apply_multi_aff)
++#define isl_schedule_insert_partial_schedule (*isl_pointers__.p_isl_schedule_insert_partial_schedule)
++#define isl_union_pw_multi_aff_free (*isl_pointers__.p_isl_union_pw_multi_aff_free)
++#define isl_pw_multi_aff_project_out_map (*isl_pointers__.p_isl_pw_multi_aff_project_out_map)
++#define isl_union_pw_multi_aff_add_pw_multi_aff (*isl_pointers__.p_isl_union_pw_multi_aff_add_pw_multi_aff)
++#define isl_schedule_from_domain (*isl_pointers__.p_isl_schedule_from_domain)
++#define isl_schedule_sequence (*isl_pointers__.p_isl_schedule_sequence)
++#define isl_ast_build_node_from_schedule (*isl_pointers__.p_isl_ast_build_node_from_schedule)
++#define isl_ast_node_mark_get_node (*isl_pointers__.p_isl_ast_node_mark_get_node)
++#define isl_schedule_node_band_member_get_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_get_ast_loop_type)
++#define isl_schedule_node_band_member_set_ast_loop_type (*isl_pointers__.p_isl_schedule_node_band_member_set_ast_loop_type)
++#define isl_val_n_abs_num_chunks (*isl_pointers__.p_isl_val_n_abs_num_chunks)
++#define isl_val_get_abs_num_chunks (*isl_pointers__.p_isl_val_get_abs_num_chunks)
++#define isl_val_int_from_chunks (*isl_pointers__.p_isl_val_int_from_chunks)
++#define isl_val_is_neg (*isl_pointers__.p_isl_val_is_neg)
++#define isl_version (*isl_pointers__.p_isl_version)
++#define isl_options_get_on_error (*isl_pointers__.p_isl_options_get_on_error)
++#define isl_ctx_reset_error (*isl_pointers__.p_isl_ctx_reset_error)
++
+ typedef struct poly_dr *poly_dr_p;
+ 
+ typedef struct poly_bb *poly_bb_p;
+@@ -448,5 +1033,6 @@ extern tree cached_scalar_evolution_in_r
+ extern void dot_all_sese (FILE *, vec<sese_l> &);
+ extern void dot_sese (sese_l &);
+ extern void dot_cfg ();
++extern const char *get_isl_version (bool);
+ 
+ #endif
+--- gcc/graphite.cc.jj	2015-11-04 14:15:32.000000000 +0100
++++ gcc/graphite.cc	2015-11-04 14:56:02.645536409 +0100
+@@ -60,6 +60,35 @@ along with GCC; see the file COPYING3.
+ #include "tree-ssa-propagate.h"
+ #include "graphite.h"
+ 
++__typeof (isl_pointers__) isl_pointers__;
++
++static bool
++init_isl_pointers (void)
++{
++  void *h;
++
++  if (isl_pointers__.inited)
++    return isl_pointers__.h != NULL;
++  h = dlopen ("libisl.so.23", RTLD_LAZY);
++  isl_pointers__.h = h;
++  if (h == NULL)
++    return false;
++#define DYNSYM(x) \
++  do \
++    { \
++      union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \
++      u.q = dlsym (h, #x); \
++      if (u.q == NULL) \
++	return false; \
++      isl_pointers__.p_##x = u.p; \
++    } \
++  while (0)
++  DYNSYMS
++#undef DYNSYM
++  isl_pointers__.inited = true;
++  return true;
++}
++
+ /* Print global statistics to FILE.  */
+ 
+ static void
+@@ -424,6 +453,15 @@ graphite_transform_loops (void)
+   if (parallelized_function_p (cfun->decl))
+     return;
+ 
++  if (number_of_loops (cfun) <= 1)
++    return;
++
++  if (!init_isl_pointers ())
++    {
++      sorry ("Graphite loop optimizations cannot be used");
++      return;
++    }
++
+   calculate_dominance_info (CDI_DOMINATORS);
+ 
+   /* We rely on post-dominators during merging of SESE regions so those
+@@ -519,6 +557,14 @@ graphite_transform_loops (void)
+     }
+ }
+ 
++const char *
++get_isl_version (bool force)
++{
++  if (force)
++    init_isl_pointers ();
++  return (isl_pointers__.inited && isl_version) ? isl_version () : "none";
++}
++
+ #else /* If isl is not available: #ifndef HAVE_isl.  */
+ 
+ static void
+--- gcc/toplev.cc.jj	2017-02-19 13:02:31.000000000 +0100
++++ gcc/toplev.cc	2024-11-30 13:22:34.175096117 +0100
+@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3.
+ 
+ #ifdef HAVE_isl
+ #include <isl/version.h>
++extern const char *get_isl_version (bool);
+ #endif
+ 
+ static void general_init (const char *, bool, unique_argv original_argv);
+@@ -652,7 +653,7 @@ print_version (FILE *file, const char *i
+ #ifndef HAVE_isl
+ 	   "none"
+ #else
+-	   isl_version ()
++	   get_isl_version (*indent == 0)
+ #endif
+ 	   );
+   if (strcmp (GCC_GMP_STRINGIFY_VERSION, gmp_version))

diff --git a/gcc17-isl-dl2.patch b/gcc17-isl-dl2.patch
new file mode 100644
index 0000000..a07ff1d
--- /dev/null
+++ b/gcc17-isl-dl2.patch
@@ -0,0 +1,71 @@
+2011-04-04  Jakub Jelinek  <jakub@redhat.com>
+
+	* toplev.cc (toplev_main_argv): New variable.
+	(toplev_main): Initialize it.
+	* graphite.cc (init_isl_pointers): Load libisl.so.23 from gcc's private
+	directory.
+
+--- gcc/toplev.cc.jj	2008-12-09 23:59:10.000000000 +0100
++++ gcc/toplev.cc	2024-11-30 13:26:05.085132543 +0100
+@@ -112,6 +112,8 @@ static void finalize ();
+ static void crash_signal (int) ATTRIBUTE_NORETURN;
+ static void compile_file (void);
+ 
++const char **toplev_main_argv;
++
+ /* Decoded options, and number of such options.  */
+ struct cl_decoded_option *save_decoded_options;
+ unsigned int save_decoded_options_count;
+@@ -2296,6 +2298,8 @@ toplev::main (int argc, char **argv)
+ 
+   expandargv (&argc, &argv);
+ 
++  toplev_main_argv = const_cast <const char **> (argv);
++
+   /* Initialization of GCC's environment, and diagnostics.  */
+   general_init (argv[0], m_init_signals, std::move (original_argv));
+ 
+--- gcc/graphite.cc.jj	2010-12-01 10:24:32.000000000 -0500
++++ gcc/graphite.cc	2010-12-01 11:46:07.832118193 -0500
+@@ -64,11 +64,39 @@ __typeof (isl_pointers__) isl_pointers__
+ static bool
+ init_isl_pointers (void)
+ {
+-  void *h;
++  void *h = NULL;
++  extern const char **toplev_main_argv;
++  char *buf, *p;
++  size_t len;
+ 
+   if (isl_pointers__.inited)
+     return isl_pointers__.h != NULL;
+-  h = dlopen ("libisl.so.23", RTLD_LAZY);
++  len = progname - toplev_main_argv[0];
++  buf = XALLOCAVAR (char, len + sizeof "libisl.so.23");
++  memcpy (buf, toplev_main_argv[0], len);
++  strcpy (buf + len, "libisl.so.23");
++  len += sizeof "libisl.so.23";
++  p = strstr (buf, "/libexec/");
++  if (p != NULL)
++    {
++      while (1)
++	{
++	  char *q = strstr (p + 8, "/libexec/");
++	  if (q == NULL)
++	    break;
++	  p = q;
++	}
++      memmove (p + 4, p + 8, len - (p + 8 - buf));
++      h = dlopen (buf, RTLD_LAZY);
++      if (h == NULL)
++	{
++	  len = progname - toplev_main_argv[0];
++	  memcpy (buf, toplev_main_argv[0], len);
++	  strcpy (buf + len, "libisl.so.23");
++	}
++    }
++  if (h == NULL)
++    h = dlopen (buf, RTLD_LAZY);
+   isl_pointers__.h = h;
+   if (h == NULL)
+     return false;

diff --git a/gcc17-libgomp-omp_h-multilib.patch b/gcc17-libgomp-omp_h-multilib.patch
new file mode 100644
index 0000000..d0e98d1
--- /dev/null
+++ b/gcc17-libgomp-omp_h-multilib.patch
@@ -0,0 +1,17 @@
+2008-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.
+
+--- libgomp/omp.h.in.jj	2008-06-09 13:34:05.000000000 +0200
++++ libgomp/omp.h.in	2008-06-09 13:34:48.000000000 +0200
+@@ -42,8 +42,8 @@ typedef struct
+ 
+ typedef struct
+ {
+-  unsigned char _x[@OMP_NEST_LOCK_SIZE@] 
+-    __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
++  unsigned char _x[8 + sizeof (void *)] 
++    __attribute__((__aligned__(sizeof (void *))));
+ } omp_nest_lock_t;
+ #endif
+ 

diff --git a/gcc17-libstdc++-docs.patch b/gcc17-libstdc++-docs.patch
new file mode 100644
index 0000000..f971627
--- /dev/null
+++ b/gcc17-libstdc++-docs.patch
@@ -0,0 +1,24 @@
+--- libstdc++-v3/doc/html/index.html.jj	2011-01-03 12:53:21.282829010 +0100
++++ libstdc++-v3/doc/html/index.html	2011-01-04 18:06:28.999851145 +0100
+@@ -5,6 +5,8 @@
+       <a class="link" href="https://www.fsf.org" target="_top">FSF
+       </a>
+     </p><p>
++      Release 16.1.1
++    </p><p>
+       Permission is granted to copy, distribute and/or modify this
+       document under the terms of the GNU Free Documentation
+       License, Version 1.2 or any later version published by the
+--- libstdc++-v3/doc/html/api.html.jj	2011-01-03 12:53:21.000000000 +0100
++++ libstdc++-v3/doc/html/api.html	2024-11-30 13:30:16.607594623 +0100
+@@ -20,7 +20,9 @@
+   member functions for the library classes, finding out what is in a
+   particular include file, looking at inheritance diagrams, etc.
+ </p><p>
+-  The API documentation, rendered into HTML, can be viewed online
++  The API documentation, rendered into HTML, can be viewed locally
++  <a class="link" href="api/index.html" target="_top">for the 16.1.1 release</a>,
++  online
+   <a class="link" href="https://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
+   and
+   <a class="link" href="https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">

diff --git a/gcc17-libtool-no-rpath.patch b/gcc17-libtool-no-rpath.patch
new file mode 100644
index 0000000..8429a4c
--- /dev/null
+++ b/gcc17-libtool-no-rpath.patch
@@ -0,0 +1,27 @@
+libtool sucks.
+--- ltmain.sh.jj	2007-12-07 14:53:21.000000000 +0100
++++ ltmain.sh	2008-09-05 21:51:48.000000000 +0200
+@@ -5394,6 +5394,7 @@ EOF
+ 	  rpath="$finalize_rpath"
+ 	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+ 	  for libdir in $rpath; do
++	    case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
+ 	    if test -n "$hardcode_libdir_flag_spec"; then
+ 	      if test -n "$hardcode_libdir_separator"; then
+ 		if test -z "$hardcode_libdirs"; then
+@@ -6071,6 +6072,7 @@ EOF
+       rpath=
+       hardcode_libdirs=
+       for libdir in $compile_rpath $finalize_rpath; do
++	case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
+ 	if test -n "$hardcode_libdir_flag_spec"; then
+ 	  if test -n "$hardcode_libdir_separator"; then
+ 	    if test -z "$hardcode_libdirs"; then
+@@ -6120,6 +6122,7 @@ EOF
+       rpath=
+       hardcode_libdirs=
+       for libdir in $finalize_rpath; do
++	case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
+ 	if test -n "$hardcode_libdir_flag_spec"; then
+ 	  if test -n "$hardcode_libdir_separator"; then
+ 	    if test -z "$hardcode_libdirs"; then

diff --git a/gcc17-no-add-needed.patch b/gcc17-no-add-needed.patch
new file mode 100644
index 0000000..74f5c1f
--- /dev/null
+++ b/gcc17-no-add-needed.patch
@@ -0,0 +1,37 @@
+2010-02-08  Roland McGrath  <roland@redhat.com>
+
+	* config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
+	* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
+	* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
+
+--- gcc/config/alpha/elf.h.jj	2011-01-03 12:52:31.118056764 +0100
++++ gcc/config/alpha/elf.h	2011-01-04 18:14:10.931874160 +0100
+@@ -168,5 +168,5 @@ extern int alpha_this_gpdisp_sequence_nu
+    I imagine that other systems will catch up.  In the meantime, it
+    doesn't harm to make sure that the data exists to be used later.  */
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
++#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
+ #endif
+--- gcc/config/ia64/linux.h.jj	2011-01-03 13:02:11.462994522 +0100
++++ gcc/config/ia64/linux.h	2011-01-04 18:14:10.931874160 +0100
+@@ -76,7 +76,7 @@ do {						\
+    Signalize that because we have fde-glibc, we don't need all C shared libs
+    linked against -lgcc_s.  */
+ #undef LINK_EH_SPEC
+-#define LINK_EH_SPEC ""
++#define LINK_EH_SPEC "--no-add-needed "
+ 
+ #undef TARGET_INIT_LIBFUNCS
+ #define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
+--- gcc/config/gnu-user.h.jj	2011-01-03 12:53:03.739057299 +0100
++++ gcc/config/gnu-user.h	2011-01-04 18:14:10.932814884 +0100
+@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
+ #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
+ 
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
++#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
+ #endif
+ 
+ 

diff --git a/gcc17-pr119006.patch b/gcc17-pr119006.patch
new file mode 100644
index 0000000..dfbdaa9
--- /dev/null
+++ b/gcc17-pr119006.patch
@@ -0,0 +1,76 @@
+2025-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR ipa/119006
+	* ipa-icf-gimple.cc (func_checker::compare_operand): If t1 and t2
+	are ADDR_EXPRs, call operand_equal_p on their operands rather than on
+	the ADDR_EXPRs themselves.  Formatting fix.
+
+	* g++.dg/opt/pr119006.C: New test.
+
+--- gcc/ipa-icf-gimple.cc.jj	2025-02-01 00:50:02.080774328 +0100
++++ gcc/ipa-icf-gimple.cc	2025-02-27 14:35:19.931183246 +0100
+@@ -437,12 +437,23 @@ func_checker::compare_operand (tree t1,
+ 		 ("compare_ao_refs failed (dependence clique difference)");
+       gcc_unreachable ();
+     }
++  else if (TREE_CODE (t1) == ADDR_EXPR && TREE_CODE (t2) == ADDR_EXPR)
++    {
++      /* For ADDR_EXPR compare the operands of the ADDR_EXPR rather than
++	 the ADDR_EXPRs themselves.  operand_equal_p will compare the
++	 operands with OEP_ADDRESS_OF and only care about the value
++	 of the ADDR_EXPR, rather than e.g. types of MEM_REFs in there.
++	 Some optimizations use such details though, see PR119006.  */
++      if (operand_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0),
++			   OEP_MATCH_SIDE_EFFECTS))
++	return true;
++      return return_false_with_msg ("operand_equal_p failed");
++    }
+   else
+     {
+       if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS))
+ 	return true;
+-      return return_false_with_msg
+-		 ("operand_equal_p failed");
++      return return_false_with_msg ("operand_equal_p failed");
+     }
+ }
+ 
+--- gcc/testsuite/g++.dg/opt/pr119006.C.jj	2025-02-27 14:37:05.952707350 +0100
++++ gcc/testsuite/g++.dg/opt/pr119006.C	2025-02-27 14:36:29.251218260 +0100
+@@ -0,0 +1,36 @@
++// PR ipa/119006
++// { dg-do run { target c++11 } }
++// { dg-options "-O2 -fwhole-program" }
++
++struct A {
++  bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
++  char a[11];
++};
++
++struct B {
++  bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
++  bool operator!= (const char *x) const { return !(*this == x); }
++  char a[128];
++};
++
++[[gnu::noinline,gnu::used]] int
++foo (const A& lhs, const char* rhs)
++{
++  return lhs == rhs;
++}
++
++constexpr const char *t = "abcdefghijklmno";
++
++[[gnu::noinline,gnu::used]] void
++bar (B x)
++{
++  if (x != t) __builtin_abort ();
++}
++
++int
++main ()
++{
++  B b;
++  __builtin_strcpy (b.a, t);
++  bar (b);
++}

diff --git a/gcc17-rh1574936.patch b/gcc17-rh1574936.patch
new file mode 100644
index 0000000..bcc7000
--- /dev/null
+++ b/gcc17-rh1574936.patch
@@ -0,0 +1,21 @@
+crt files and statically linked libgcc objects cause false positives
+in annobin coverage, so we add the assembler flag to generate notes
+for them.
+
+The patch also adds notes to libgcc_s.so, but this is harmless because
+these notes only confer that there is no other annobin markup.
+
+2018-07-25  Florian Weimer  <fweimer@redhat.com>
+
+	* config/t-linux (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
+	-Wa,--generate-missing-build-notes=yes.
+
+--- libgcc/config/t-linux	2022-12-15 19:25:20.581394950 +0100
++++ libgcc/config/t-linux	2023-03-21 22:00:37.054478562 +0100
+@@ -1,3 +1,6 @@
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
+ SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
++
++LIBGCC2_CFLAGS += -Wa,--generate-missing-build-notes=yes
++CRTSTUFF_CFLAGS += -Wa,--generate-missing-build-notes=yes

diff --git a/gcc17-sparc-config-detection.patch b/gcc17-sparc-config-detection.patch
new file mode 100644
index 0000000..bbe8ec3
--- /dev/null
+++ b/gcc17-sparc-config-detection.patch
@@ -0,0 +1,40 @@
+--- gcc/config.gcc.jj	2008-04-24 15:42:46.000000000 -0500
++++ gcc/config.gcc	2008-04-24 15:44:51.000000000 -0500
+@@ -3330,7 +3330,7 @@ sparc-*-rtems*)
+ 	tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
+ 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
+ 	;;
+-sparc-*-linux*)
++sparc-*-linux* | sparcv9-*-linux*)
+ 	tm_file="${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
+ 	extra_options="${extra_options} sparc/long-double-switch.opt"
+ 	case ${target} in
+@@ -3384,7 +3384,7 @@ sparc64-*-rtems*)
+ 	extra_options="${extra_options}"
+ 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
+ 	;;
+-sparc64-*-linux*)
++sparc64*-*-linux*)
+ 	tm_file="sparc/biarch64.h ${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
+ 	extra_options="${extra_options} sparc/long-double-switch.opt"
+ 	tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
+--- libgcc/config.host.jj	2008-04-24 15:46:19.000000000 -0500
++++ libgcc/config.host	2008-04-24 15:46:49.000000000 -0500
+@@ -1002,7 +1002,7 @@ sparc-*-elf*)
+ 	tmake_file="${tmake_file} t-fdpbit t-crtfm"
+ 	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
+ 	;;
+-sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
++sparc-*-linux* | sparcv9-*-linux*)		# SPARC's running GNU/Linux, libc6
+ 	tmake_file="${tmake_file} t-crtfm"
+ 	if test "${host_address}" = 64; then
+ 		tmake_file="$tmake_file sparc/t-linux64"
+@@ -1050,7 +1050,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
+ 	tmake_file="$tmake_file t-crtfm"
+ 	extra_parts="$extra_parts crtfastmath.o"
+ 	;;
+-sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
++sparc64*-*-linux*)		# 64-bit SPARC's running GNU/Linux
+ 	extra_parts="$extra_parts crtfastmath.o"
+ 	tmake_file="${tmake_file} t-crtfm sparc/t-linux"
+ 	if test "${host_address}" = 64; then

diff --git a/sources b/sources
index b268725..cfd2d04 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-16.1.1-20260515.tar.xz) = 5b5b5cb2e0a1918298d02e6cac3388a2ae3b1cebfac2ed4d45499e43a43d61725ec3bdd97fff7b3da5bd8fd508e394b5f4b348c65ca699f815746053503469c6
+SHA512 (gcc-17.0.0-20260514s.tar.xz) = 86515f13cfebc6fc0201180826e412d53abdf4c5a0bdb03810b0b8f9c8a10a0f9bc9f6c302d5abf45d113de9eacd4d6f6261c1e5c714118a428dd200dd087a2f
 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881
 SHA512 (nvptx-tools-212da2e781ed0f9423824e85eb04819958513f7a.tar.xz) = 5a5509b0513843254ee2be277e0b8d4733f643b74b98c739e82872181a2c366b9b43de9e5fb505aa1e9967a382da59cab015f63011cbcb5972971f2160870f00

diff --git a/update-gcc.sh b/update-gcc.sh
index 47d7d70..aa4f4fd 100755
--- a/update-gcc.sh
+++ b/update-gcc.sh
@@ -1,36 +1,108 @@
 #!/bin/sh
-if [ "$#" -eq 0 ]; then
-  echo "Usage: ./update-gcc.sh gcc/redhat/heads/gcc-NN-branch_commit_hash [git_reference_dir_to_speed_up]"
+
+cleanup() {
+  rm -f P1 P2 P3 P4 P5
+  rm -rf gcc-dir.tmp
+}
+
+snapshot_instructions(){
+  v=$1
+  d=$2
+  echo "Snapshot for $d has been generated, artifacts:"
+  echo "- Tarball gcc-$v-$d.tar.xz generated."
+  echo "- fedpkg prep works fine, gcc-$v-999.$d.*.src.rpm generated."
+  echo
+  echo "Next steps:"
+  echo "* Make sure you have the right credentials for Fedora packaging and copr access."
+  echo "  For example, initialize your kerberos ticket using \`kinit\` and ensure that your copr API key has not expired."
+  echo "* Upload the tarball to the lookaside cache:"
+  echo "    fedpkg new-sources gcc-$v-$d.tar.xz `echo $(sed 's/SHA512 (\(.*\)) = [0-9a-f]\+$/\1/' sources | grep -v '^gcc-')`"
+  echo "* Commit all changes:"
+  echo "    git commit -a -m \"Snapshot $d\""
+  echo "* Push changes to dist-git:"
+  echo "    fedpkg push"
+  echo "* Issue a build in koji into the snapshot target:"
+  echo "    koji build --nowait rawhide-gcc-snapshot git+https://src.fedoraproject.org/rpms/gcc#\$(git rev-parse snapshot)"
+    chroot=
+    for arch in aarch64 i386 ppc64le s390x x86_64; do
+      chroot="$chroot --chroot fedora-rawhide-$arch"
+    done
+  echo "* Create a new project in the gcc-team copr namespace:"
+  echo "    copr create @gcc-team/gcc-snapshot-$d --description \"Upstream GCC snapshot built on $(date +'%a %b %0d %Y')\" $chroot"
+  echo "* Issue build in copr"
+  echo "    copr build --nowait --timeout 172800 @gcc-team/gcc-snapshot-$d gcc-$v-999.$d.*.src.rpm"
+}
+
+trap cleanup EXIT
+fedora_branch=$(git branch --show-current)
+
+if [ "$fedora_branch" == "snapshot" ]; then
+  h="trunk"
+  refdir=$1
+  r="999"
+  snap="s"
+else
+  h=$1
+  r="0"
+  snap=""
+  refdir=$2
+fi
+
+if [ -z $h ]; then
+  echo "Usage"
+  echo "  For Fedora release branches and rawhide:"
+  echo "    ./update-gcc.sh gcc/redhat/heads/gcc-NN-branch_commit_hash [git_reference_dir_to_speed_up]"
+  echo "  For snapshot:"
+  echo "    ./update-gcc.sh [git_reference_dir_to_speed_up]"
   exit 1
 fi
+
 export LC_ALL=C
 if ! [ -f gcc.spec ]; then echo Must be run in the directory with gcc.spec file.; exit 1; fi
 if [ -d gcc-dir.tmp ]; then echo gcc-dir.tmp already exists.; exit 1; fi
 v=`sed -n 's/^%global gcc_version //p' gcc.spec`
 p=`sed -n 's/^%global gitrev //p' gcc.spec`
-h=$1
-if [ "$#" -ge 2 ]; then
-  git clone --dissociate --reference $2 https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
+if [ -n "$refdir" ]; then
+  git clone --dissociate --reference $refdir https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
 else
   git clone https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
 fi
 git --git-dir=gcc-dir.tmp/.git fetch origin $h
 d=`date --iso | sed 's/-//g'`
 cd gcc-dir.tmp
+if [ "$fedora_branch" == "snapshot" ]; then
+  h="origin/$h"
+  echo "Sync HEAD: $(git show -s --pretty=oneline $h~1..$h)"
+  h=$(git rev-parse $h)
+fi
 git diff $p..$h > P1
 git log --format=%B `git log --format='%ae %H' $p..$h | awk '/^gccadmin@gcc.gnu.org/{print $2;exit 0}'`..$h > P2
 diff -up /dev/null P2 >> P1
 sed -n 's,^+[[:blank:]]\+PR \([a-z0-9+-]\+/[0-9]\+\)$,\1,p' P1 | sed 's/ - .*$//;s/[: ;.]//g' | LC_ALL=C sort -u -t / -k 1,1 -k 2,2n > P3
 > P4
 for i in `cat P3`; do if grep -F $i ../gcc.spec >/dev/null; then echo $i already recorded.; else echo $i >> P4; fi; done
+echo "* $(date +'%a %b %0d %Y') $(git config get user.name) <$(git config get user.email)> gcc-$v-$r.$d$snap.0" > P5
 case "$v" in
-  *.0.*) echo "- update from trunk" > P5;;
-  *) echo "- update from releases/gcc-`echo $v | sed 's/\..*$//'` branch" > P5;;
+  *.0.*) echo "- update from trunk" >> P5;;
+  *) echo "- update from releases/gcc-`echo $v | sed 's/\..*$//'` branch" >> P5;;
 esac
 echo `cat P4` | sed 's/ /, /g' | fold -w 71 -s | sed '1s/^/  - PRs /;2,$s/^/	/;s/, $/,/' >> P5
 echo >> P5
 cd ..
 sed -i -e '/^%global gitrev /s/ [0-9a-f]\+$/ '$h'/;/^%global DATE /s/ [0-9]\+$/ '$d'/;/^%changelog$/r gcc-dir.tmp/P5' gcc.spec
+if [ "$fedora_branch" == "snapshot" ]; then
+  d="${d}s"
+fi
 git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-$v-$d/ $h | xz -9e > gcc-$v-$d.tar.xz
 rm -rf gcc-dir.tmp
-fedpkg new-sources gcc-$v-$d.tar.xz `sed 's/SHA512 (\(.*\)) = [0-9a-f]\+$/\1/' sources | grep -v '^gcc-'`
+if [ "$fedora_branch" == "snapshot" ]; then
+  if fedpkg --release rawhide prep; then
+    fedpkg --release rawhide srpm
+    snapshot_instructions $v $d
+  else
+    echo "Prep failed!"
+    exit 1
+  fi
+else
+  fedpkg new-sources gcc-$v-$d.tar.xz `sed 's/SHA512 (\(.*\)) = [0-9a-f]\+$/\1/' sources | grep -v '^gcc-'`
+fi

                 reply	other threads:[~2026-06-04 14:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178058233246.1.9582647095717473380.rpms-gcc-3f7104c25882@fedoraproject.org \
    --to=siddhesh@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox