When preprocessing "# ARG" in function-like macro expansion, the preprocessor needs to pop the previously-pushed '#' token from the end of the resulting token sequence after detecting the argument name. The code to do this was just wrong in a couple of ways. Differential Revision: https://reviews.llvm.org/D117148
10 lines
216 B
Fortran
10 lines
216 B
Fortran
! RUN: %flang -E %s 2>&1 | FileCheck %s
|
|
! CHECK: n = "foobar" // "baz"
|
|
! # stringizing works in FLM
|
|
#define STR(x) # x
|
|
#define MAC(a,b) STR(a ## b)
|
|
program main
|
|
character(6) n
|
|
n = MAC(foo, bar) // STR( baz )
|
|
end
|