Hello,
I have a program which compiles fine on Opensuse 12.1 (gcc 4.6) with
and without optimisation.
In factory I get an internal compiler error if I use an optimsation
level >0 (e.g. -O1).
My installed gcc packages:
gcc-4.7-1.1.x86_64
gcc47-4.7.0_20120413-2.1.x86_64
gcc47-c++-4.7.0_20120413-2.1.x86_64
gcc-c++-4.7-1.1.x86_64
Compilation output:
$ g++ -O2 test.cpp.
test.cpp: In function ‘uint8_t* findMarker_bin(uint8_t*, const
uint8_t*)’: test.cpp:34:1: internal compiler error: Abgebrochen
Please submit a full bug report,
with preprocessed source if appropriate.
Here is the stripped down program test.cpp:
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include
#include <cstdio>
static const int marker[] = { 0xAC, 0xDC, 0xAC, 0xDC };
inline static uint8_t *findMarker_bin(uint8_t * curFilePos,
const uint8_t * const fileEnd)
{
for (;;) {
if ((*curFilePos == marker[0]) && (*(curFilePos + 1) ==
marker[1]) && (*(curFilePos + 2) == marker[2])
&& (*(curFilePos + 3) == marker[3])) {
return curFilePos + 4;
} else {
curFilePos++;
if (curFilePos >= fileEnd - 3) {
printf("end of mapped file reached!\n");
return 0;
}
}
}
}
int main(int argc, char **argv)
{
uint8_t *curPos=NULL, *endPos=NULL;
curPos = findMarker_bin(curPos, endPos);
return 0;
}
Does somebody experience similar problems?
Dieter
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-factory+owner@opensuse.org