This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch, RFC] Add EXEC_COMPCALL to front end expression walker
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Feb 2011 13:23:58 +0100
- Subject: [patch, RFC] Add EXEC_COMPCALL to front end expression walker
Hello world,
the attached patch adds handling for EXEC_COMPCALL to the front end
expression walker.
Based on resolve_ordinary_assign in resolve.c, I think think this is the
right thing to do. However...
I tried finding a use of EXEC_COMPCALL in the testsuite by placing a
gcc_assert((*c)->op != EXEC_COMPCALL) in the front end walker. I then
ran the testsuite in the hope of ICEing on a dg-do run test, but I only
found EXEC_COMPCALL in dg-do compile tests with syntax errors this way.
When, exactly, is EXEC_COMPCALL used? Maybe it would be a good idea to
add a test case for this to the testsuite.
No changelog entry (although that one would be obvious), because this is
still an RFC. I also regression-tested this.
Comments? Ideas? Should I just commit this?
Thomas
Index: frontend-passes.c
===================================================================
--- frontend-passes.c (Revision 169491)
+++ frontend-passes.c (Arbeitskopie)
@@ -654,6 +654,12 @@
WALK_SUBEXPR (a->expr);
break;
+ case EXEC_COMPCALL:
+ WALK_SUBEXPR ((*c)->expr1);
+ for (a = (*c)->expr1->value.compcall.actual; a; a = a->next)
+ WALK_SUBEXPR (a->expr);
+ break;
+
case EXEC_SELECT:
WALK_SUBEXPR ((*c)->expr1);
for (b = (*c)->block; b; b = b->block)