From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Emily Maier <emily@emilymaier.net>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH 1/2] linearize: Emit C99 declarations correctly
Date: Wed, 2 Nov 2016 14:57:55 +0100 [thread overview]
Message-ID: <20161102135754.GA9029@macpro.local> (raw)
In-Reply-To: <1462365584-20536-1-git-send-email-emily@emilymaier.net>
On Wed, May 04, 2016 at 08:39:43AM -0400, Emily Maier wrote:
> Variables declared with C99 syntax inside a for statement should be
> linearized in the loop top, rather than implicitly inside the loop body.
>
> Signed-off-by: Emily Maier <emily@emilymaier.net>
> ---
> linearize.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/linearize.c b/linearize.c
> index c6ada1e..1309c7d 100644
> --- a/linearize.c
> +++ b/linearize.c
> @@ -1946,7 +1946,11 @@ static pseudo_t linearize_iterator(struct entrypoint *ep, struct statement *stmt
> struct statement *post_statement = stmt->iterator_post_statement;
> struct expression *post_condition = stmt->iterator_post_condition;
> struct basic_block *loop_top, *loop_body, *loop_continue, *loop_end;
> + struct symbol *sym;
>
> + FOR_EACH_PTR(stmt->iterator_syms, sym) {
> + linearize_one_symbol(ep, sym);
> + } END_FOR_EACH_PTR(sym);
> concat_symbol_list(stmt->iterator_syms, &ep->syms);
> linearize_statement(ep, pre_statement);
>
> --
Interesting catch!
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
next prev parent reply other threads:[~2016-11-02 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 12:39 [PATCH 1/2] linearize: Emit C99 declarations correctly Emily Maier
2016-05-04 12:39 ` [PATCH 2/2] validation: Check C99 for loop variables Emily Maier
2016-11-02 14:04 ` Luc Van Oostenryck
2016-11-02 13:57 ` Luc Van Oostenryck [this message]
2016-11-17 9:14 ` [PATCH 1/2] linearize: Emit C99 declarations correctly Christopher Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161102135754.GA9029@macpro.local \
--to=luc.vanoostenryck@gmail.com \
--cc=emily@emilymaier.net \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.