4 Jul 20:10
Status of deferred type parameters and ALLOCATE
From: Steve Kargl <sgk <at> troutmask.apl.washington.edu>
Subject: Status of deferred type parameters and ALLOCATE
Newsgroups: gmane.comp.gcc.fortran
Date: 2009-07-04 18:10:47 GMT
Subject: Status of deferred type parameters and ALLOCATE
Newsgroups: gmane.comp.gcc.fortran
Date: 2009-07-04 18:10:47 GMT
All,
Here's a short status report on the deferred type parameter
and F2003 ALLOCATE features that I've been implementing.
I'm making slow but steady progress on both features.
Unfortunately, the two features are sufficiently intertwined
that one cannot be committed without the other (imho).
Here's a preview, consider
program test
implicit none
character(:), allocatable :: fmt
allocate(character(3) :: fmt)
fmt = 'abc'
print *, fmt, len(fmt)
deallocate(fmt)
allocate(character(6) :: fmt)
fmt = 'abcdef'
print *, fmt, len(fmt)
end program test
REMOVE:kargl[293] gfc4x -o z -fdump-tree-original t.f90
REMOVE:kargl[294] ./z
abc 6
abcdef 6
Note 1: The 6 in the first line of output should probably
be 3. This difference is caused by the way I currently
fiddle with the length component of the charlen structure
during the parsing and matching stage.
(Continue reading)
This has to be trivial.
FAIL: gfortran.dg/func_derived_2.f90 -O1 execution test
Fails with -O1 only!
FAIL: gfortran.dg/import.f90 -O3 -fomit-frame-pointer execution test
FAIL: gfortran.dg/import.f90 -O3 -fomit-frame-pointer -funroll-loops
execution test
FAIL: gfortran.dg/import.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions execution test
FAIL: gfortran.dg/import.f90 -O3 -g execution test
Fails at -O3
The calls to 'test' and 'bar' are optimized away and all routes lead
to call abort ().
RSS Feed