This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44742] ICE in gfc_conv_array_initializer
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jul 2010 05:33:34 -0000
- Subject: [Bug fortran/44742] ICE in gfc_conv_array_initializer
- References: <bug-44742-15192@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from burnus at gcc dot gnu dot org 2010-07-06 05:33 -------
(In reply to comment #9)
> Even shorter:
> integer, parameter :: N = 256
>
> Note: N=256 is the smallest number for which it fails.
Workaround: Use a sufficiently large -fmax-array-constructor=<n>, e.g.
-fmax-array-constructor=65536
(65536 = 256**2; default is 65535)
Side remark: It is not particularly efficient to use a huge static variable. If
you use PARAMETER (as in your example), that leads to huge .mod files and on
assignment to large code.
If you use a normal variable (with [implied] SAVE), a non-zero initializer will
be written as is into the assembler file, which makes the binary unnecessarily
large. For variables, using initialization at run time is the better choice for
large arrays. The best solution for PARAMETER depends on the purpose.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44742