This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/57417] New: hang on volatile int array
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 May 2013 18:42:47 +0000
- Subject: [Bug rtl-optimization/57417] New: hang on volatile int array
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57417
Bug ID: 57417
Summary: hang on volatile int array
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The following code causes gcc trunk (and the 4.7 & 4.8 branches) to hang at -O1
or above. This seems to be different from 57381, but perhaps related.
$ gcc-trunk -v
Target: x86_64-unknown-linux-gnu
gcc version 4.9.0 20130525 (experimental) [trunk revision 199323] (GCC)
$ gcc-trunk -m32 -O0 -c small.c
$ gcc-trunk -m32 -O1 -c small.c
^C
$ cat small.c
int a, b, c;
void foo ()
{
volatile int d[1];
b = 0;
for (;; a--)
c = (int)&d[b];
}