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]; }