This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[gfortran,patch] Fix comments


While browsing through some gfortran code, I found two comments
in trans-array.c/gfc_trans_deferred_array() that didn't make much
sense to me (but it's of course possible that I've only
missunderstood something).

The first one is the comment that introduces the function.  It
says

/* NULLIFY an allocated/pointer array on function entry, free it on exit.  */

I don't see why we would want to nullify an allocatED array, and
from the code I conclude that it is allocatABLE arrays we are
dealing with.

The other comment I found confusing was

/* Parameter and use associated variables don't need anything special.  */
if (sym->attr.dummy || sym->attr.use_assoc)
  {
  ...
  }

The if statement clearly checks for dummy variables, not
parameters (allocatable/pointer arrays can't be parameters
anyway).

Patch to fix these attached, please commit if OK.  (I did not
regression test it because testing comments-only changes seems a
bit overkill to me, but I can of course run the testsuite if
anyone thinks it's needed).


2005-08-26  Erik Edelmann  <erik.edelmann@iki.fi>

        * trans-array.c (gfc_trans_deferred_array): Fix comments.



        Erik

Attachment: diff
Description: Text document


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