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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr46149.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 "-fno-tree-sra" }
3
 
4
struct S
5
{
6
  S ():p ((char *) __builtin_calloc (1, 1))
7
  {
8
  }
9
  char *p;
10
};
11
 
12
template < class T > struct A
13
{
14
  A (const S & __m1, const T & __m2):m1 (__m1), m2 (__m2)
15
  {
16
  }
17
  const S & m1;
18
  const T & m2;
19
};
20
 
21
struct B:A < S >
22
{
23
  B (const S & __v):A < S > (__v, __v)
24
  {
25
  }
26
};
27
 
28
struct C:A < B >
29
{
30
  C (const S & __e1, const B & __e2):A < B > (__e1, __e2)
31
  {
32
  }
33
};
34
 
35
struct D
36
{
37
  D (const C & __c):c (__c)
38
  {
39
  }
40
  const C c;
41
};
42
 
43
int
44
main ()
45
{
46
  S s;
47
  B b (s);
48
  C c (s, b);
49
  D d (c);
50
  return d.c.m2.m2.p[0];
51
}

powered by: WebSVN 2.1.0

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