https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79956
--- Comment #29 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 13 Mar 2017, trippels at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79956 > > --- Comment #28 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- > (In reply to Thomas Koenig from comment #26) > > Patch at https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00619.html > > rejected at https://gcc.gnu.org/ml/fortran/2017-03/msg00052.html > > due to runtime overhead. > > > > Maybe it would be possible to suppress the warnings by > > enclosing the offending lines with > > > > #pragma GCC diagnostic push > > #pragma GCC ignored "-Wmaybe-uninitialized" > > > > ... > > > > #pragma GCC diagnostic pop > > I don't think that sprinkling the tree with #pragmas is a good idea. > > Maybe gcc should simply use -Wno-error=maybe-uninitialized during bootstrap > generally, because these warnings normally just point to harmless optimization > issues. Just commented on the mailinglist that constraining input values is good for optimization. So libgfortran might use sth like #define GFC_ASSERT(EXPR) \ ((void)(__builtin_expect (!(EXPR), 0) ? __builtin_unreachable (), 0 : 0))