URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [tmmti-2.C] - Rev 853
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */
/* { dg-options { -O -fdump-tree-optimized } } */
int a[4][8];
int foo(int i)
{
return *(&a[0][0] + i*8); // a[i][0]
}
struct Foo { double x, y; };
Foo b[4];
double bar(int i)
{
return *(&b[0].x + i*2); // b[i].x
}
/* { dg-final { scan-tree-dump "a\\\[.*i.*\\\]\\\[0\\\]" "optimized" } } */
/* { dg-final { scan-tree-dump "b\\\[.*i.*\\\].x" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Go to most recent revision | Compare with Previous | Blame | View Log