check for ISL generated code that leads to division by zero
we used to generate modulo and division by zero because ISL uses big numbers
which translate to zero in modulo arithmetic. The patch also improves error handling
and bails out early in case of wrong code gen.
PR tree-optimization/68565
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Early return on
codegen_error. Fail when rhs of division operations is integer_zerop.
(ternary_op_to_tree): Early return on codegen_error.
(unary_op_to_tree): Same.
(nary_op_to_tree): Same.
(gcc_expression_from_isl_expr_op): Same.
(gcc_expression_from_isl_expression): Same.
(graphite_create_new_loop): On codegen_error continue generating
wrong code.
(graphite_create_new_loop_guard): Same.
(build_iv_mapping): Same.
(graphite_create_new_guard): Same.
* gfortran.dg/graphite/pr68565.f90: New.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r231086