From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120528 invoked by alias); 19 Sep 2015 15:47:36 -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 120502 invoked by uid 48); 19 Sep 2015 15:47:32 -0000 From: "gdelugre@security-labs.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/64951] g++ generates incorrect code when using a register variable within a template function Date: Sat, 19 Sep 2015 15:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: inline-asm X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gdelugre@security-labs.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: version Message-ID: In-Reply-To: References: 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: 2015-09/txt/msg01555.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64951 Guillaume Delugr=C3=A9 changed: What |Removed |Added ---------------------------------------------------------------------------- Version|4.9.2 |5.2.0 --- Comment #1 from Guillaume Delugr=C3=A9 --- The same problem is present when using C++14 auto arguments instead of templates: inline void SetRdx(auto value) { register auto __foo asm ("rdx") =3D value; asm volatile ( "" :: "r" (__foo) ); } This code will also store the value parameter inside register rax instead of rdx on GCC 5.2.0. >>From gcc-bugs-return-497578-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 19 16:57:57 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 34019 invoked by alias); 19 Sep 2015 16:57:56 -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 33471 invoked by uid 48); 19 Sep 2015 16:57:52 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67638] New: [SH] ICE with nosave_low_regs ISR and -mfmovd Date: Sat, 19 Sep 2015 16:57: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone cf_gcctarget Message-ID: 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: 2015-09/txt/msg01556.txt.bz2 Content-length: 1484 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67638 Bug ID: 67638 Summary: [SH] ICE with nosave_low_regs ISR and -mfmovd Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- Target: sh*-*-* When compiling the test cases pragma-isr-nosave_low_regs.c and attr-isr-nosave_low_regs.c in gcc.target/sh there's an ICE: attr-isr-nosave_low_regs.c: In function 'isr': attr-isr-nosave_low_regs.c:25:1: internal compiler error: in get_free_reg, at config/sh/sh.c:10204 0xd9ab6a get_free_reg ../../gcc-trunk2/gcc/config/sh/sh.c:10204 0xd9ab6a fpscr_set_from_mem(int, unsigned long*) ../../gcc-trunk2/gcc/config/sh/sh.c:10217 0xd9fe17 push_regs ../../gcc-trunk2/gcc/config/sh/sh.c:7191 0xd9fe17 sh_expand_prologue() ../../gcc-trunk2/gcc/config/sh/sh.c:7942 0xe8b53a gen_prologue() ../../gcc-trunk2/gcc/config/sh/sh.md:11649 0xd8bbc8 target_gen_prologue ../../gcc-trunk2/gcc/config/sh/sh.md:16732 0x812c7d thread_prologue_and_epilogue_insns() ../../gcc-trunk2/gcc/function.c:6119 0x8136e2 rest_of_handle_thread_prologue_and_epilogue ../../gcc-trunk2/gcc/function.c:6670 0x8136e2 execute ../../gcc-trunk2/gcc/function.c:6712 Please submit a full bug report,