public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/49516] New: SRA generates memory references into its replacements @ 2011-06-23 13:48 jamborm at gcc dot gnu.org 2011-06-23 13:55 ` [Bug tree-optimization/49516] " jamborm at gcc dot gnu.org ` (6 more replies) 0 siblings, 7 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-23 13:48 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 Summary: SRA generates memory references into its replacements Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: jamborm@gcc.gnu.org When SRA tries to modify an assignment where on one side it should put one new scalar replacement but the other is actually an aggregate with a number of replacements for it, it will generate a MEM-REF into the former replacement which can lead to miscompilations. Originally reported here by Xinliang David Li: http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01380.html I have only slightly changed the original testcase so that it does not require any includes and will attach it shortly. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org @ 2011-06-23 13:55 ` jamborm at gcc dot gnu.org 2011-06-23 19:57 ` jamborm at gcc dot gnu.org ` (5 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-23 13:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.06.23 13:54:45 AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-23 13:54:45 UTC --- Created attachment 24585 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24585 Testcase This is the testcase. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org 2011-06-23 13:55 ` [Bug tree-optimization/49516] " jamborm at gcc dot gnu.org @ 2011-06-23 19:57 ` jamborm at gcc dot gnu.org 2011-06-24 13:28 ` jamborm at gcc dot gnu.org ` (4 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-23 19:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 --- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-23 19:57:05 UTC --- Fix submitted as http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01816.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org 2011-06-23 13:55 ` [Bug tree-optimization/49516] " jamborm at gcc dot gnu.org 2011-06-23 19:57 ` jamborm at gcc dot gnu.org @ 2011-06-24 13:28 ` jamborm at gcc dot gnu.org 2011-06-24 13:36 ` jamborm at gcc dot gnu.org ` (3 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-24 13:28 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 --- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-24 13:27:47 UTC --- Author: jamborm Date: Fri Jun 24 13:27:44 2011 New Revision: 175376 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175376 Log: 2011-06-24 Martin Jambor <mjambor@suse.cz> PR tree-optimizations/49516 * tree-sra.c (sra_modify_assign): Choose the safe path for aggregate copies if we also did scalar replacements. * testsuite/g++.dg/tree-ssa/pr49516.C: New test. Added: trunk/gcc/testsuite/g++.dg/tree-ssa/pr49516.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-sra.c ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org ` (2 preceding siblings ...) 2011-06-24 13:28 ` jamborm at gcc dot gnu.org @ 2011-06-24 13:36 ` jamborm at gcc dot gnu.org 2011-06-29 12:56 ` jamborm at gcc dot gnu.org ` (2 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-24 13:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 --- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-24 13:36:22 UTC --- Fixed on trunk, will commit to 4.6 after it is unfrozen. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org ` (3 preceding siblings ...) 2011-06-24 13:36 ` jamborm at gcc dot gnu.org @ 2011-06-29 12:56 ` jamborm at gcc dot gnu.org 2011-06-29 13:13 ` jamborm at gcc dot gnu.org 2011-06-30 13:24 ` dnovillo at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-29 12:56 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 --- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-29 12:55:48 UTC --- Author: jamborm Date: Wed Jun 29 12:55:44 2011 New Revision: 175634 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175634 Log: 2011-06-29 Martin Jambor <mjambor@suse.cz> Backport from mainline 2011-06-24 Martin Jambor <mjambor@suse.cz> PR tree-optimizations/49516 * tree-sra.c (sra_modify_assign): Choose the safe path for aggregate copies if we also did scalar replacements. * testsuite/g++.dg/tree-ssa/pr49516.C: New test. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/tree-ssa/pr49516.C Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/tree-sra.c ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org ` (4 preceding siblings ...) 2011-06-29 12:56 ` jamborm at gcc dot gnu.org @ 2011-06-29 13:13 ` jamborm at gcc dot gnu.org 2011-06-30 13:24 ` dnovillo at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: jamborm at gcc dot gnu.org @ 2011-06-29 13:13 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-06-29 13:13:01 UTC --- ...and fixed everywhere now. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/49516] SRA generates memory references into its replacements 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org ` (5 preceding siblings ...) 2011-06-29 13:13 ` jamborm at gcc dot gnu.org @ 2011-06-30 13:24 ` dnovillo at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: dnovillo at gcc dot gnu.org @ 2011-06-30 13:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516 --- Comment #7 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-06-30 13:24:06 UTC --- Author: dnovillo Date: Thu Jun 30 13:24:00 2011 New Revision: 175702 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175702 Log: ChangeLog.google-4_6 2011-06-29 Diego Novillo <dnovillo@google.com> Backport from gcc-4_6-branch 2011-06-29 Martin Jambor <mjambor@suse.cz> Backport from mainline 2011-06-24 Martin Jambor <mjambor@suse.cz> PR tree-optimizations/49516 * tree-sra.c (sra_modify_assign): Choose the safe path for aggregate copies if we also did scalar replacements. testsuite/ChangeLog.google-4_6 2011-06-29 Diego Novillo <dnovillo@google.com> Backport from gcc-4_6-branch 2011-06-29 Martin Jambor <mjambor@suse.cz> Backport from mainline 2011-06-24 Martin Jambor <mjambor@suse.cz> PR tree-optimizations/49516 * g++.dg/tree-ssa/pr49516.C: New test. Added: branches/google/gcc-4_6/gcc/testsuite/g++.dg/tree-ssa/pr49516.C - copied unchanged from r175634, branches/gcc-4_6-branch/gcc/testsuite/g++.dg/tree-ssa/pr49516.C Modified: branches/google/gcc-4_6/ (props changed) branches/google/gcc-4_6/gcc/ChangeLog.google-4_6 branches/google/gcc-4_6/gcc/config/rs6000/rs6000.c (props changed) branches/google/gcc-4_6/gcc/config/rs6000/rs6000.h (props changed) branches/google/gcc-4_6/gcc/testsuite/ChangeLog.google-4_6 branches/google/gcc-4_6/gcc/testsuite/gcc.target/powerpc/ppc-round.c (props changed) branches/google/gcc-4_6/gcc/tree-sra.c branches/google/gcc-4_6/libjava/classpath/ (props changed) Propchange: branches/google/gcc-4_6/ ('svn:mergeinfo' modified) Propchange: branches/google/gcc-4_6/ ('svnmerge-integrated' modified) Propchange: branches/google/gcc-4_6/gcc/config/rs6000/rs6000.c ('svn:mergeinfo' modified) Propchange: branches/google/gcc-4_6/gcc/config/rs6000/rs6000.h ('svn:mergeinfo' modified) Propchange: branches/google/gcc-4_6/gcc/testsuite/gcc.target/powerpc/ppc-round.c ('svn:mergeinfo' modified) Propchange: branches/google/gcc-4_6/libjava/classpath/ ('svn:mergeinfo' modified) ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-30 13:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-06-23 13:48 [Bug tree-optimization/49516] New: SRA generates memory references into its replacements jamborm at gcc dot gnu.org 2011-06-23 13:55 ` [Bug tree-optimization/49516] " jamborm at gcc dot gnu.org 2011-06-23 19:57 ` jamborm at gcc dot gnu.org 2011-06-24 13:28 ` jamborm at gcc dot gnu.org 2011-06-24 13:36 ` jamborm at gcc dot gnu.org 2011-06-29 12:56 ` jamborm at gcc dot gnu.org 2011-06-29 13:13 ` jamborm at gcc dot gnu.org 2011-06-30 13:24 ` dnovillo at gcc dot gnu.org
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).