flang/test/Preprocessing/pp039.F
raw| 1 | ! RUN: %flang -E %s 2>&1 | FileCheck %s |
| 2 | ! CHECK: res = IFLM |
| 3 | ! CHECK: (666) |
| 4 | ! CHECK-NOT: res = ((666)+111) |
| 5 | * FLM call with '(' on next line (not a continuation) |
| 6 | integer function IFLM(x) |
| 7 | integer :: x |
| 8 | IFLM = x |
| 9 | end function IFLM |
| 10 | program main |
| 11 | #define IFLM(x) ((x)+111) |
| 12 | integer :: res |
| 13 | res = IFLM |
| 14 | (666) |
| 15 | if (res .eq. 777) then |
| 16 | print *, 'pp039.F yes' |
| 17 | else |
| 18 | print *, 'pp039.F no: ', res |
| 19 | end if |
| 20 | end |