URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 156 |
#include <stdio.h>
|
#include <stdio.h>
|
|
|
extern int foo1;
|
extern int foo1;
|
extern int foo2;
|
extern int foo2;
|
extern void bar (void);
|
extern void bar (void);
|
|
|
void
|
void
|
xxx1 (void)
|
xxx1 (void)
|
{
|
{
|
printf ("MAIN1\n");
|
printf ("MAIN1\n");
|
}
|
}
|
|
|
void
|
void
|
xxx2 (void)
|
xxx2 (void)
|
{
|
{
|
printf ("MAIN2\n");
|
printf ("MAIN2\n");
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
foo1 = 1;
|
foo1 = 1;
|
foo2 = 1;
|
foo2 = 1;
|
bar ();
|
bar ();
|
if (foo1 == -1)
|
if (foo1 == -1)
|
printf ("OK1\n");
|
printf ("OK1\n");
|
else if (foo1 == 1)
|
else if (foo1 == 1)
|
printf ("OK2\n");
|
printf ("OK2\n");
|
if (foo2 == -1)
|
if (foo2 == -1)
|
printf ("OK3\n");
|
printf ("OK3\n");
|
else if (foo2 == 1)
|
else if (foo2 == 1)
|
printf ("OK4\n");
|
printf ("OK4\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.