public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "James K. Lowden" <jklowden@schemamania.org>
To: gcc@gcc.gnu.org
Cc: David Brown <david@westcontrol.com>
Subject: Re: issue: unexpected results in optimizations
Date: Wed, 13 Dec 2023 13:49:44 -0500	[thread overview]
Message-ID: <20231213134944.7b49a899e145eaf1e4e8fcf5@schemamania.org> (raw)
In-Reply-To: <ul968v$v7$1@ciao.gmane.io>

On Tue, 12 Dec 2023 09:39:58 +0100
David Brown via Gcc <gcc@gcc.gnu.org> wrote:

> If you have fixed the immediate problems in the code, add the 
> "-fsanitize=undefined" flag before running it.  That will do run-time 
> undefined behaviour checks.

I would like to understand that better, for reasons you might guess.  

-fsanitize is described under Program Instrumentation Options, but much
of the terminology seems to C, and some of the options are documented
to work only with C or C++. 

If it applies to the generated code irrespective of the front-end, then
could the options be described in terms of Generic?  For example,
signed-integer-overflow, bounds, and bounds-strict would seem to be
useful in any language that defines integers and arrays.  I also wonder
if "integer" includes _Float128. 

"-fsanitize" appears only once in the Internals document, under 

	bool TARGET_MEMTAG_CAN_TAG_ADDRESSES

If I knew when contructs were needed for particular options to work, I
could add them to the documentation.  

--jkl

  reply	other threads:[~2023-12-14 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 17:14 Jingwen Wu
2023-12-12  8:39 ` David Brown
2023-12-13 18:49   ` James K. Lowden [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-11 17:07 Jingwen Wu
2023-12-11 17:31 ` Dave Blanchard
2023-12-12  8:29   ` Jonathan Wakely
2023-12-12  9:02 ` Jonathan Wakely
2023-12-12 11:08   ` Alexander Monakov
2023-12-11 17:05 Jingwen Wu
2023-12-11 16:51 Jingwen Wu

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=20231213134944.7b49a899e145eaf1e4e8fcf5@schemamania.org \
    --to=jklowden@schemamania.org \
    --cc=david@westcontrol.com \
    --cc=gcc@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).