Summary: | Incorrect code generation with sys-devel/gcc-4.3.2-r3 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Luis Fernando Schultz Xavier da Silveira <zahlberer> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | galtgendo, marcan |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
The Test Case
an amusing bug |
Description
Luis Fernando Schultz Xavier da Silveira
2009-07-02 03:48:37 UTC
Could you please attach this code for convenience sake ? BTW, this affects gcc 4.4.0 too. Created attachment 196387 [details]
The Test Case
Created attachment 196389 [details]
an amusing bug
Now, that really silly.
Following attachment is your code + 2 commented lines.
As you may notice, those two area lines are arithmetically
equal.
Simply exchanging those two lines does nothing.
However if both those lines are exchange AND printf line is uncommented,
code works. If however only the printf line is uncommented, but
the exchange is not made, bug still happens.
Could you confirm my result, as I was using 4.4.0 ? Upstream says: Can't reproduce in any active branch, thus already fixed for 4.5.0, 4.4.1, 4.3.4 Though they're not saying when exactly it got fixed. Also, it works correctly in 4.1.2. (In reply to comment #4) > Could you confirm my result, as I was using 4.4.0 ? > Result confirmed. I'm trying to hunt down the commit on the 4.4 branch that fixes this. Then I'll find it on 4.3 as well. So, 4.4.1 got released today. Once it gets into the tree, we'll see if it really fixes this problem. Though backporting to stable will still be a problem, till a new release of 4.3 branch. OK, 4.4.1 works with 4.4.0 1.0 patch tarball. It does fix this problem. But, as already said, that's not really helpful for stable. IMOP, gcc-4.3.2 should be masked as soon as possible. Let's stay with gcc-4.1.2 stable or stabilize gcc-4.3.4. I have built all my system with gcc-4.3.2 :) Let's pray for this bug doesn't affects anything critical. If this is the same bug that affects GCC 4.4.0, I've seen it hit production code. I agree, gcc-4.3.2 needs to be fixed or get masked ASAP. I wouldn't be surprised if this is causing bugs or instability in packages. I think you've missed what I've said - while 4.4.1 does have its own bugs (like i.e. tree vectorizing one), this particular one is fixed. I'm talking about this bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40747 4.4.0 had it, 4.4.1 fixed it. We were using 4.4.0 for some stuff and it hit real, production code. However, the testcase in that bug report does not fail with 4.3.2-r3, so I think we're talking about different (related?) bugs. Has the bug that this report is about been located in the GCC bugtracker? fixed versions are in stable, so we're not going to spend time on older ones |