This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18314] New: Abnormal behavior in optimization
- From: "lamshuyin at netvigator dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2004 23:57:05 -0000
- Subject: [Bug c/18314] New: Abnormal behavior in optimization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For this program, -O2 will create an infinite loop:
int test=0;
void main(void)
{
while((volatile int)test!=0);
}
If "volatile int" is not allowed, there should be at least some warning or
error, but it compiles successfully.
--
Summary: Abnormal behavior in optimization
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lamshuyin at netvigator dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386
GCC host triplet: i386
GCC target triplet: ARM
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18314