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]

On types, types, types


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.

The patch is large and mechanical, but also sort-of dangerous
because it touches code all over the map.  The patch probably 
makes us insert a cast or two too many, but the optimizers can
remove them anyway, and it allows us to check that we're not
doing anything that's not sane (e.g. abort in gfc_add_modify_expr).
I have tried it on ppc, x86, and amd64 with positive impact on the
test suite results except for the forall_3.f90 problem I mentioned,
and on SPEC2k with no new problems
I would appreciate if people tried this on their private tests, I
may have missed a few cases.  Feedback on the patch itself is also
welcome of course ;-)
If it looks OK, I'll commit it some time this week.

Gr.
Steven

Attachment: gfortran_types.diff.gz
Description: GNU Zip compressed data


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