Gfortran: Treat pure functions as normal functions for debugging purposes?

前端 未结 2 1770
暖寄归人
暖寄归人 2021-01-12 06:09

I need to debug some pure functions in a fortran Program compiled with gfortran. Is there any way to ignore the pure statements so I can use

2条回答
  •  Happy的楠姐
    2021-01-12 06:55

    You can use a macro and use the -cpp flag.

    #define pure 
    
    pure subroutine s
     print *,"hello"
    end
    

提交回复
热议问题