Summary: | Optimization (>= -O2) with bitfields yields incorrect result | ||
---|---|---|---|
Product: | gcc | Reporter: | charles |
Component: | rtl-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gcc-bugs, jakub |
Priority: | P3 | Keywords: | wrong-code |
Version: | 3.0.3 | ||
Target Milestone: | --- | ||
Host: | sparc-sun-solaris2.8 | Target: | sparc-sun-solaris2.8 |
Build: | sparc-sun-solaris2.8 | Known to work: | |
Known to fail: | Last reconfirmed: |
Description
charles
2002-04-19 11:36:07 UTC
Fix: Don't compile with -O2 or greater? Yeah, I know it's lame. State-Changed-From-To: open->closed State-Changed-Why: Your testcase is ill-formed, uses illegal type-punning. Please see info gcc on -fstrict-aliasing (which is the default in these gcc releases at -O2 and above). Either compile with -O2 -fno-strict-aliasing or fix the code in question (e.g. to access the objects through unions). Reopening to ... |