On Mon, Mar 11, 2019 at 10:05 AM Eric Botcazou <ebotca...@adacore.com> wrote: > > Hi, > > this is the failure of the assertion: > > /* Should not get here (such loop should be peeled instead). */ > gcc_assert (niter > max_unroll + 1); > > in unroll_loop_constant_iterations on a testcase both containing #pragma GCC > unroll and compiled with -fno-tree-loop-optimize. The proposed fix is just to > disable the pragma altogether when the option is passed. > > Tested on x86_64-suse-linux, OK for mainline and 8 branch?
Hmm, this looks fragile - isn't the same effect when using -fdisable-tree-cunroll? That is, it looks like we could "move" the assert to decide_unrolling instead, deciding LPT_NONE? Richard. > > 2019-03-11 Eric Botcazou <ebotca...@adacore.com> > > PR rtl-optimization/89588 > * tree-cfg.c (replace_loop_annotate_in_block) > <annot_expr_unroll_kind>: > Skip annotation and warn if -fno-tree-loop-optimize is specified. > > > 2019-03-11 Eric Botcazou <ebotca...@adacore.com> > > * c-c++-common/unroll-6.c: New test. > > -- > Eric Botcazou