1! Have to enable optimizations, as otherwise builtins won't be expanded. 2! { dg-additional-options "-O -fdump-rtl-expand" } 3 4logical function f () 5 implicit none 6 7 external acc_on_device 8 logical (4) acc_on_device 9 10 f = .false. 11 f = f .or. acc_on_device () 12 f = f .or. acc_on_device (1, 2) 13 f = f .or. acc_on_device (3.14) 14 f = f .or. acc_on_device ("hello") 15 16 return 17end function f 18 19! Unsuitable to be handled as a builtin, so we're expecting four calls. 20! { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 4 "expand" } } 21 22! { dg-final { cleanup-rtl-dump "expand" } } 23