URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [crossjump1.C] - Rev 301
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;
}