This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: On types, types, types


On Sunday 27 June 2004 23:43, Steven Bosscher wrote:
> Hi,
>
> We have a number of problems with types in gfortran on 64 bits
> hosts.  For example we'd try to add integer*4 literal constants
> to integer*8 (or gfc_array_index_type which is our internal
> equivalent to size_t) variables in machine generated code.  This
> was causing a number of FAILs.
>
> The attached patch should fix most (hopefully all, but...) of
> these problems.  When I run the fortran test suite now on amd64,
> I only have failures for forall_3.f90.  Some of these are new
> and appear to have only worked by accident for some reason.  I
> haven't been able to pin them down so far, they fail complaining
> about trying to allocate a non-positive amount of memory.

See PR15080 for forall_3.f90. This should really be XFAILed.

I have one query about the patch:

*************** gfc_trans_scalar_assign (gfc_se * lse, g
*** 1690,1696 ****
        gfc_add_block_to_block (&block, &lse->pre);
        gfc_add_block_to_block (&block, &rse->pre);
  
!       gfc_add_modify_expr (&block, lse->expr, rse->expr);
      }
  
    gfc_add_block_to_block (&block, &lse->post);
--- 1702,1709 ----
        gfc_add_block_to_block (&block, &lse->pre);
        gfc_add_block_to_block (&block, &rse->pre);
  
!       gfc_add_modify_expr (&block, lse->expr,
! 			   fold_convert (TREE_TYPE (lse->expr), rse->expr));
      }
  
    gfc_add_block_to_block (&block, &lse->post);

I don't think this is neccessary. It suggests that either the frontend isn't 
resolving something properly, or there's still some coversions missing 
somewhere else.

It's definitely better than what we have now, but deserves a comment or TODO.

Paul


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