This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/18754] unrolling happens too late/SRA does not happen late enough



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]