This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18754] unrolling happens too late/SRA does not happen late enough
- From: "belyshev at depni dot sinp dot msu dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2007 16:58:50 -0000
- Subject: [Bug tree-optimization/18754] unrolling happens too late/SRA does not happen late enough
- References: <bug-18754-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from belyshev at depni dot sinp dot msu dot ru 2007-08-12 16:58 -------
Another test for this bug:
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-final_cleanup" } */
extern void link_error (void);
static const int my_array [3] = { 4, 5, 6 };
void f0 (void)
{
int j, sum = 0;
for (j = 0; j < 3; j ++)
sum += my_array [j];
if (15 != sum)
link_error ();
}
int f1 (int a [])
{
int j, sum = 0;
for (j = 0; j < 3; j ++)
sum += a [j] + my_array [j];
return sum;
}
/* { dg-final { scan-tree-dump-not "link_error" "final_cleanup" } } */
/* { dg-final { scan-tree-dump-not "my_array" "final_cleanup" } } */
/* { dg-final { cleanup-tree-dump "final_cleanup" } } */
--
belyshev at depni dot sinp dot msu dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-12-21 03:50:49 |2007-08-12 16:58:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18754