1 |
Frank Peters writes: |
2 |
|
3 |
> After banging my head for a while over some strange results, I began |
4 |
> to suspect GCC-4.5.2, the latest version in portage, was creating |
5 |
> faulty code. |
6 |
> |
7 |
> It seems to a correct suspicion. |
8 |
[...] |
9 |
|
10 |
> The problem can be fixed by compiling the program with "O1" |
11 |
> optimization: |
12 |
|
13 |
Or -O3. |
14 |
|
15 |
|
16 |
> For anyone who wants to try to duplicate these results, please feel |
17 |
> free to do so. |
18 |
> |
19 |
> So I will have to conclude that GCC-4.5.2 has serious problems. |
20 |
> This kind of erroneous behavior could appear anywhere. |
21 |
|
22 |
Oh dear, that's scary. I can confirm this. With -O0, -O1 and -O3, all is |
23 |
fine. -O2 gives the result you see. And with -Os, I get yet another |
24 |
result (0/0, 4/4, 8/8). |
25 |
|
26 |
This is an AMD Athlon(tm) Dual Core Processor 4850e, gcc has been |
27 |
copmpiled with these use flags: fortran gtk mudflap multilib nls nptl openmp |
28 |
|
29 |
Who will file the bug report now? |
30 |
|
31 |
Wonko |