(c) and c
are regarded as the same for character variables; for other types (z) and z are
not the same.

gfc_get_parentheses (gfc_expr *e)
{
  gfc_expr *e2;

  /* This is a temporary fix, awaiting the patch for various
     other character problems.  The resolution and translation
     of substrings and concatenations are so kludged up that
     putting parentheses around them breaks everything.  */
  if (e->ts.type == BT_CHARACTER && e->ref)
    return e;

Test case:

subroutine a(c)
  character :: c(*)
  call b((c))
contains
  subroutine b(y)
    character :: y(*)
  end subroutine b
end subroutine

Due to the parenthesis, it should print:
"Error: The upper bound in the last dimension must appear in the reference to
the assumed size array"

(Error messages needs patch for PR 34665.)


-- 
           Summary: Parenthesis around character variables: No expression
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34771

Reply via email to