1 /* Have to enable optimizations, as otherwise builtins won't be expanded. */
2 /* { dg-additional-options "-O -fdump-rtl-expand" } */
8 typedef enum acc_device_t
{ acc_device_X
= 123 } acc_device_t
;
9 extern int acc_on_device (acc_device_t
);
18 const acc_device_t dev
= acc_device_X
;
19 return acc_on_device (dev
);
22 /* With -fopenacc, we're expecting the builtin to be expanded, so no calls.
23 TODO: in C++, even under extern "C", the use of enum for acc_device_t
24 perturbs expansion as a builtin, which expects an int parameter. It's fine
25 when changing acc_device_t to plain int, but that's not what we're doing in
27 { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]*\\\"acc_on_device" 0 "expand" { xfail c++ } } } */
29 /* { dg-final { cleanup-rtl-dump "expand" } } */