http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58690
Bug ID: 58690 Summary: internal compiler error: in copy_to_mode_reg, at explow.c:641 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: ubizjak at gmail dot com [hjl@gnu-6 gcc]$ cat /tmp/foo.c struct gomp_team_state { void *team; void *work_share; void *last_work_share; unsigned team_id; unsigned level; unsigned active_level; unsigned place_partition_off; unsigned place_partition_len; unsigned long single_count; unsigned long static_trip; }; struct gomp_thread { void (*fn) (void *data); void *data; struct gomp_team_state ts; }; extern __thread struct gomp_thread gomp_tls_data; static inline struct gomp_thread *gomp_thread (void) { return &gomp_tls_data; } void foo (void) { struct gomp_thread *thr = gomp_thread (); __builtin_memset (thr, '\0', sizeof (*thr)); } [hjl@gnu-6 gcc]$ ./xgcc -B./ -mx32 -O /tmp/foo.c -S /tmp/foo.c: In function ‘foo’: /tmp/foo.c:29:20: internal compiler error: in copy_to_mode_reg, at explow.c:641 __builtin_memset (thr, '\0', sizeof (*thr)); ^ 0x79cb0a copy_to_mode_reg(machine_mode, rtx_def*) /export/gnu/import/git/gcc/gcc/explow.c:641 0x79ca88 copy_addr_to_reg(rtx_def*) /export/gnu/import/git/gcc/gcc/explow.c:625 0xe27919 ix86_expand_setmem(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) /export/gnu/import/git/gcc/gcc/config/i386/i386.c:23439 0xeff035 gen_setmemsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) /export/gnu/import/git/gcc/gcc/config/i386/i386.md:15641 0x9f79f6 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) const /export/gnu/import/git/gcc/gcc/recog.h:288 0x9f7249 maybe_gen_insn(insn_code, unsigned int, expand_operand*) /export/gnu/import/git/gcc/gcc/optabs.c:8227 0x9f73b6 maybe_expand_insn(insn_code, unsigned int, expand_operand*) /export/gnu/import/git/gcc/gcc/optabs.c:8247 0x7b7f61 set_storage_via_setmem(rtx_def*, rtx_def*, rtx_def*, unsigned int, unsigned int, long) /export/gnu/import/git/gcc/gcc/expr.c:2902 0x7b7926 clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned int, long) /export/gnu/import/git/gcc/gcc/expr.c:2748 0x669c97 expand_builtin_memset_args /export/gnu/import/git/gcc/gcc/builtins.c:3640 0x6697e4 expand_builtin_memset /export/gnu/import/git/gcc/gcc/builtins.c:3530 0x670d96 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) /export/gnu/import/git/gcc/gcc/builtins.c:6111 0x7d2355 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**) /export/gnu/import/git/gcc/gcc/expr.c:10205 0x6b82a5 expand_call_stmt /export/gnu/import/git/gcc/gcc/cfgexpand.c:2182 0x6b839f expand_gimple_stmt_1 /export/gnu/import/git/gcc/gcc/cfgexpand.c:2220 0x6b89ec expand_gimple_stmt /export/gnu/import/git/gcc/gcc/cfgexpand.c:2372 0x6bee5d expand_gimple_basic_block /export/gnu/import/git/gcc/gcc/cfgexpand.c:4211 0x6c08ec gimple_expand_cfg /export/gnu/import/git/gcc/gcc/cfgexpand.c:4730 0x6c0f76 execute /export/gnu/import/git/gcc/gcc/cfgexpand.c:4944 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-6 gcc]$