public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "law at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105517] New: [13 Regression] Missing diagnostic after recent optimizer improvements
Date: Sat, 07 May 2022 15:12:49 +0000	[thread overview]
Message-ID: <bug-105517-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105517
           Summary: [13 Regression] Missing diagnostic after recent
                    optimizer improvements
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

This change:

commit ee1cb43bc76de800efa0ade687b0cd28e62a5f82
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jan 26 15:34:54 2022 +0100

    tree-optimization/104162 - CSE of &MEM[ptr].a[i] and ptr + CST

    This adds the capability to value-numbering of treating complex
    address expressions where the offset becomes invariant as equal
    to a POINTER_PLUS_EXPR.  This restores CSE that is now prevented
    by early lowering of &MEM[ptr + CST] to a POINTER_PLUS_EXPR.

    Unfortunately this regresses gcc.dg/asan/pr99673.c again, so
    the testcase is adjusted accordingly.

    2022-01-26  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104162
            * tree-ssa-sccvn.cc (vn_reference_lookup): Handle
            &MEM[_1 + 5].a[i] like a POINTER_PLUS_EXPR if the offset
            becomes invariant.
            (vn_reference_insert): Likewise.

            * gcc.dg/tree-ssa/ssa-fre-99.c: New testcase.
            * gcc.dg/asan/pr99673.c: Adjust.


Is causing various ports (ft32-elf for example) to fail the Warray-bounds.c
test:

Running /home/jlaw/test/gcc/gcc/testsuite/gcc.dg/dg.exp ...
FAIL: c-c++-common/Warray-bounds.c  -Wc++-compat   (test for warnings, line
187)
FAIL: c-c++-common/Warray-bounds.c  -Wc++-compat   (test for warnings, line
188)

I think you ought to be able to see this with just a cross compiler and
shouldn't need a full cross environment.  I haven't debugged this in any way
other than bisection.

             reply	other threads:[~2022-05-07 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07 15:12 law at gcc dot gnu.org [this message]
2022-05-09  8:08 ` [Bug tree-optimization/105517] " rguenth at gcc dot gnu.org
2022-05-09  9:33 ` rguenth at gcc dot gnu.org
2022-05-09 11:42 ` cvs-commit at gcc dot gnu.org
2022-05-09 11:46 ` rguenth 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-105517-4@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).