http://llvm.org/bugs/show_bug.cgi?id=18363
Bill Wendling <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Bill Wendling <[email protected]> --- (In reply to comment #2) > 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 > $ The documentation explicitly says that it must be a constant integer. You passed in an expression, which means that it's an error. The fact that it gets folded at higher optimizations levels is irrelevant. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
