Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Error with internal subprogram in impure elemental routine

$
0
0

Greetings,

i got an error with the impure feature. It states: error #7949: All internal subprograms in a pure subprogram shall be pure.
It does not matter, wether the routines are functions or subroutines.

module test_mod

contains

  impure elemental subroutine foo()

    contains

    function bar()
      integer :: bar
      bar = 1
    end function

  end subroutine

end module

I wanted to pack some output statements in an internal subroutine to avoid code duplication.
Would this approach be valid?

 

Wolf


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>