[Bug tree-optimization/83521] [6/7 Regression] ICE: verify_gimple failed (error: invalid operand in unary operation)

2017-12-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83521

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Fri Dec 22 08:51:26 2017
New Revision: 255969

URL: https://gcc.gnu.org/viewcvs?rev=255969=gcc=rev
Log:
Backported from mainline
2017-12-21  Jakub Jelinek  

PR tree-optimization/83521
* tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
gimple_build_assign without code on result of
fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
a VIEW_CONVERT_EXPR.

* gcc.dg/pr83521.c: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr83521.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-ssa-phiopt.c

[Bug tree-optimization/83521] [6/7 Regression] ICE: verify_gimple failed (error: invalid operand in unary operation)

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83521

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7/8 Regression] ICE: |[6/7 Regression] ICE:
   |verify_gimple failed|verify_gimple failed
   |(error: invalid operand in  |(error: invalid operand in
   |unary operation)|unary operation)

--- Comment #4 from Jakub Jelinek  ---
Fixed on the trunk so far.