[Patch, fortran] PR33664 - crash on invalid program
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Oct 7 19:13:00 GMT 2007
:ADDPATCH fortran:
This is a little embarrassing. The testcase tells all - the symbol n
is interpreted to be an error. Hozever, being referenced in a
specification expression, it should be pure, which it is not. The fix
is self-explanatory - note the test for purity is redundant but
provides a belt and braces approach. char_result_7.f90 was exposed by
this patch to have an illegal part, where the character langth was
determined by an impure function. This has been eliminated.
Bootstrapped and regtested on x86_ia64/fc5 and certified tonto-2.3
proof. OK for trunk?
Paul
2007-10-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33664
* expr.c (gfc_specification_expr): If a function is not
external, intrinsic or pure is an error. Set the symbol pure
to prevent repeat errors.
2007-10-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33664
* gfortran.dg/impure_spec_expr_1.f90: New test.
* gfortran.dg/char_result_7.f90: Remove illegal test.
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 2532 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071007/fc3516d8/attachment.bin>
More information about the Fortran
mailing list