This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fortran, committed] Added ERRMSG to dump-parse-tree


I've committed the attached patch as obvious. 

When I wrote the support for ERRMSG, I forgot to 
update dump-parse-tree.c to emit the errmsg tag
in allocate and deallocate.

The code

program al
  implicit none
  integer status
  character(len=80) msg
  real, allocatable :: x(:)
  allocate(x, stat=status, errmsg=msg)
  if (status /= 0) print *, trim(msg)
  x = 1.
  deallocate(x, stat=status, errmsg=msg)
  if (status /= 0) print *, trim(msg)
end program al

yields

      ALLOCATE  STAT=al:status ERRMSG=al:msg al:x(FULL)
      IF (/= al:status 0)
        WRITE UNIT=6 FMT=-1
          TRANSFER __trim_1[[((al:msg))]]
        DT_END
      ENDIF
      ASSIGN al:x(FULL) 1.00000000
      DEALLOCATE  STAT=al:status ERRMSG=al:msg al:x(FULL)
      IF (/= al:status 0)
        WRITE UNIT=6 FMT=-1
          TRANSFER __trim_1[[((al:msg))]]
        DT_END
      ENDIF


2009-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>

	* dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
	of allocate and deallocate statements.

-- 
Steve

Attachment: dump.log
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]