public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "siddhesh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108398] tree-object-size trips up with pointer arithmetic if an intermediate result is an invalid pointer Date: Fri, 13 Jan 2023 18:24:48 +0000 [thread overview] Message-ID: <bug-108398-4-5WnFPZ5pmN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108398-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108398 --- Comment #3 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> --- Oops, sorry I messed up the reproducer, here's the correct one. The principles don't really change though: unsigned steps[2]; int main(void) { unsigned n_steps = sizeof (steps) / sizeof (unsigned); for (unsigned *io = steps; 0 < n_steps; io++) { if (*io == 0) { __builtin_printf ("%zu\n", __builtin_dynamic_object_size (io, 0)); if (__builtin_dynamic_object_size (io, 0) < sizeof (unsigned)) __builtin_abort (); n_steps--; io--; } } return 0; }
next prev parent reply other threads:[~2023-01-13 18:24 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-13 17:41 [Bug tree-optimization/108398] New: " siddhesh at gcc dot gnu.org 2023-01-13 17:51 ` [Bug tree-optimization/108398] " law at gcc dot gnu.org 2023-01-13 18:08 ` siddhesh at gcc dot gnu.org 2023-01-13 18:24 ` siddhesh at gcc dot gnu.org [this message] 2023-01-13 18:30 ` jakub at gcc dot gnu.org 2023-01-13 19:51 ` siddhesh at gcc dot gnu.org 2023-01-13 19:52 ` yann at droneaud dot fr 2023-01-13 19:55 ` siddhesh at gcc dot gnu.org 2023-01-13 19:58 ` jakub at gcc dot gnu.org 2023-01-13 20:25 ` siddhesh at gcc dot gnu.org 2023-01-15 11:20 ` yann at droneaud dot fr
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=bug-108398-4-5WnFPZ5pmN@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).