(gdb) run -ftree-vectorize -O3 orig.c Starting program: /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/cc1 -ftree-vectorize -O3 orig.c vprintf getchar getc_unlocked getchar_unlocked putchar fputc_unlocked putc_unlocked putchar_unlocked feof_unlocked ferror_unlocked strtod strtol strtoul strtoq strtouq strtoll strtoull atof atoi atol atoll gnu_dev_major gnu_dev_minor gnu_dev_makedev __strcspn_c1 __strcspn_c2 __strcspn_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2 __strpbrk_c3 __strtok_r_1c __strsep_1c __strsep_2c __strsep_3c tolower toupper default_params game_fetch_preset free_params dup_params decode_params encode_params game_configure custom_params validate_params cf_init cf_add cf_clookup cf_slookup cf_whichsym extend_options genmap gengraph graph_edge_index graph_vertex_start fourcolour_recurse fourcolour new_scratch free_scratch bitcount place_colour map_solver new_game_desc parse_edge_list validate_desc new_game dup_game free_game solve_game game_text_format new_ui free_ui encode_ui decode_ui game_changed_state region_from_coords interpret_move execute_move game_compute_size game_set_size game_colours game_new_drawstate game_free_drawstate draw_error draw_square game_redraw game_anim_length game_flash_length game_timing_state game_print_size game_print {GC 5409k -> 4262k} Analyzing compilation unit {GC 5549k -> 5279k}Performing interprocedural optimizations Assembling functions: validate_params game_text_format encode_ui decode_ui game_changed_state game_compute_size game_anim_length game_timing_state extend_options {GC 7012k -> 5709k} Program received signal SIGSEGV, Segmentation fault. 0x00000000005eb71c in operand_equal_p (arg0=0x2b9e8fa5e930, arg1=<value optimized out>, flags=0) at /home/tbm/scratch/gcc/gcc/fold-const.c:2536 2536 return (! TREE_CONSTANT_OVERFLOW (arg0) (gdb) where #0 0x00000000005eb71c in operand_equal_p (arg0=0x2b9e8fa5e930, arg1=<value optimized out>, flags=0) at /home/tbm/scratch/gcc/gcc/fold-const.c:2536 #1 0x000000000060d73a in operand_equal_for_comparison_p (arg0=0x2b9e8fa5e930, arg1=0x2b9e8fa5e900, other=0x2b9e8fa5e930) at /home/tbm/scratch/gcc/gcc/fold-const.c:2763 #2 0x000000000060fbb4 in fold_cond_expr_with_comparison (type=0x2b9e8fa534d0, arg0=0x2b9e8fefca50, arg1=<value optimized out>, arg2=<value optimized out>) at /home/tbm/scratch/gcc/gcc/fold-const.c:4544 #3 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 #4 0x00000000005efac1 in fold_build3_stat (code=2410015024, type=0x2b9e8fa5e900, op0=0x0, op1=0x2, op2=0x16) at /home/tbm/scratch/gcc/gcc/fold-const.c:11693 #5 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 #6 0x00000000005efac1 in fold_build3_stat (code=2410015024, type=0x2b9e8fa5e900, op0=0x0, op1=0x2, op2=0x16) at /home/tbm/scratch/gcc/gcc/fold-const.c:11693 #7 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 #8 0x00000000005efac1 in fold_build3_stat (code=2410015024, type=0x2b9e8fa5e900, op0=0x0, op1=0x2, op2=0x16) at /home/tbm/scratch/gcc/gcc/fold-const.c:11693 #9 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 #10 0x00000000005efac1 in fold_build3_stat (code=2410015024, type=0x2b9e8fa5e900, op0=0x0, op1=0x2, op2=0x16) at /home/tbm/scratch/gcc/gcc/fold-const.c:11693 #11 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 #12 0x00000000005efac1 in fold_build3_stat (code=2410015024, type=0x2b9e8fa5e900, op0=0x0, op1=0x2, op2=0x16) at /home/tbm/scratch/gcc/gcc/fold-const.c:11693 #13 0x00000000005ef050 in fold_ternary (code=<value optimized out>, type=0x2b9e8fa534d0, op0=<value optimized out>, op1=0x2b9e8fa5e930, op2=0x2b9e8fa5e900) at /home/tbm/scratch/gcc/gcc/fold-const.c:11121 ...
-- Summary: [4.2 regression] Segfault in operand_equal_p with - ftree-vectorize -O3 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28935