On Tue, Jan 7, 2014 at 7:58 PM, Kostya Shishkov <[email protected]> wrote: > On Tue, Jan 07, 2014 at 02:25:06PM +0100, Luca Barbato wrote: >> Apparently gcc-4.8.2 miscompiles enums resulting in a lucky fpe soon >> after it. >> >> Passing the enum value as integer makes the ftype == FT_PPC condition >> evaluates correctly. >> --- >> >> I did not try to reduce a testcase to send it to gcc yet, volunteers willing >> to check the case and report to gcc are welcome to beat me at it. >> >> clang does not show the problem. >> >> libavcodec/twinvq.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c >> index 3006e9f..6d0a0ec 100644 >> --- a/libavcodec/twinvq.c >> +++ b/libavcodec/twinvq.c >> @@ -996,7 +996,7 @@ static void linear_perm(int16_t *out, int16_t *in, int >> n_blocks, int size) >> out[i] = block_size * (in[i] % n_blocks) + in[i] / n_blocks; >> } >> >> -static av_cold void construct_perm_table(TwinContext *tctx,enum FrameType >> ftype) >> +static av_cold void construct_perm_table(TwinContext *tctx, int ftype) >> { >> int block_size; >> const ModeTab *mtab = tctx->mtab; >> -- > > fine with me (and makes me wonder why I prefer not to use enums as > variables/arguments)
enum as arguments are used everywhere in the sources, any idea about what causes the actual miscompilation here? Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
