On Fri, Jun 10, 2016 at 06:04:47PM +0200, Marek Polacek wrote:
> > Wouldn't it be better to just walk_gimple_seq with NULL callback_op
> > and non-NULL callback_stmt that would stop on the first real stmt in there?
>
> Ok, such as in the following?
>
> > Also, the above loop looks confusing, I'd
On Fri, Jun 10, 2016 at 02:52:08PM +0200, Jakub Jelinek wrote:
> Won't this just give up on say:
> void
> foo (int a, int b)
> {
> switch (a)
> {
> { int c; }
> { int d; }
> { int e; }
> b++;
> case 1:
> break;
> }
> }
>
> ? Such blocks can also be can
On Fri, Jun 10, 2016 at 02:36:23PM +0200, Marek Polacek wrote:
> --- gcc/gimplify.c
> +++ gcc/gimplify.c
> @@ -1559,6 +1559,50 @@ gimplify_statement_list (tree *expr_p, gimple_seq
> *pre_p)
>return GS_ALL_DONE;
> }
>
> +/* Possibly warn about unreachable statements between switch's controll
On Fri, Jun 10, 2016 at 02:36:23PM +0200, Marek Polacek wrote:
> While working on something else I discovered this ICE-on-invalid.
> The problem is that when looking into the innermost lexical scope,
> gimple_bind_body might be null, so check 'seq' first before checking
> its gimple_code.
> I facto
While working on something else I discovered this ICE-on-invalid.
The problem is that when looking into the innermost lexical scope,
gimple_bind_body might be null, so check 'seq' first before checking
its gimple_code.
I factored the code to its own function so that I can simply 'return'.
Bootstra