When I compile my project that use libpng I found out this bug.
Looks like this bug related to NDK c/c++ compilator.
Log:
"Compile thumb : png <= pngrtran.c
jni/libpng/pngrtran.c: In function 'png_do_expand':
jni/libpng/pngrtran.c:3790:1: internal compiler error: in reload, at reload1.c:1061
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [obj/local/armeabi/objs-debug/png/pngrtran.o] Error 1
Code which make this error:
if (*(sp - 5) == red_high &&
*(sp - 4) == red_low &&
*(sp - 3) == green_high && //this line make error
*(sp - 2) == green_low && //this line make error
*(sp - 1) == blue_high &&
*(sp ) == blue_low)
{
*dp-- = 0;
*dp-- = 0;
}
So if comment lines below bug will not occures (line with comments //this line make error).
Actualy the bug will be if you simple write somewhere sp = sp - 3 or sp = sp - 2
There is no this bug on early versions of NDK (I check on cristalx-7 and 5) and on other compilators.
Theme on stack-overflow:
http://stackoverflow.com/questions/11980870/error-on-building-android-ndk-assets/12234953
Thanks.