http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59119
Bug ID: 59119 Summary: Segfault in -fisolate-erroneous-paths pass Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: uweigand at gcc dot gnu.org Building the following test case (reduced from Python 2.7.5) with -O2 -g: extern void *memmove (void *, const void *, __SIZE_TYPE__); extern void *memset (void *, int, __SIZE_TYPE__); typedef struct { long n_prefix; long n_spadding; } NumberFieldWidths; void fill_number(char *buf, const NumberFieldWidths *spec) { if (spec->n_prefix) { memmove(buf, (char *) 0, spec->n_prefix * sizeof(char)); buf += spec->n_prefix; } if (spec->n_spadding) { memset(buf, 0, spec->n_spadding); buf += spec->n_spadding; } } crashes the compiler with: formatter_string.i: In function ‘fill_number’: formatter_string.i:11:1: internal compiler error: Segmentation fault fill_number(char *buf, const NumberFieldWidths *spec) ^ 0x1064f147 crash_signal /home/uweigand/src/gcc/gcc/toplev.c:334 0x1090806c ptrofftype_p /home/uweigand/src/gcc/gcc/tree.h:4463 0x1090806c build2_stat(tree_code, tree_node*, tree_node*, tree_node*) /home/uweigand/src/gcc/gcc/tree.c:4151 0x1022c0db gimple_assign_rhs_to_tree(gimple_statement_d*) /home/uweigand/src/gcc/gcc/cfgexpand.c:103 0x10861e67 insert_debug_temp_for_var_def(gimple_stmt_iterator_d*, tree_node*) /home/uweigand/src/gcc/gcc/tree-ssa.c:442 0x10862397 insert_debug_temps_for_defs(gimple_stmt_iterator_d*) /home/uweigand/src/gcc/gcc/tree-ssa.c:549 0x103ff49b gsi_remove(gimple_stmt_iterator_d*, bool) /home/uweigand/src/gcc/gcc/gimple-iterator.c:563 0x10ba8083 insert_trap_and_remove_trailing_statements /home/uweigand/src/gcc/gcc/gimple-ssa-isolate-paths.c:110 0x10ba8a47 gimple_ssa_isolate_erroneous_paths /home/uweigand/src/gcc/gcc/gimple-ssa-isolate-paths.c:305 0x10ba8a47 execute /home/uweigand/src/gcc/gcc/gimple-ssa-isolate-paths.c:370