https://llvm.org/bugs/show_bug.cgi?id=26040
Bug ID: 26040 Summary: clang crashes on autoconf test involving #pragma weak Product: clang Version: 3.4 Hardware: PC OS: FreeBSD Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: fuz...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified This bug has also been reported to the FreeBSD bug tracker [1] and could be reproduced on amd64 Ubuntu 14.04. Further analysis (as described on the “how to submit” page) shows that the bug occurs in the frontend. The following very short C program triggers a bug in /usr/bin/cc (Clang 3.4.1) on amd64 FreeBSD 10.2-RELEASE: extern int test2(); #pragma weak test2 = test1 int test1() {return 0;} int main() { return test2(); ; return 0; } This program is used as a configure test in the Schily utilities, it's supposed to test if the compiler correctly supports SysV #pragma weak, though it's not supposed to induce a compiler crash. The output of /usr/bin/cc is: Stack dump: 0. Program arguments: /usr/bin/cc -cc1 -triple x86_64-unknown-freebsd10.2 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name clang-bug.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -coverage-file /tmp/clang-bug.o -resource-dir /usr/bin/../lib/clang/3.4.1 -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-slp -o clang-bug.o -x c clang-bug.c 1. clang-bug.c:5:14: current parser token ')' 2. clang-bug.c:4:12: parsing function body 'main' 3. clang-bug.c:4:12: in compound statement ('{}') cc: error: unable to execute command: Segmentation fault (core dumped) cc: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. cc: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/clang-bug-60a5bb.c cc: note: diagnostic msg: /tmp/clang-bug-60a5bb.sh cc: note: diagnostic msg: ******************** [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205934 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs