Hi, I am trying to run gcc.c-torture cases by using clang(version 3.4 realse,debug build). And my command line is showed following. clang fprintf-chk-1.c -O2 -c -o test.o gcc test.o -o test.elf Then I execute this object. However it fail with abort. llvm doesn't support volatile variable? This test case is from gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c Any suggestion will be appreciated. Thanks a million in advance. -Haishan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140327/67d49cb4/attachment.html>
Tim Northover
2014-Mar-27 16:02 UTC
[LLVMdev] Question about volatile variable in X86 backend
Hi Haishan,> Then I execute this object. However it fail with abort. > llvm doesn't support volatile variable?It looks like that test is actually trying to find out whether GCC knows any special semantics for __fprintf_chk rather than whether it can handle volatiles. Clang doesn't do anything in particular with that function so it "fails". It's compiling the file correctly as far as I can see. Cheers. Tim.