Bug 40157 - ICE with -floop-block
Summary: ICE with -floop-block
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-05-15 08:41 UTC by Arthur Loiret
Modified: 2009-10-15 16:27 UTC (History)
3 users (show)

See Also:
Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
Build: x86_64-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Loiret 2009-05-15 08:41:48 UTC
Hi,

With this simple testcase:

int buffer[256*256];
int main(void)
{
    int *dest = buffer;
    int x, y;
    for(x = 0; x < 256; x++)
        for(y = 0; y < 256; y++)
            *dest++ = 0;
    return 0;
}

We get an ICE:

% gcc-4.4 -O1 -floop-block foo.c -o foo
foo.c: In function ‘main’:
foo.c:2: internal compiler error: in expand_scalar_variables_expr, at graphite.c:4295
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.


Thanks.
Comment 1 Richard Biener 2009-05-15 11:05:25 UTC
Not a regression, -floop-block is new.
Comment 2 Sebastian Pop 2009-05-15 17:49:11 UTC
This problem is fixed in the Graphite branch.  I guess that the
problem comes from the fact that in GCC4.4 we did not handled
INDIRECT_REF in expand_scalar_variables_expr.  

Should I back-port that code?

Thanks,
Sebastian
Comment 3 Debian GCC Maintainers 2009-05-16 12:48:09 UTC
a patch would be appreciated, even if it's not applied directly in the 4.4 branch.

  Matthias
Comment 4 Sebastian Pop 2009-10-15 16:27:06 UTC
I do not intend to backport all the changes from graphite GCC4.5 to GCC4.4.
This testcase is now part of the graphite testsuite and works with -floop-block
in the graphite branch.

Sebastian