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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [attrib-4.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-fgnu-tm" }
3
 
4
#define __ts    __attribute__((transaction_safe))
5
#define __tc    __attribute__((transaction_callable))
6
#define __tp    __attribute__((transaction_pure))
7
#define __tu    __attribute__((transaction_unsafe))
8
 
9
struct __ts A
10
{
11
  virtual void f();
12
  virtual void g();
13
};
14
 
15
struct __tc B : public A
16
{
17
  void f() __tc;  // { dg-error ".transaction_callable. overriding .transaction_safe." }
18
  void g();
19
  virtual void h();
20
};
21
 
22
struct C : public B
23
{
24
  void g() __tc;  // { dg-error ".transaction_callable. overriding .transaction_safe." }
25
};
26
 
27
struct C2 : public B
28
{
29
  void g() __ts;
30
  void h() __tu;  // { dg-error ".transaction_unsafe. overriding .transaction_callable." }
31
};
32
 
33
struct D
34
{
35
  virtual void f() __tp;
36
  virtual void g() __tp;
37
};
38
 
39
struct E : public D
40
{
41
  void f() __ts;  // { dg-error ".transaction_safe. overriding .transaction_pure." }
42
  void g();
43
};
44
 
45
struct F : public E
46
{
47
  void g() __ts;  // { dg-error ".transaction_safe. overriding .transaction_pure." }
48
};

powered by: WebSVN 2.1.0

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