https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot 
ethz
                   |                            |.ch, jvdelisle at gcc dot 
gnu.org
         Depends on|                            |33055

--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 
---
actually, looking into preparing a patch for this I figured this is related to
the old PR33055, and I would argue that the fix for that PR is incorrect...
give n the quote from the standard.

Also, it leads to surprising behavior:

   LOGICAL :: file_exists
   INTEGER :: istat
   CHARACTER(LEN=5) :: t
   istat=-42
   INQUIRE(UNIT=-1,EXIST=file_exists,IOSTAT=istat) 
   WRITE(6,*) file_exists,istat
END

now istat will be non-zero, but the inquire without istat will not generate a
runtime error, nor jump to the ERR label if that would be present instead.

The behavior can be understood seeing the use of create_dummy_iostat in
trans-io.c, IMO a hack to catch this case.

Reply via email to