1 /* Check that the GBR address optimization does not produce wrong memory
2 accesses. In this case the GBR value must be stored to a normal register
3 and a GBR memory access must not be done. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1" } */
6 /* { dg-final { scan-assembler "stc\tgbr" } } */
7 /* { dg-final { scan-assembler "bf|bt" } } */
15 test_00 (int a
, tcb_t
* b
)
17 tcb_t
* tcb
= (a
& 5) ? (tcb_t
*)__builtin_thread_pointer () : b
;
18 return tcb
->w
+ tcb
->x
;