[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-12-04 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #7 from Markus Trippelsdorf  ---
fixed

[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-11-30 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

--- Comment #6 from amker at gcc dot gnu.org ---
Author: amker
Date: Wed Nov 30 14:41:09 2016
New Revision: 243026

URL: https://gcc.gnu.org/viewcvs?rev=243026=gcc=rev
Log:
PR tree-optimization/78574
* tree-ssa-loop-ivopts.c (find_deriving_biv_for_expr): Skip loop
header PHI that doesn't define biv.
gcc/testsuite
PR tree-optimization/78574
* gcc.c-torture/compile/pr78574.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr78574.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-ivopts.c

[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-11-29 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

--- Comment #5 from amker at gcc dot gnu.org ---
Well, it is iv (maybe biv) in this case:
  _24 = j_11 + 1;
is in irreducible sub-loop, but _24 is a loop invariant wrto the sub-loop.  But
we don't have such information in GCC.  Thus mark_bivs skips it at below code:

  /* If the increment is in the subloop, ignore it.  */
  incr_bb = gimple_bb (SSA_NAME_DEF_STMT (var));
  if (incr_bb->loop_father != data->current_loop
  || (incr_bb->flags & BB_IRREDUCIBLE_LOOP))
continue;

[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-11-29 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

--- Comment #4 from amker at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #2)
> Seems there is infinite recursion in find_deriving_biv_for_expr.
> It endlessly alternates being called on lhs of
> j_11 = PHI 
> and lhs of
> _24 = j_11 + 1;
> get_iv (data, expr) for these returns iv with biv_p = false, base of j_18(D)
> or j_18(D) + 1, step 1.  Dunno why there isn't a biv.

I think it's not even a valid IV because the increment is in an inner loop
which is irreducible.  we may need to identify the case and break out early.

[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-11-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

Richard Biener  changed:

   What|Removed |Added

  Component|c   |tree-optimization
   Target Milestone|--- |7.0