linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Christopher Li <sparse@chrisli.org>
Subject: [PATCH 0/3] fix discarded label statement
Date: Thu, 10 Nov 2016 15:45:17 +0100	[thread overview]
Message-ID: <20161110144520.24965-1-luc.vanoostenryck@gmail.com> (raw)

This series fixes a bug occurring when code contains an unsed statement.
In this case, not only the label is ignored, but the following statement
is also erroneously discarded together with the label.

This can be easily verified by inspecting the output of test-linearize
but can't be tested directly with the current test suite.
So patches 1 & 2 contain two small improvements to the test suite that
allow to test this sort of thing directly, the fix itself and its test
are in patch 3.

Luc Van Oostenryck (3):
  testsuite: add tag to ignore the output/error
  testsuite: check patterns presence or absence in output
  fix discarded label statement

 Documentation/test-suite               | 16 ++++++++++
 linearize.c                            |  2 +-
 validation/discarded-label-statement.c | 24 +++++++++++++++
 validation/test-suite                  | 54 ++++++++++++++++++++++++++++++++++
 4 files changed, 95 insertions(+), 1 deletion(-)
 create mode 100644 validation/discarded-label-statement.c

-- 
2.10.1


             reply	other threads:[~2016-11-10 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 14:45 Luc Van Oostenryck [this message]
2016-11-10 14:45 ` [PATCH 1/3] testsuite: add tag to ignore the output/error Luc Van Oostenryck
2016-11-17 17:15   ` Christopher Li
2016-11-10 14:45 ` [PATCH 2/3] testsuite: check patterns presence or absence in output Luc Van Oostenryck
2016-11-10 14:45 ` [PATCH 3/3] fix discarded label statement Luc Van Oostenryck
2016-11-17 17:19   ` 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=20161110144520.24965-1-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --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).