https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91307

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
A simple two-file testcase like

static void init(void) __attribute__((constructor));
static void init()
{
  static volatile int i = 0;
}

int main() { return 0; }

----

static void init2(void) __attribute__((constructor));
static void init2()
{
    static volatile int i = 0;
}

reproduces this.  Having two ctors (in different CUs) is important.

Reply via email to