------- Comment #2 from marbacz at gmail dot com 2010-03-20 22:25 ------- Passing -m32 make the hang disappear.
Below is slightly less reduced version of previous test case. It comes from gnu bc. It causes ICE. Uncommenting declarations changes ICE into hang. ICE doesn't go away with -m32. gcc -O2 -flto numeric.c eval.c === In file included from eval.c:28:0, from numeric.c:19, from :0: eval.c: In function 'dc_evalstr': eval.c:30:10: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0-alpha20100318/gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status === eval.c: ==== typedef enum {DC_UNINITIALIZED, DC_NUMBER, DC_STRING} dc_value_type; typedef struct dc_number *dc_num; typedef struct dc_string *dc_str; typedef struct { dc_value_type dc_type; union { dc_num number; dc_str string; } v; } dc_data; const char *progname; int main() { return 0; } /* int dc_func(int a, int b, int c); void dc_push(dc_data); dc_data dc_getnum(int a, int b, int c); */ static const char *input_str_string; int dc_evalstr (dc_data *string) { const char *s; int peekc; switch (dc_func(0, 0, 0)){ case 0: input_str_string = s - 1; dc_push(dc_getnum(0, 0, 0)); s = input_str_string; if (peekc != -1) --s; break; } return 0; } === numeric.c === typedef enum {DC_UNINITIALIZED, DC_NUMBER, DC_STRING} dc_value_type; typedef struct bc_struct *dc_num; typedef struct dc_string *dc_str; typedef struct { dc_value_type dc_type; union { dc_num number; dc_str string; } v; } dc_data; dc_data dc_getnum(int input, int ibase, int readahead) { dc_data x; return x; } int dc_func(int a, int b, int c){return 0;} void dc_push(dc_data a){} -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43455