This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 May 2011 15:23:06 +0000
- Subject: [Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding
- Auto-submitted: auto-generated
- References: <bug-49079-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-20 15:08:59 UTC ---
Author: rguenth
Date: Fri May 20 15:08:56 2011
New Revision: 173955
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173955
Log:
2011-05-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49079
* tree-dfa.c (get_ref_base_and_extent): Handle view-converting
MEM_REFs correctly for the trailing array access detection.
Special case constants the same way as decls for overall size
constraining.
* gcc.dg/torture/pr49079.c: New testcase.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/torture/pr49079.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-dfa.c