[LLVMbugs] [Bug 18363] clang crashes on valid code at -O0 with -ftrapv (affecting all clang versions)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 9 17:06:48 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18363

Zhendong Su <su at cs.ucdavis.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Zhendong Su <su at cs.ucdavis.edu> ---
Bill, I don't think that this has been fixed really. The crash is indeed gone,
but the inconsistent behavior doesn't seem desired --- the code is rejected at
-O0, but accepted at -O1 and above. 

Please see below: 

$ clang-trunk -v
clang version 3.5 (trunk 198876)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
$ 
$ clang-trunk -O0 -ftrapv -c small.c
error: argument to '__builtin_return_address' must be a constant integer
1 error generated.
$ 
$ clang-trunk -O1 -ftrapv -c small.c
$

-- 
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/20140110/0d254f0f/attachment.html>


More information about the llvm-bugs mailing list