public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/95493] [10 Regression] test for vector members apparently reordered with assignment to vector members since r10-7523-gb90061c6ec090c6b Date: Tue, 23 Jun 2020 13:31:01 +0000 [thread overview] Message-ID: <bug-95493-4-P6JsVZTaDP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95493-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95493 --- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:7d919c33fbd29a996326840dae3b5e093c3190f4 commit r10-8355-g7d919c33fbd29a996326840dae3b5e093c3190f4 Author: Richard Biener <rguenther@suse.de> Date: Thu Jun 4 13:44:58 2020 +0200 middle-end/95493 - bogus MEM_ATTRS for variable array access The following patch avoids keeping the inherited MEM_ATTRS when set_mem_attributes_minus_bitpos is called with a variable ARRAY_REF. The inherited ones may not reflect the correct offset and neither does the updated alias-set match the inherited MEM_EXPR. This all ends up confusing path-based alias-analysis, causing wrong-code. The fix is to stop not adopting a MEM_EXPR for certain kinds of expressions and instead handle everything we can. There's still the constant kind trees case which I'm too lazy to look into right now. I did refrain from adding SSA_NAME there and instead avoided calling set_mem_attributes_minus_bitpos when debug expression expansion ended up expanding a SSA definition RHS which should already have taken care of setting the appropriate MEM_ATTRS. It also avoids calling set_mem_attributes on the DECL_INITIAL of a CONST_DECL which seems pointless since there cannot be a sensible MEM_EXPR derived from that. We're overwriting both other possibly useful info, alias-set and alignment immediately so the following patch simply removes the call instead of making the function deal with even more (unexpected) trees that are not memory accesses. 2020-06-23 Richard Biener <rguenther@suse.de> PR middle-end/95493 PR middle-end/95690 * cfgexpand.c (expand_debug_expr): Avoid calling set_mem_attributes_minus_bitpos when we were expanding an SSA name. * emit-rtl.c (set_mem_attributes_minus_bitpos): Remove ARRAY_REF special-casing, add CONSTRUCTOR to the set of special-cases we do not want MEM_EXPRs for. Assert we end up with reasonable MEM_EXPRs. * varasm.c (build_constant_desc): Remove set_mem_attributes call. * g++.dg/torture/pr95493.C: New testcase. * g++.dg/torture/pr95493-1.C: Likewise. * gfortran.dg/pr95690.f90: Likewise.
next prev parent reply other threads:[~2020-06-23 13:31 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-03 7:49 [Bug tree-optimization/95493] New: [10 Regression] test for vector members apparently reordered with assignment to vector members kretz at kde dot org 2020-06-03 8:15 ` [Bug tree-optimization/95493] [10/11 Regression] test for vector members apparently reordered with assignment to vector members since r10-7523-gb90061c6ec090c6b marxin at gcc dot gnu.org 2020-06-03 8:20 ` [Bug middle-end/95493] " pinskia at gcc dot gnu.org 2020-06-03 9:51 ` [Bug rtl-optimization/95493] " rguenth at gcc dot gnu.org 2020-06-03 10:00 ` rguenth at gcc dot gnu.org 2020-06-03 11:15 ` rguenth at gcc dot gnu.org 2020-06-05 6:35 ` cvs-commit at gcc dot gnu.org 2020-06-05 6:36 ` [Bug rtl-optimization/95493] [10 " rguenth at gcc dot gnu.org 2020-06-16 11:57 ` rguenth at gcc dot gnu.org 2020-06-16 12:58 ` redi at gcc dot gnu.org 2020-06-16 22:15 ` cvs-commit at gcc dot gnu.org 2020-06-19 12:08 ` kretz at kde dot org 2020-06-19 12:29 ` rguenth at gcc dot gnu.org 2020-06-23 13:31 ` cvs-commit at gcc dot gnu.org [this message] 2020-06-23 13:31 ` 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-95493-4-P6JsVZTaDP@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).