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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tm/] [alias-2.c] - Blame information for rev 725

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fgnu-tm -fdump-tree-ealias -O" } */
3
 
4
typedef __UINTPTR_TYPE__ ptrcast;
5
 
6
#if (__SIZEOF_POINTER__ == 4)
7
#define TM_LOAD  __builtin__ITM_RU4
8
#define TM_STORE __builtin__ITM_WU4
9
#elif (__SIZEOF_POINTER__ == 8)
10
#define TM_LOAD __builtin__ITM_RU8
11
#define TM_STORE __builtin__ITM_WU8
12
#else
13
#error Add target support here
14
#endif
15
 
16
void candy ();
17
 
18
struct mystruct_type {
19
  ptrcast *ptr;
20
} *mystruct, *mystruct2;
21
 
22
ptrcast *someptr, **pp;
23
ptrcast ui;
24
 
25
void tootsie_roll () __attribute__((transaction_wrap (candy)));
26
void tootsie_roll ()
27
{
28
  ui = TM_LOAD  (&mystruct);
29
  mystruct2 = (struct mystruct_type *) ui;
30
 
31
  pp = &mystruct2->ptr;
32
}
33
 
34
void foo()
35
{
36
  candy();
37
}
38
 
39
/* { dg-final { scan-tree-dump-times "ui\..* = .*same as mystruct" 1 "ealias" } } */
40
/* { dg-final { scan-tree-dump-times "mystruct.*ESCAPED" 1 "ealias" } } */
41
/* { dg-final { scan-tree-dump-times "pp = .*same as mystruct" 1 "ealias" } } */
42
/* { dg-final { cleanup-tree-dump "ealias" } } */

powered by: WebSVN 2.1.0

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