Internal compiler error for __asm__ calls in templates
Jeffrey Ng
jeffng@dcs.qmw.ac.uk
Mon May 8 09:44:00 GMT 2000
The following template code works fine except when the __asm__
instruction is added
struct TCState{
int m; // model
float p,a,r; // phase, amplitude, time scaling
};
template <class StoreType> class CondenModel{
private:
TCState *samples; int sampleCount;
....
void initSamples(int sampleSize);
.....
};
template <class StoreType>
void inline CondenModel<StoreType>::initSamples(int sampleSize){
__asm__ ("prefetchw (%0)": : "g" (samples));
<-- Internal compiler error
for (int count=0; count < sampleSize; count++){
initSample(count);
sampleWeight[count] = 1.0/sampleSize;
}
}
prefetchw is an AMD 3DNow cache control instruction which should not
have any bearing at this stage of the problem.
gcc version 2.7.2.3
g++ -c sceneConden.cc
condenModel.cc: In method `void
CondenModel<StoreType>::initSamples(int)':
In file included from sceneConden.cc:12:
condenModel.cc:183: Internal compiler error.
condenModel.cc:183: Please submit a full bug report to
`egcs-bugs@cygnus.com'.
Machine used, AMD Athlon 550 with 384 megs of RAM.
Thanks,
Jeffrey Ng.
More information about the Gcc-bugs
mailing list