Files
clang-p2996/flang/test/Preprocessing/pp131.F90
Peter Klausler 0e811d3b66 [flang] Fix handling of space between # and name in preprocessor stringification
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
2022-01-12 16:02:17 -08:00

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