Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Marek Polacek
On Fri, Apr 01, 2016 at 07:22:24PM +0200, Jakub Jelinek wrote: > On Fri, Apr 01, 2016 at 07:10:06PM +0200, Marek Polacek wrote: > > On Fri, Apr 01, 2016 at 06:17:57PM +0200, Jakub Jelinek wrote: > > > Those comparisons with truthvalue_*_node would fail and DTRT. > > > Or just c_fully_fold_internal

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Jakub Jelinek
On Fri, Apr 01, 2016 at 07:10:06PM +0200, Marek Polacek wrote: > On Fri, Apr 01, 2016 at 06:17:57PM +0200, Jakub Jelinek wrote: > > Those comparisons with truthvalue_*_node would fail and DTRT. > > Or just c_fully_fold_internal all the arguments, be ready for any future > > further uses of VEC_COND

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Marek Polacek
On Fri, Apr 01, 2016 at 06:17:57PM +0200, Jakub Jelinek wrote: > Those comparisons with truthvalue_*_node would fail and DTRT. > Or just c_fully_fold_internal all the arguments, be ready for any future > further uses of VEC_COND_EXPR early? ..thus revive my earlier version of the patch that does i

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Jakub Jelinek
On Fri, Apr 01, 2016 at 06:14:00PM +0200, Marek Polacek wrote: > On Fri, Apr 01, 2016 at 06:02:24PM +0200, Jakub Jelinek wrote: > > On Fri, Apr 01, 2016 at 09:54:39AM -0600, Jeff Law wrote: > > > >--- gcc/c/c-fold.c > > > >+++ gcc/c/c-fold.c > > > >@@ -528,6 +528,23 @@ c_fully_fold_internal (tree e

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Marek Polacek
On Fri, Apr 01, 2016 at 06:02:24PM +0200, Jakub Jelinek wrote: > On Fri, Apr 01, 2016 at 09:54:39AM -0600, Jeff Law wrote: > > >--- gcc/c/c-fold.c > > >+++ gcc/c/c-fold.c > > >@@ -528,6 +528,23 @@ c_fully_fold_internal (tree expr, bool in_init, bool > > >*maybe_const_operands, > > > *maybe_const

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Jakub Jelinek
On Fri, Apr 01, 2016 at 09:54:39AM -0600, Jeff Law wrote: > >--- gcc/c/c-fold.c > >+++ gcc/c/c-fold.c > >@@ -528,6 +528,23 @@ c_fully_fold_internal (tree expr, bool in_init, bool > >*maybe_const_operands, > > *maybe_const_itself &= op2_const_self; > >goto out; > > > >+case VEC_COND

Re: [C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Jeff Law
On 04/01/2016 09:03 AM, Marek Polacek wrote: This is another case where a C_MAYBE_CONST_EXPR leaks into the gimplifier. Starting with r229128 and thus introduction of build_vec_cmp we now create VEC_COND_EXPR when building a vector comparison. The C_MAYBE_CONST_EXPR originated in build_compound_

[C PATCH] Fix ICE with VEC_COND_EXPR and compound literals (PR c/70307)

2016-04-01 Thread Marek Polacek
This is another case where a C_MAYBE_CONST_EXPR leaks into the gimplifier. Starting with r229128 and thus introduction of build_vec_cmp we now create VEC_COND_EXPR when building a vector comparison. The C_MAYBE_CONST_EXPR originated in build_compound_literal when creating a COMPOUND_LITERAL_EXPR.