From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11254 invoked by alias); 11 Oct 2013 15:24:59 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11191 invoked by uid 48); 11 Oct 2013 15:24:55 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58690] New: internal compiler error: in copy_to_mode_reg, at explow.c:641 Date: Fri, 11 Oct 2013 15:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00634.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58690 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 =3D gomp_thread (); __builtin_memset (thr, '\0', sizeof (*thr)); } [hjl@gnu-6 gcc]$ ./xgcc -B./ -mx32 -O /tmp/foo.c -S=20 /tmp/foo.c: In function =E2=80=98foo=E2=80=99: /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 for instructions. [hjl@gnu-6 gcc]$ >>From gcc-bugs-return-431491-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 11 16:31:23 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23078 invoked by alias); 11 Oct 2013 16:31:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23036 invoked by uid 48); 11 Oct 2013 16:31:19 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58689] Enhance returns_nonnull Date: Fri, 11 Oct 2013 16:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00635.txt.bz2 Content-length: 230 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58689 --- Comment #1 from Marc Glisse --- 5) A warning that suggests adding the attribute to a function, when gcc can detect that the return value is != 0.