[Bug fortran/20923] gfortran slow for large array constructors
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Sat Nov 28 16:30:00 GMT 2009
------- Comment #17 from dominiq at lps dot ens dot fr 2009-11-28 16:30 -------
With the patch in comment #15 (gfc, gfc_c without), I see the following for the
test
[macbook] f90/bug% cat pr19925_1_db.f90
INTEGER, PARAMETER :: N=100000
INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
print *, I(1), M(1), I(N), M(N)
END
without (pr19925_1.f90)/with (pr19925_1_db.f90) the print line:
[macbook] f90/bug% time gfc_c pr19925_1.f90
pr19925_1.f90:3.36:
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
1
Error: Initialization expression didn't reduce (1)
368.554u 0.801s 6:09.49 99.9% 0+0k 0+5io 0pf+0w
[macbook] f90/bug% time gfc pr19925_1.f90
369.495u 0.629s 6:10.22 99.9% 0+0k 0+19io 0pf+0w
[macbook] f90/bug% a.out
[macbook] f90/bug% time gfc_c pr19925_1_db.f90
pr19925_1_db.f90:3.36:
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
1
Error: Initialization expression didn't reduce (1)
367.576u 0.591s 6:08.25 99.9% 0+0k 0+5io 0pf+0w
[macbook] f90/bug% time gfc pr19925_1_db.f90
pr19925_1_db.f90:2.27:
INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
1
Error: The number of elements in the array constructor at (1) requires an
increase of the allowed 65535 upper limit. See -fmax-array-constructor option
pr19925_1_db.f90: In function 'MAIN__':
pr19925_1_db.f90:4:0: internal compiler error: in
gfc_conv_array_constructor_expr, at fortran/trans-expr.c:3710
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
369.184u 0.620s 6:09.87 99.9% 0+0k 0+5io 0pf+0w
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20923
More information about the Gcc-bugs
mailing list