URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -fdump-tree-forwprop1" } */
|
/* { dg-options "-O -fdump-tree-forwprop1" } */
|
|
|
#include
|
#include
|
|
|
template
|
template
|
struct Vec
|
struct Vec
|
{
|
{
|
Vec()
|
Vec()
|
{
|
{
|
for (int i=0; i<3; ++i)
|
for (int i=0; i<3; ++i)
|
new (&a[i]) T(0);
|
new (&a[i]) T(0);
|
}
|
}
|
T a[3];
|
T a[3];
|
};
|
};
|
|
|
double foo (void)
|
double foo (void)
|
{
|
{
|
Vec v;
|
Vec v;
|
return v.a[2];
|
return v.a[2];
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */
|
/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */
|
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
|
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.