Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29413 Discussions

error stop quiet=true generates calls

foxtran
New Contributor III
321 Views

Considering the following code:

subroutine test_quiet(stat)
  implicit none
  integer :: stat
  if (stat > 0) error stop 1, quiet=.true.
  if (stat == 42) print *, 'unreachable'
end subroutine test_quiet

that is compiled as follows:

ifx test.f90 -O3 -S

 the resulting code has `callq for_error_stop_quiet@PLT` that can be avoided since 

If QUIET= appears and the
scalar-logical-expr has the value true, no output of signaling exceptions or stop code shall be produced

from Fortran 2023 Standard (11.4 STOP and ERROR STOP statements)

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
216 Views

That's correct. ERROR STOP always terminates execution - the difference between it and STOP (which also has QUIET=) is that ERROR STOP terminates all images in a coarray application.

View solution in original post

3 Replies
foxtran
New Contributor III
285 Views

Hmm... There is no unreachable call after quiet stop (at IR level), while it should be.

0 Kudos
foxtran
New Contributor III
233 Views

Sorry, I misread standard. Looks like it states that execution is still terminating, but in silent way (no output to IO). 

0 Kudos
Steve_Lionel
Honored Contributor III
217 Views

That's correct. ERROR STOP always terminates execution - the difference between it and STOP (which also has QUIET=) is that ERROR STOP terminates all images in a coarray application.

Reply