Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Andreas Schwab
Richard Biener writes: > On Wed, 20 Jan 2016, Andreas Schwab wrote: > >> Jakub Jelinek writes: >> >> > +"memory input %d is not directly addressable", >> >> What does that mean? > > Is "input %d is not addressable" better? If that's the same what the standard calls "ad

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Jakub Jelinek
On Wed, Jan 20, 2016 at 03:14:04PM +0100, Andreas Schwab wrote: > Jakub Jelinek writes: > > > + "memory input %d is not directly addressable", > > What does that mean? That is preexisting diagnostic wording, just for the cases that can be handled by preloading the var i

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Richard Biener
On Wed, 20 Jan 2016, Andreas Schwab wrote: > Jakub Jelinek writes: > > > + "memory input %d is not directly addressable", > > What does that mean? Is "input %d is not addressable" better? Otherwise the patch looks ok. Richard.

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Andreas Schwab
Jakub Jelinek writes: > + "memory input %d is not directly addressable", What does that mean? Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Jakub Jelinek
On Wed, Jan 20, 2016 at 02:59:14PM +0100, Marek Polacek wrote: > > + warning_at (EXPR_HAS_LOCATION (TREE_VALUE (link)) > > + ? EXPR_HAS_LOCATION (TREE_VALUE (link)) > > + : input_location, 0, > > This looks wrong, I think you meant EXPR_H

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Marek Polacek
On Wed, Jan 20, 2016 at 02:51:52PM +0100, Jakub Jelinek wrote: > On Wed, Jan 20, 2016 at 10:41:47AM +0100, Richard Biener wrote: > > > We already do diagnose tons of other cases for inline asm at > > > gimplification time. I can replace the error with a warning followed by > > > copying it to addr

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Jakub Jelinek
On Wed, Jan 20, 2016 at 10:41:47AM +0100, Richard Biener wrote: > > We already do diagnose tons of other cases for inline asm at > > gimplification time. I can replace the error with a warning followed by > > copying it to addressable memory, that seems to be what the older gccs were > > doing dur

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Richard Biener
On Wed, 20 Jan 2016, Jakub Jelinek wrote: > On Wed, Jan 20, 2016 at 10:24:40AM +0100, Richard Biener wrote: > > > We could diagnose a statement expression in "m", but not sure if that is > > > all > > > that can get wrong, or if all statement expressions are problematic. > > > > I thought about

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Jakub Jelinek
On Wed, Jan 20, 2016 at 10:24:40AM +0100, Richard Biener wrote: > > We could diagnose a statement expression in "m", but not sure if that is all > > that can get wrong, or if all statement expressions are problematic. > > I thought about either requiring an lvalue here or at least diagnosing > tha

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-20 Thread Richard Biener
On Tue, 19 Jan 2016, Jakub Jelinek wrote: > On Tue, Jan 19, 2016 at 10:00:00AM +0100, Richard Biener wrote: > > On Tue, 19 Jan 2016, Jakub Jelinek wrote: > > > Here is an attempt to fix ICE on statement expression in "m" asm input > > > operand. The problem is that gimplify_asm_expr attempts to m

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-19 Thread Jakub Jelinek
On Tue, Jan 19, 2016 at 10:00:00AM +0100, Richard Biener wrote: > On Tue, 19 Jan 2016, Jakub Jelinek wrote: > > Here is an attempt to fix ICE on statement expression in "m" asm input > > operand. The problem is that gimplify_asm_expr attempts to mark it > > addressable, but that can be just too la

Re: [PATCH] Fix ICE with asm "m" (stmt-expr) operand (PR middle-end/67653)

2016-01-19 Thread Richard Biener
On Tue, 19 Jan 2016, Jakub Jelinek wrote: > Hi! > > Here is an attempt to fix ICE on statement expression in "m" asm input > operand. The problem is that gimplify_asm_expr attempts to mark it > addressable, but that can be just too late, a temporary the stmt-expression > gimplifies to might not