[Patch, fortran] PR26976 - Detect non-compliance of elemental intrinsics.

Paul Thomas paulthomas2@wanadoo.fr
Sat Apr 1 17:55:00 GMT 2006


:ADDPATCH fortran:

This patch allows gfortran to detect the compliance or otherwise of the 
results of elemental intrinsics and of the TRANSFER intrinsic.  The 
patch is straightforward enough that the ChangeLog entry and the .diff 
file are sufficient description.

Initialization_1.f90 had a non-compliant assignment and so has been 
modified.  I have taken this opportunity to introduce the new, compliant 
testcases for the TRANSFER intrinsic; these also do the right thing with 
bigendian systems.  It should be noted that the original of the 
bigendian test used a PARAMETER and an intialization expression - this 
breaks as soon as optimization is switched on.  I will submit a bug 
report tomorrow;  I am not sure if this is a frontend or a backend 
problem, however.

Regtested on FC3/Athlon - OK for trunk and 4.1?

Paul

2006-04-01  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/26976
    * array.c (gfc_array_dimen_size): If available, return shape[dimen].
    * resolve.c (resolve_function): If available, use the argument shape 
for the
    function expression.
    * iresolve.c (gfc_resolve_transfer): Set shape[0] = size.

2006-04-01  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/26976
    * gfortran.dg/compliant_elemental_intrinsics_1.f90: New test.
    * gfortran.dg/initialization_1.f90: Make assignment compliant.
    * gfortran.dg/transfer_array_intrinsic_1.f90: Simplify.
    * gfortran.dg/transfer_array_intrinsic_2.f90: Make assignments 
compliant and detect
    bigendian-ness.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: compliant.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060401/ebf2b4ae/attachment.ksh>


More information about the Fortran mailing list