PGI/LLVM 18.4: -Mcpp does not output into <file>.i

Man page reads:

-Mcpp=[[no]comment|m|md|mm|mmd|mq:target|mt:target|suffix:suff]
              Only runs the preprocessor on the input file(s); by default, the
              output is written to file.i, unless renamed with the -o switch.

To reproduce:

$ pgcc --version

pgcc 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell 
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
$ : >empty.c
$ ls
empty.c
$ pgcc -Mcpp empty.c
PREPRO-I-0222-Redundant definition for symbol __extension__ (empty.c: -1)
$ ls
a.out  empty.c

With the legacy PGI suite:

$ pgcc --version

pgcc 18.4-0 64-bit target on x86-64 Linux -tp haswell 
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
$ ls
empty.c
$ pgcc -Mcpp empty.c
$ ls
empty.c  empty.i

Hi Bert,

Thanks for the report. I added a problem report (TPR#25977) and have sent to engineering for further evaluation.

Thanks!
Mat