id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
510,Android internal compiler error on qcelpdec.c when NEON is used,dmitrykos,,"Android compiler (gcc version 4.4.3 (GCC)) is failing (internal compiler) to compile qcelpdec.c if NEON is enabled as fpu.

Error happens for this function 'qcelp_decode_frame' but tracking the roots of problem I arrived to 'postfilter' function:

this loop is causing failure:

{{{
for (n = 0; n < 10; n++) {
    lpc_s[n] = lpc[n] * pow_0_625[n];
    lpc_p[n] = lpc[n] * pow_0_775[n];
}
}}}

to resolve the problem I tried to unroll it and compiler error is gone:

{{{
#define QCELP_POSTFILTER_LPC__MPOW(N)\
	lpc_s[(N)] = lpc[(N)] * pow_0_625[(N)];\
	lpc_p[(N)] = lpc[(N)] * pow_0_775[(N)]

    QCELP_POSTFILTER_LPC__MPOW(0);
    QCELP_POSTFILTER_LPC__MPOW(1);
    QCELP_POSTFILTER_LPC__MPOW(2);
    QCELP_POSTFILTER_LPC__MPOW(3);
    QCELP_POSTFILTER_LPC__MPOW(4);
    QCELP_POSTFILTER_LPC__MPOW(5);
    QCELP_POSTFILTER_LPC__MPOW(6);
    QCELP_POSTFILTER_LPC__MPOW(7);
    QCELP_POSTFILTER_LPC__MPOW(8);
    QCELP_POSTFILTER_LPC__MPOW(9);
	
#undef QCELP_POSTFILTER_LPC__MPOW
}}}

Most probably it happens due to error in NEON vectoriser and thus unrolling helps.",defect,closed,normal,avcodec,git-master,wontfix,,,,,0,0
