This looks like a compiler bug.
bin/bash ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o byocbtris.lo byocbtris.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c byocbtris.cpp -fPIC -DPIC -o .libs/byocbtris.o /tmp/ccQ2nsvc.s: Assembler messages: /tmp/ccQ2nsvc.s:5100: Error: r13 not allowed here -- `rsb ip,sp,ip,lsl#2'
Reduced testcase : g++ -c -O2 -march=armv7-a tst.cpp
$> cat tst.cpp
#include <string.h> typedef int ChunkConfig[16];
void AlignChunk(ChunkConfig& chunk) {
int rowsShift = 0; while ( rowsShift<4 ) { bool isEmpty = true; for ( int x=0; x<4; x++ ) if ( chunk[rowsShift*4+x] != 0 ) { isEmpty = false; break; } if ( !isEmpty ) break; rowsShift++; }
int colsShift = 0; while ( colsShift<4 ) { bool isEmpty = true; for ( int y=0; y<4; y++ ) if ( chunk[colsShift+y*4] != 0 ) { isEmpty = false; break; } if ( !isEmpty ) break; colsShift++; }
if ( !colsShift && !rowsShift ) return;
ChunkConfig newChunk; memset(newChunk,0,sizeof(newChunk)); for ( int y=rowsShift,y2=0; y<4; y++,y2++ ) for ( int x=colsShift,x2=0; x<4; x++,x2++ ) newChunk[x2+y2*4] = chunk[x+y*4]; memcpy(chunk,newChunk,sizeof(chunk)); }
Ramana
This looks like a compiler bug.
bin/bash ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. /../../ src/include -I/usr/ lib/wx/ include/ gtk2-unicode- release- 2.8 -I/usr/ include/ wx-2.8 -D_FILE_ OFFSET_ BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../.. /../../ src/include -I../.. /../../ src/sdk/ wxscintilla/ include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o byocbtris.lo byocbtris.cpp /../../ src/include -I/usr/ lib/wx/ include/ gtk2-unicode- release- 2.8 -I/usr/ include/ wx-2.8 -D_FILE_ OFFSET_ BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../.. /../../ src/include -I../.. /../../ src/sdk/ wxscintilla/ include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c byocbtris.cpp -fPIC -DPIC -o .libs/byocbtris.o s:5100: Error: r13 not allowed here -- `rsb ip,sp,ip,lsl#2'
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../..
/tmp/ccQ2nsvc.s: Assembler messages:
/tmp/ccQ2nsvc.
Reduced testcase :
g++ -c -O2 -march=armv7-a tst.cpp
$> cat tst.cpp
#include <string.h>
typedef int ChunkConfig[16];
void AlignChunk( ChunkConfig& chunk)
{
int rowsShift = 0; *4+x] != 0 )
isEmpty = false;
break;
rowsShift+ +;
while ( rowsShift<4 )
{
bool isEmpty = true;
for ( int x=0; x<4; x++ )
if ( chunk[rowsShift
{
}
if ( !isEmpty ) break;
}
int colsShift = 0; +y*4] != 0 )
isEmpty = false;
break;
colsShift+ +;
while ( colsShift<4 )
{
bool isEmpty = true;
for ( int y=0; y<4; y++ )
if ( chunk[colsShift
{
}
if ( !isEmpty ) break;
}
if ( !colsShift && !rowsShift ) return;
ChunkConfig newChunk; newChunk, 0,sizeof( newChunk) );
newChunk[ x2+y2*4] = chunk[x+y*4]; chunk,newChunk, sizeof( chunk)) ;
memset(
for ( int y=rowsShift,y2=0; y<4; y++,y2++ )
for ( int x=colsShift,x2=0; x<4; x++,x2++ )
memcpy(
}
Ramana