This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34771] New: Parenthesis around character variables: No expression
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2008 16:02:50 -0000
- Subject: [Bug fortran/34771] New: Parenthesis around character variables: No expression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
(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