From: Theodoros Theodoridis <theodoros.theodoridis@inf.ethz.ch>
To: <gcc-help@gcc.gnu.org>
Subject: Value Range Analysis of source code variables
Date: Mon, 30 May 2022 16:08:29 +0200 [thread overview]
Message-ID: <f025e4c5-9e9b-0049-9406-d24dc0a28dbe@inf.ethz.ch> (raw)
Hello,
is there a way to query the value range analysis results for source-code
level variables?
For example, given the following piece of code:
|static int a = 0; int main(){ int b = 42; if (b > 0){ a = 2; } b = 1;
return 0; } |
Is there a way to “ask” gcc what the value ranges (or sets) of |a| and
|b| are?
The result would be, assuming gcc can figure this out, |a = {0,2}| and
|b = {1, 42}| or |a in [0,2]| and |b in [1,42]|.
Thanks,
Theo
reply other threads:[~2022-05-30 14:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f025e4c5-9e9b-0049-9406-d24dc0a28dbe@inf.ethz.ch \
--to=theodoros.theodoridis@inf.ethz.ch \
--cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).