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]

[Patch, fortran] PR29389 and PR33850 - uses for expression traversal


:ADDPATCH fortran:

Much of this patch is the promised tidy up of functions that traverse
expressions.  The patch is straightforward: gfc_traverse_expr has been
modified to call *func for all expression types and *func makes the
selection for those that it will operate upon.  Various subexpression
calls have been added.  This has the effect that several gcc_asserts
have been changed to if expressions.

The fixes to PRs involve exploitation of one of these traversal
functions (PR33850, which now calls find_sym_in_expr) and a new one,
pure_stmt_function.

The testcases are straight forward: stfunc_6.f90 throws in a reference
to a non-pure function in a statement function declaration.  This now
duly throws an error.  The test for PR33850 checks the counts of atmp
and parm in the tree dump.  The former is produced by a temporary and
the latter by the translation of an array into a descriptor.  For good
measure, the test is run at -O3 to check that the result is OK.

Regtested on Cygwin_NT/PIV (to be checked tonight on x86_ia64/FC8).

OK for trunk?

Paul

-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy

Attachment: Change.Logs
Description: Text document

Attachment: submit.diff
Description: Text document


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