On Fri, May 07, 2021 at 08:47:02AM -0500, will schmidt wrote: > On Fri, 2021-05-07 at 12:19 +0930, Alan Modra via Gcc-patches wrote: > > --- a/gcc/varasm.c > > +++ b/gcc/varasm.c > > @@ -6866,6 +6866,26 @@ default_elf_asm_named_section (const char > > *name, unsigned int flags, > > *f = '\0'; > > } > > > > + char func_label[256]; > > + if (flags & SECTION_LINK_ORDER) > > + { > > + static int recur; > > + if (recur) > > + gcc_unreachable (); > > Interesting.. Is there any anticipation of re-entry or parallel runs > through this function that requires the recur lock/protection?
Not parallel runs :-) But: > > + else > > + { > > + ++recur; > > + section *save_section = in_section; > > + static int func_code_labelno; > > + switch_to_section (function_section (decl)); This could in theory call us again. That should not be a problem, if > > + ++func_code_labelno; (Please use postfix increments btw) ...this is done *before* the call, so that we get two different labels. Segher