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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do "compile" }
2
// { dg-options "-fgnu-tm" }
3
 
4
class Obj
5
{
6
  int dummy;
7
};
8
 
9
__attribute__((transaction_safe))
10
Obj* allocate()
11
{
12
  return new Obj;
13
}
14
 
15
__attribute__((transaction_safe))
16
void deallocate(Obj * o)
17
{
18
  delete o;
19
}
20
 
21
__attribute__((transaction_safe))
22
Obj* allocatearray()
23
{
24
  return new Obj[2];
25
}
26
 
27
__attribute__((transaction_safe))
28
void deallocatearray(Obj *o[])
29
{
30
  delete [] o;
31
}
32
 
33
/* The delete/new operators are handled by the libitm runtime.  */
34
/* { dg-final { scan-assembler "_ZGTtnw\[mj\]" } } */
35
/* { dg-final { scan-assembler "_ZGTtna\[mj\]" } } */
36
/* { dg-final { scan-assembler "_ZGTtdlPv" } } */
37
/* { dg-final { scan-assembler "_ZGTtdaPv" } } */

powered by: WebSVN 2.1.0

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