URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* PR debug/37616 */
|
/* PR debug/37616 */
|
/* Test that one can put breakpoints onto continue, exitlab and break
|
/* Test that one can put breakpoints onto continue, exitlab and break
|
and actually see program reaching those breakpoints.
|
and actually see program reaching those breakpoints.
|
This version of the test just checks that it can be compiled, linked
|
This version of the test just checks that it can be compiled, linked
|
and executed, further testing is done in corresponding gcc.dg/dwarf2/
|
and executed, further testing is done in corresponding gcc.dg/dwarf2/
|
test and hopefully in gdb testsuite. */
|
test and hopefully in gdb testsuite. */
|
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-O0 -g -dA" } */
|
/* { dg-options "-O0 -g -dA" } */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
int
|
int
|
foo (int parm)
|
foo (int parm)
|
{
|
{
|
int varj, varm;
|
int varj, varm;
|
|
|
for (varj = 0; varj < 10; varj++)
|
for (varj = 0; varj < 10; varj++)
|
{
|
{
|
if (varj == 5)
|
if (varj == 5)
|
continue;
|
continue;
|
if (varj == 7 && !parm)
|
if (varj == 7 && !parm)
|
goto exitlab;
|
goto exitlab;
|
if (varj == 9)
|
if (varj == 9)
|
break;
|
break;
|
varm = varj;
|
varm = varj;
|
}
|
}
|
|
|
exitlab:
|
exitlab:
|
return varm;
|
return varm;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if (foo (0) != 6)
|
if (foo (0) != 6)
|
abort ();
|
abort ();
|
if (foo (1) != 8)
|
if (foo (1) != 8)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.