Description of problem:
Trying to compile some code with a template function results in an internal
compiler error (Segmentation fault)
Version-Release number of selected component (if applicable):
gcc-c++ version 4.1.1 release 51.fc6
Steps to Reproduce:
1. Create files (or use attached code)
const unsigned short mask = length ?
((unsigned short) 0 | (unsigned short) 0) : 0;
short testShort = 1 & mask;
2. Attempt to compile:
g++ test.cpp -o test
test.h: In function âvoid foo()â:
test.h:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cc8sZmsq.out file, please attach this to
Executable file test should be created.
The included code is convoluted, but is the best I was able to do to cut down
the code that actually caused the problem.
Created attachment 153428 [details]