1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -fdump-tree-ealias -O" } */
4 typedef __UINTPTR_TYPE__ ptrcast
;
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
13 #error Add target support here
18 struct mystruct_type
{
20 } *mystruct
, *mystruct2
;
22 ptrcast
*someptr
, **pp
;
25 void tootsie_roll () __attribute__((transaction_wrap (candy
)));
28 ui
= TM_LOAD (&mystruct
);
29 mystruct2
= (struct mystruct_type
*) ui
;
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" } } */