This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47267] array constructor causing long compile times
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jan 2011 13:51:48 +0000
- Subject: [Bug fortran/47267] array constructor causing long compile times
- Auto-submitted: auto-generated
- References: <bug-47267-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47267
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |dfranke at gcc dot gnu.org,
| |jvdelisle at gcc dot
| |gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-12 13:51:43 UTC ---
You can use -fmax-array-constructor=<n> to tune this. However, I think
currently there is no distinction made between constructors which have to be be
run at compile time (a) and those which can be run at compile time (b).
<n> is currently 65535.
Example for (a): Parameter array or initialization expression
INTEGER, PARAMETER :: Niter=30000000
INTEGER, PARAMETER :: ARRAY(Niter) = (/(i,i=1,Niter)/)
Example for (b): Assignment to an array
INTEGER, PARAMETER :: Niter=30000000
INTEGER :: ARRAY(Niter)
ARRAY(Niter) = (/(i,i=1,Niter)/)