[flang-commits] [PATCH] D106727: [flang] Produce proper "preprocessor output" for -E option

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jul 26 11:11:12 PDT 2021


awarzynski added a comment.

In D106727#2904864 <https://reviews.llvm.org/D106727#2904864>, @klausler wrote:

> They all pass without change.

Yes, but with this patch they fail. For example, https://github.com/llvm/llvm-project/blob/main/flang/test/Preprocessing/pp001.F:

  bin/f18 -E /llvm-project/flang/test/Preprocessing/pp001.F
  !dir$ fixed
  #line "/llvm-project/flang/test/Preprocessing/pp001.F" 4
        integer, parameter :: KWM = 666
  
        if (777 .eq. 777) then
          print *, 'pp001.F yes'
        else
          print *, 'pp001.F no: ',777
        end if
        end

i.e., spaces in ` if (777 .eq. 777) then` are preserved and hence `! CHECK: if(777.eq.777)then` is no longer valid. This is the output that I get without your change:

  integer,parameter::kwm=666
  if(777.eq.777)then
  print*,'pp001.F yes'
  else
  print*,'pp001.F no: ',777
  endif
  end


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106727/new/

https://reviews.llvm.org/D106727



More information about the flang-commits mailing list