Equivalences *look* broken

Andrew Pinski pinskia@physics.uc.edu
Fri Oct 14 14:10:00 GMT 2005


> 
> Hi all,
> 
> My mind is puzzled by Jakub's patch:
> 
> 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
> 
>         * trans-common.c (build_field): Fix comment typo.
>         (create_common): Set backend_decl of COMMON or EQUIVALENCEd
>         variables to a VAR_DECL with the COMPONENT_REF in
>         DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
>         * f95-lang.c (gfc_expand_function): Emit debug info for
>         EQUIVALENCEd variables if the equiv union is going to be output.
> 
> It makes the tree dumps look like equivalences are broken (but I think
> they're not):
> 
> $ cat a.f90
> PROGRAM TEST_FPU
> REAL :: pool(10,10), pool3(100)
> EQUIVALENCE (pool,pool3)
> pool(1,1) = 0.0
> END PROGRAM TEST_FPU

Oh, that is because DECL_EXPR are printed out as a normal decl in the orignal dump.
Maybe we should wrap around DECL<> around it or something like that.

-- Pinski



More information about the Fortran mailing list