aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2022-02-22 15:49:09 +0000
committerSegher Boessenkool <segher@kernel.crashing.org>2022-02-22 16:20:23 +0000
commit537c96588026aec09b9a00d6d0f3670f612428b5 (patch)
tree50d329031ca53aff0a48b7f2ccb141051c264578
parente9f8443a9179c0e9e0d96dfa91c883d6ddb70d3b (diff)
downloadgcc-537c96588026aec09b9a00d6d0f3670f612428b5.zip
gcc-537c96588026aec09b9a00d6d0f3670f612428b5.tar.gz
gcc-537c96588026aec09b9a00d6d0f3670f612428b5.tar.bz2
rs6000: Fix GC on rs6000.c decls for atomic handling (PR88134)
In PR88134 it is pointed out that we do not have GTY markup for some variables we use for atomic. So, let's add that. 2022-02-22 Segher Boessenkool <segher@kernel.crashing.org> PR target/88134 * config/rs6000/rs6000.cc (atomic_hold_decl, atomic_clear_decl, atomic_update_decl): Add GTY markup.
-rw-r--r--gcc/config/rs6000/rs6000.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index ca9e7b8..a855e8c 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -27699,14 +27699,13 @@ emit_fusion_gpr_load (rtx target, rtx mem)
return "";
}
-
-#ifdef RS6000_GLIBC_ATOMIC_FENV
-/* Function declarations for rs6000_atomic_assign_expand_fenv. */
-static tree atomic_hold_decl, atomic_clear_decl, atomic_update_decl;
-#endif
+/* This is not inside an #ifdef RS6000_GLIBC_ATOMIC_FENV because gengtype
+ ignores it then. */
+static GTY(()) tree atomic_hold_decl;
+static GTY(()) tree atomic_clear_decl;
+static GTY(()) tree atomic_update_decl;
/* Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV hook. */
-
static void
rs6000_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
{