linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>,
	Dibyendu Majumdar <mobile@majumdar.org.uk>
Subject: Re: [PATCH] fix expansion of constant bitfield dereference
Date: Mon, 21 Aug 2017 18:14:38 +0200	[thread overview]
Message-ID: <CAMHZB6FaVescSVFrZK4x_=47Rs_zF=WNbgbSWhjgHhqUK9FXEw@mail.gmail.com> (raw)
In-Reply-To: <CANeU7Q=K4r4QSH0k6YCFadsDs5YN0+xt9As2F7XVxJNnddzOQw@mail.gmail.com>

On Mon, Aug 21, 2017 at 6:06 PM, Christopher Li <sparse@chrisli.org> wrote:
>
> I am referenitng to your email reply to Dibyendu:
>
> ===========================
> It's a very surprising bug. It's not a linearization or
> an optimization bug as the AST is already wrong.
> With a simpler test case, like:
>         struct s {
>                 char a:4;
>                 char b:4;
>         };
>
>         int foo(void)
>         {
>                 struct s x = { .a = 2, .b = 4 };
>
>                 return x.b;
>         }
>
> you can see that the linearization produce correct
> code for the initializer.
> You can also see that the return statement to be
> linearized is something like
>         STMT_RETURN
>                 ret_value: EXPR_VALUE (value = 2)


It's precisely this bug that this patch fixes.

>
> Yes, from your other email said there is a bug some where else
> in sparse yet. (the text I quote you).

-- Luc

  reply	other threads:[~2017-08-21 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20 22:16 [PATCH] fix expansion of constant bitfield dereference Luc Van Oostenryck
2017-08-20 22:19 ` Dibyendu Majumdar
2017-08-21 12:26 ` Christopher Li
2017-08-21 13:32   ` Dibyendu Majumdar
2017-08-21 13:41     ` Christopher Li
2017-08-21 13:42   ` Luc Van Oostenryck
2017-08-21 16:06     ` Christopher Li
2017-08-21 16:14       ` Luc Van Oostenryck [this message]
2017-08-21 16:46         ` 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='CAMHZB6FaVescSVFrZK4x_=47Rs_zF=WNbgbSWhjgHhqUK9FXEw@mail.gmail.com' \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mobile@majumdar.org.uk \
    --cc=sparse@chrisli.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).