Issue 149675
Summary C `goto` loops are optimized out in LLVM versions ABOVE 12
Labels new issue
Assignees
Reporter gkgoat1
    Resurgence of [old bug 965](https://bugs.llvm.org/show_bug.cgi?id=965) within C loops made with `goto` statements. Since they aren't iteration statements, they should not be affected and should not be required to progress. This bug has existed since at least Clang 20, possibly stretching back to Clang 12. This should not cause problems with Rust code, but their team probably should be contacted anyway

[this C source](https://github.com/turbolent/w2c2/pull/121#issuecomment-3092556403) reproduces, on latest Clang

This is a miscompilation, but usually comes up in compiler outputs, not hand-written source; Rust, Zig, and modern LLVM languages should not be affected as they never set any progress attributes. (C++ faces this issue only in `extern "C"` function definitions, which are rarely compiled to)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to