[Bug c/104884] functions miss their 'ret' instruction (and fall through) in certain cases with '-O3' under x86-64

2022-03-11 Thread zamfofex at twdb dot moe via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104884 --- Comment #4 from zamfofex at twdb dot moe --- I would have expected that compilers would at least try to avoid incorporating behaving in a way that is deemed dangerous, even when a program causes undefined behavior. But to be honest, I unders

[Bug c/104884] functions miss their 'ret' instruction (and fall through) in certain cases with '-O3' under x86-64

2022-03-11 Thread zamfofex at twdb dot moe via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104884 --- Comment #2 from zamfofex at twdb dot moe --- Isn’t it dangerous to allow the control to accidentally leak out of a function like that, though? If a function is written in a way that expects the compiler to not allow the control to leak out of

[Bug c/104884] New: functions miss their 'ret' instruction (and fall through) in certain cases with '-O3' under x86-84

2022-03-11 Thread zamfofex at twdb dot moe via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104884 Bug ID: 104884 Summary: functions miss their 'ret' instruction (and fall through) in certain cases with '-O3' under x86-84 Product: gcc Version: 11.2.0 Status: UNCONFIRM