URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// Verify that loop optimization takes into account the exception edge
|
// Verify that loop optimization takes into account the exception edge
|
// and does not increment I before the call.
|
// and does not increment I before the call.
|
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
|
|
extern "C" void abort();
|
extern "C" void abort();
|
static void bar(char *);
|
static void bar(char *);
|
|
|
static void foo(unsigned long element_count, char *ptr)
|
static void foo(unsigned long element_count, char *ptr)
|
{
|
{
|
unsigned long i;
|
unsigned long i;
|
try {
|
try {
|
for (i = 0; i != element_count; i++, ptr += 8)
|
for (i = 0; i != element_count; i++, ptr += 8)
|
bar (ptr);
|
bar (ptr);
|
}
|
}
|
catch (...) {
|
catch (...) {
|
if (i)
|
if (i)
|
abort ();
|
abort ();
|
}
|
}
|
}
|
}
|
|
|
static void bar(char *)
|
static void bar(char *)
|
{
|
{
|
throw 1;
|
throw 1;
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
foo(2, 0);
|
foo(2, 0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.