[Bug c++/99185] New: asan initialization-order-fiasco false positive

2021-02-20 Thread kal.conley at dectris dot com via Gcc-bugs
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:

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-20 Thread kal.conley at dectris dot com via Gcc-bugs
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

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-20 Thread kal.conley at dectris dot com via Gcc-bugs
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.

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-22 Thread kal.conley at dectris dot com via Gcc-bugs
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

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-22 Thread kal.conley at dectris dot com via Gcc-bugs
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.