https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103910
--- Comment #4 from Sergei Trofimovich <slyfox at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > This should fix the issue: > apinski@xeond:~/src/upstream-gcc/gcc/gcc/config/i386$ git diff i386.h > diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h > index f027608eefa..3ac0f698ae2 100644 > --- a/gcc/config/i386/i386.h > +++ b/gcc/config/i386/i386.h > @@ -486,7 +486,7 @@ extern unsigned char ix86_prefetch_sse; > > /* Fence to use after loop using storent. */ > > -extern tree x86_mfence; > +extern GTY(()) tree x86_mfence; > #define FENCE_FOLLOWING_MOVNT x86_mfence > > /* Once GDB has been enhanced to deal with functions without frame This fix helps to build openjdk17 on patched gcc. Thank you!