While building libdv using gcc (clang untested) with -faggressive-loop-optimizations CFLAG set, I get this kind of message: iteration 11 invokes undefined behavior in libdv/encode.c Then, forcing adding -fno-aggressive-loop-optimizations and -fno--unsafe-loop-optimizations too all flags (for safety) solves the issue. Reproducible: Always Steps to Reproduce: 1. Put -faggressive-loop-optimizations -Wno-aggressive-loop-optimizations in compilation flags 2. Emerge libdv 3. See the output Actual Results: I got the 'undefined behavior' warning message Expected Results: It seems better not to have undefined behavior. The way I did is create a file in /etc/portage/env with the following and use it for libdv adding a reference in /etc/portage/package.env ADD_FLAGS="-fno-aggressive-loop-optimizations -fno-unsafe-loop-optimizations" CFLAGS="${CFLAGS} ${ADD_FLAGS} " CXXFLAGS="${CXXFLAGS} ${ADD_FLAGS}" FCFLAGS="${FCFLAGS} ${ADD_FLAGS}" FFLAGS="${FFLAGS} ${ADD_FLAGS}" LDFLAGS="${LDFLAGS} ${ADD_FLAGS}"
Created attachment 824819 [details] output from emerge --info =media-libs/libdv-1.0.0-r4
Created attachment 824821 [details] Log file for failing merge