-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Description
Bugzilla Link | 844 |
Resolution | FIXED |
Resolved on | Feb 22, 2010 12:43 |
Version | trunk |
OS | MacOS X |
Reporter | LLVM Bugzilla Contributor |
CC | @lattner |
Extended Description
The following Objective-C++ file causes a reproducible internal compiler error when compiled with
llvm-gcc4 revision 17 from svn://anonsvn.opensource.apple.com/svn/llvm/. The error is only
generated when -fobjc-gc is passed to g++. This occurs even when llvm-gcc4 is built without LLVM
support enabled.
I initially filed this bug with Apple at http://bugreporter.apple.com/ as rdar://problem/4622335,
but they asked that I file it over here.
test.mm
template void foo(T v) { snprintf(v); }
Steps to Reproduce:
- Put the snippet above in test.mm
- /path/to/llvm-gcc/bin/g++ -c -o test-no-objc-gc.o test.mm
- /path/to/llvm-gcc/bin/g++ -c -fobjc-gc -o test-objc-gc.o test.mm
Expected Results:
I expect test-no-objc-gc.o to be created in step 2, and test-objc-gc.o in step 3.
Actual Results:
test-no-objc-gc.o is created in step 2, but step 3 results in an internal compiler error:
test.mm: In function ‘void foo(T)’:
test.mm:1: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://developer.apple.com/bugreporter for instructions.
Regression:
This does not occur with:
i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5341)