[Issue 4379] ICE(blockopt.c): foreach over huge tuple, only with -O
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 22 01:28:09 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4379
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #5 from Don <clugdbug at yahoo.com.au> 2010-11-22 01:26:45 PST ---
This turns out to be very simple. When merging blocks together, we need to
allow one pass per block, since it only merges one block per pass.
In the test case, there are more than 200 blocks, and they all get merged into
one.
PATCH:
blockopt.c, blockopt(), line 595
void blockopt(int iter)
{ block *b;
int count;
if (OPTIMIZER)
{
+ int iterationLimit = 200;
+ if (iterationLimit < numblks)
+ iterationLimit = numblks;
count = 0;
do
{
and line 622
do
{
compdfo(); /* compute depth first order (DFO) */
elimblks(); /* remove blocks not in DFO */
- assert(count < 200);
+ assert(count < iterationLimit);
count++;
} while (mergeblks()); /* merge together blocks */
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list