OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [forwprop-12.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-forwprop1" } */
3
 
4
struct X { int a[256]; };
5
 
6
int foo(struct X *p, __SIZE_TYPE__ i)
7
{
8
  int *q = &p->a[0];
9
  int *q2 = (int *)((void *)q + i*4 + 32);
10
  return *q2;
11
}
12
 
13
int bar(struct X *p, int i)
14
{
15
  return *((int *)p + i + 8);
16
}
17
 
18
/* We should have propagated the base array address through the
19
   address arithmetic into the memory access as an array access.  */
20
 
21
/* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" { xfail *-*-* } } } */
22
/* { dg-final { cleanup-tree-dump "forwprop1" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.