http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Bug #: 56501 Summary: gcc 4.6 ICE on noreturn function at -Os and above Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: dhaze...@yahoo.com The following testcase (derived from gzip) triggers an internal compiler error with gcc 4.6, 4.5 and 4.4 when compiled at -Os or higher on x86_64-linux. The problem does not occur with 4.7 or newer, or with 4.3 or older. $ gcc-4.6 --version gcc-4.6 (GCC) 4.6.3 $ gcc-4.6 -O1 -w small.c $ gcc-4.6 -Os -w small.c small.c: In function ‘main’: small.c:24:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. $ cat small.c int a; void try_help () __attribute__ ((__noreturn__)); void try_help () { } int main () { switch (a) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': break; default: try_help (); } }