https://llvm.org/bugs/show_bug.cgi?id=25309
Bug ID: 25309 Summary: Miscompilation with K&R function prototype Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Backend: PowerPC Assignee: unassignedb...@nondot.org Reporter: an...@samba.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified creduce gave me the following cut down testcase: #include <assert.h> static int i; static int *volatile m = &i, *o = &i; static void zot(void) { assert(*o); } void blah() { } int main(void) { *o = 0; *m = 1; blah(&o); zot(); return 0; } I was somewhat surprised clang accepts K&R function prototypes, but it does, and we miscompile the testcase at -O2. -- 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