1 /* Check that the GBR address optimization does not combine a gbr store
2 and its use when a function call is inbetween, when GBR is a call used
3 register, i.e. it is invalidated by function calls. */
4 /* { dg-do compile { target "sh*-*-*" } } */
5 /* { dg-options "-O1 -fcall-used-gbr" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
7 /* { dg-final { scan-assembler "stc\tgbr" } } */
9 extern int test00 (void);
13 /* We must see a stc gbr,rn before the function call, because
14 a function call could modify the gbr. In this case the user requests
15 the old gbr value, before the function call. */
16 int* p = (int*)__builtin_thread_pointer ();