public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/95396] [8/9/10/11 Regression] GCC produces incorrect code with -O3 for loops since r8-6511-g3ae129323d150621
Date: Tue, 07 Jul 2020 08:00:53 +0000	[thread overview]
Message-ID: <bug-95396-4-Vyn4T5OJqk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95396-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95396

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Creating dr for arr_26[_5]
analyze_innermost: success.
        base_address: &arr_26
        offset from base address: (ssizetype) ((sizetype) (char) _3 * 2)
        constant offset from base address: -482
        step: 2
        base alignment: 32
        base misalignment: 0
        offset alignment: 2
        step alignment: 2
        base_object: arr_26
        Access function 0: {(int) e_12, +, 1}_1

the constant offset is odd and indeed we end up storing outside of the
array:

10              arr_26[e] = 42;
(gdb) p/x $rax + 0x601860
$2 = 0x601660
(gdb) p &arr_26
$3 = (unsigned short (*)[20]) 0x601860 <arr_26>

  parent reply	other threads:[~2020-07-07  8:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:44 [Bug tree-optimization/95396] New: GCC produces incorrect code with -O3 for loops vsevolod.livinskij at frtk dot ru
2020-05-29  6:36 ` [Bug tree-optimization/95396] " rguenth at gcc dot gnu.org
2020-05-29  7:13 ` [Bug tree-optimization/95396] [8/9/10/11 Regression] GCC produces incorrect code with -O3 for loops since r8-6511-g3ae129323d150621 marxin at gcc dot gnu.org
2020-06-15  3:20 ` babokin at gmail dot com
2020-06-26 12:07 ` rguenth at gcc dot gnu.org
2020-07-06 21:42 ` babokin at gmail dot com
2020-07-07  8:00 ` rguenth at gcc dot gnu.org [this message]
2020-07-07  8:20 ` rguenth at gcc dot gnu.org
2020-07-07  8:26 ` rguenth at gcc dot gnu.org
2020-12-08 19:51 ` marxin at gcc dot gnu.org
2020-12-09  9:10 ` rguenth at gcc dot gnu.org
2020-12-09 17:03 ` rsandifo at gcc dot gnu.org
2020-12-09 19:42 ` marxin at gcc dot gnu.org
2020-12-10  9:46 ` rsandifo at gcc dot gnu.org
2020-12-10 12:11 ` [Bug tree-optimization/95396] [8/9/10 " rsandifo at gcc dot gnu.org
2021-04-23  9:21 ` rsandifo at gcc dot gnu.org

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-95396-4-Vyn4T5OJqk@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: 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).