https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109164
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|thread_local initialization |thread_local initialization |error with -ftree-pre |error with -ftree-pre |-foptimize-sibling-calls | Known to fail| |11.3.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a testcase which fails at `-O1 -ftree-pre` and does not need `-foptimize-sibling-calls`: struct Struct { virtual void virtual_func(); }; extern thread_local Struct& thread_local_ref; bool other_func(void); bool test_func(void) { while (1) { thread_local_ref.virtual_func(); if (!other_func()) return 0; } }