Files
clang-p2996/flang/test/Preprocessing/counter.F90
Yussur Mustafa Oraji 5c3bf36c99 [flang] Add __COUNTER__ preprocessor macro (#136827)
This commit adds support for the `__COUNTER__` preprocessor macro, which
works the same as the one found in clang.
It is useful to generate unique names at compile-time.
2025-05-30 08:33:53 -04:00

10 lines
208 B
Fortran

! RUN: %flang -E %s | FileCheck %s
! CHECK: print *, 0
! CHECK: print *, 1
! CHECK: print *, 2
! Check incremental counter macro
#define foo bar
print *, __COUNTER__
print *, __COUNTER__
print *, __COUNTER__