OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [crossjump1.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// PR middle-end/21492
2
// { dg-do compile }
3
// { dg-options "-Os" }
4
// { dg-options "-Os -fPIC" { target fpic } }
5
 
6
extern char *bar (const char *, const char *);
7
extern char *baz (char *, const char *);
8
extern unsigned int fn (const char *);
9
static const struct C { int i; } k = { 0};
10
 
11
struct A
12
{
13
  ~A ();
14
};
15
 
16
char *
17
foo (char *x, const char *y)
18
{
19
  A a;
20
  char *c = x;
21
 
22
  if (bar (y, "foo"))
23
    {
24
      baz (c, "foo");
25
      c += fn ("foo");
26
    }
27
  else if (bar (y, "bar"))
28
    {
29
      baz (c, "bar");
30
      c += fn ("bar");
31
    }
32
 
33
  return x;
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.