[llvm-bugs] [Bug 47416] [x86] Failure to remove all statements in function that doesn't return anything but should

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 7 08:12:37 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47416

Sanjay Patel <spatel+llvm at rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
 Fixed By Commit(s)|                            |b22910daab95

--- Comment #8 from Sanjay Patel <spatel+llvm at rotateright.com> ---
Should be fixed with more instcombine zapping:
https://reviews.llvm.org/rGb22910daab95

Depending on target, we may do better than nothing on UB code as shown in the
description. For example, on x86, I see a 'ud2' instruction, so that should
crash and make the programmer aware of their buggy code even if they ignore the
compile-time warning:
47416.cpp:5:1: warning: non-void function does not return a value
[-Wreturn-type]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200907/5a0f0cbf/attachment.html>


More information about the llvm-bugs mailing list