1/* Have to enable optimizations, as otherwise builtins won't be expanded.  */
2/* { dg-additional-options "-O -fdump-rtl-expand -fno-openacc" } */
3
4#if __cplusplus
5extern "C" {
6#endif
7
8typedef enum acc_device_t { acc_device_X = 123 } acc_device_t;
9extern int acc_on_device (acc_device_t);
10
11#if __cplusplus
12}
13#endif
14
15int
16f (void)
17{
18  const acc_device_t dev = acc_device_X;
19  return acc_on_device (dev);
20}
21
22/* Without -fopenacc, we're expecting one call.
23   { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 1 "expand" } } */
24
25/* { dg-final { cleanup-rtl-dump "expand" } } */
26