Compilation of enumerated DATA statements is extremely slow.
Related PR:
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13465
Related threads on ML:
* http://gcc.gnu.org/ml/fortran/2004-08/msg00131.html
* http://gcc.gnu.org/ml/fortran/2006-09/msg00025.html
Shell script to generate example data:
$> cat datagen.sh
#! /bin/bash
outfile=data.f90
dim1=50
dim2=1000
echo "MODULE appdata" > ${outfile}
echo "INTEGER :: thedata(${dim1}, ${dim2})" >> ${outfile}
for i in `seq 1 ${dim1}` ; do
for j in `seq 1 ${dim2}` ; do
echo "DATA thedata(${i}, ${j}) / $((i*j)) /" >> ${outfile}
done
done
echo "END MODULE" >> ${outfile}
P4 3.2 GHz, 2GB RAM:
$> bash datagen.sh
$> time gfortran-4.2 -c data.f90
real 3m31.646s
user 3m29.545s
sys 0m0.172s
--
Summary: Extremely slow compilation of enumerated DATA
statements.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: franke dot daniel at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28974