Bug 137109
Summary: | compiling with O2 caused a tight loop | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | satish <ksatishv> |
Component: | gcc3 | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ia64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-25 20:27:19 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
satish
2004-10-25 20:09:20 UTC
When char is signed (it is on ia64), then your testcase invokes undefined behaviour and what GCC did with it is perfectly fine implementation of undefined behaviour. Integer overflow is defined for unsigned integers only in ISO C. If you compile your program with -O2 -funsigned-char (or change c's type to unsigned char), it will work as you expect. |