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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr43879-1_1.C] - Blame information for rev 701

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fipa-pta" } */
3
/* { dg-additional-sources "pr43879-1_0.C" } */
4
 
5
struct A {
6
    int *i;
7
    A();
8
    ~A();
9
};
10
 
11
static inline int
12
aa(int *a, int *b)
13
{
14
  (void)b;
15
  return *a;
16
}
17
 
18
struct B {
19
    B() : i(0) {}
20
    int i;
21
    B(const A &a) : i(0)
22
    {
23
      f(*a.i);
24
    }
25
    void __attribute__((noinline, noclone))
26
        f(int j)
27
          {
28
            aa(&i, &j);
29
            i = 1;
30
          }
31
};
32
 
33
int
34
test()
35
{
36
  B b1;
37
  B b2 = B(A());
38
  b1 = B(A());
39
  if (b1.i != b2.i) __builtin_abort();
40
  return 0;
41
}
42
 
43
int
44
main()
45
{
46
  return test();
47
}
48
 

powered by: WebSVN 2.1.0

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