URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [crossjump1.C] - Rev 816
Compare with Previous | Blame | View Log
// PR middle-end/21492
// { dg-do compile }
// { dg-options "-Os" }
// { dg-options "-Os -fPIC" { target fpic } }
extern char *bar (const char *, const char *);
extern char *baz (char *, const char *);
extern unsigned int fn (const char *);
static const struct C { int i; } k = { 0};
struct A
{
~A ();
};
char *
foo (char *x, const char *y)
{
A a;
char *c = x;
if (bar (y, "foo"))
{
baz (c, "foo");
c += fn ("foo");
}
else if (bar (y, "bar"))
{
baz (c, "bar");
c += fn ("bar");
}
return x;
}