Summary: | Wrong code generated (assignment incorrectly optimized out) | ||
---|---|---|---|
Product: | gcc | Reporter: | Marcin 'Qrczak' Kowalczyk <qrczak> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | cdfrey, chiabaut, fang, gcc-bugs, pinskia, qrczak, sorenj, takahisa.yokota |
Priority: | P3 | Keywords: | alias, wrong-code |
Version: | 4.2.0 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | ||
Bug Depends on: | 28003 | ||
Bug Blocks: | |||
Attachments: | Test case |
Description
Marcin 'Qrczak' Kowalczyk
2006-08-14 18:58:48 UTC
Created attachment 12075 [details]
Test case
The problem seems to be caused by illegal type punning. Rewriting the code to avoid pointer casts cures the bug, and -fno-strict-aliasing cures it too, so gcc is probably correct. Thanks to Michael Veksler for pointing this out. |