https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185
Bug ID: 99185
Summary: asan initialization-order-fiasco false positive
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185
--- Comment #1 from kal.conley at dectris dot com ---
Strict init-order checking is enabled.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185
--- Comment #3 from kal.conley at dectris dot com ---
I don't think there should be any dynamic initialization of A here. Also, its
weird that if the definition if A is changed to:
struct A {
int value = 0;
A() = default;
};
then the error g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185
--- Comment #5 from kal.conley at dectris dot com ---
I don't think this has anything to do with C++20. The behavior doesn't change
when compiling for C++17. In any case, `g` should be static initialized with
zeros and no dynamic initialization in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185
--- Comment #7 from kal.conley at dectris dot com ---
There is no fiasco here because the default constructor of `A` does no dynamic
initialization. If the definition of `A` is changed to:
struct A {
int value;
};
then the error goes away. How