[Patch, fortran] PR32129 - ICE: Procedure call with array-section-actual to scalar dummy

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Dec 8 16:09:00 GMT 2007


:ADDPATCH fortran:

This PR is one of the 7 remaining "F95 bugs".

The attached patch is straightforward.  The fault occurs because
simplify_constructor was failing to simplify the variable component
array reference, as it should.  However, by failing the constructor
was being returned in a mess and a broked expression was being
propagated to the middle end.  The fix is to copy the constructor
expression and to simplify that. On failure you keep going and return
the original.  Otherwise, the simplified expression is returned.

As a bonus, I have added a variant of gfc_show_expr that preceeds the
expression by a message of choice and finishes with a line feed.  The
message allows identification of where the expression came from and
the linefeed is an aid to clarity.  Needless to say, I used it to
understand what this PR was about.

Bootstrapped and regtested on x86_ia64/FC5 - OK for trunk?

Cheers

Paul

-- 
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: Change.Logs
Type: application/octet-stream
Size: 571 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071208/69fe1e20/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32129.diff
Type: text/x-patch
Size: 4845 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071208/69fe1e20/attachment.bin>


More information about the Gcc-patches mailing list