Boost logo

Boost :

Subject: Re: [boost] Bug with gcc and array
From: Andreas Klein (klein_at_[hidden])
Date: 2008-11-25 05:33:38


Hello

> I have no clue. But what does GCC do when you try the following?

I tried gcc 4.2 and 4.3 on Linux on a Intel(R) Core(TM)2 CPU T5500
@ 1.66GHz the version of boost is 1.36.

> struct big_array {
> unsigned int C[1<<22];
> unsigned int& operator[](unsigned p) {
> return C[p];
> }
> };
>
> int main () {
> big_array a;
> a[(1<<22)-13]=0; // ???
> }

It crashes. Prehaps its some gcc bug. I have no real idea what
is the problem. As I said: I send the same report to the gcc team. But I
think it is also interesting for the boost team.

Best wishes
     Andreas Klein


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk