https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65400
--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- ok, this should fix the second regression: Index: tsan.c =================================================================== --- tsan.c (revision 221355) +++ tsan.c (working copy) @@ -682,6 +682,7 @@ { if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) instrument_builtin_call (gsi); + gimple_call_set_tail (as_a <gcall *> (stmt), false); return true; } else if (is_gimple_assign (stmt) -- opcua_p_binary.c.103t.sink-{ opcua_p_binary.c.103t.sink- OpcUa_StatusCode retval.25; opcua_p_binary.c.103t.sink- opcua_p_binary.c.103t.sink- <bb 2>: opcua_p_binary.c.103t.sink: retval.25_5 = OpcUa_Float_P_NativeToWire (wire_2(D), native_3(D)); [tail call] opcua_p_binary.c.103t.sink: return retval.25_5; opcua_p_binary.c.103t.sink- opcua_p_binary.c.103t.sink-} -- opcua_p_binary.c.105t.tsan1- <bb 2>: opcua_p_binary.c.105t.tsan1- _6 = __builtin_return_address (0); opcua_p_binary.c.105t.tsan1- __builtin___tsan_func_entry (_6); opcua_p_binary.c.105t.tsan1: retval.25_5 = OpcUa_Float_P_NativeToWire (wire_2(D), native_3(D)); opcua_p_binary.c.105t.tsan1- __builtin___tsan_func_exit (); opcua_p_binary.c.105t.tsan1: return retval.25_5; opcua_p_binary.c.105t.tsan1- opcua_p_binary.c.105t.tsan1-} see the "[tail call]" is removed, and the generated code is now OK. trying to use -O3 next.