From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27169 invoked by alias); 1 Oct 2014 18:55:58 -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 27120 invoked by uid 48); 1 Oct 2014 18:55:54 -0000 From: "steve at hearnden dot org.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63434] New: builtins.c has incorrect parameters for GEN_CALL_VALUE Date: Wed, 01 Oct 2014 18:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: steve at hearnden dot org.uk 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 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: 2014-10/txt/msg00079.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63434 Bug ID: 63434 Summary: builtins.c has incorrect parameters for GEN_CALL_VALUE Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: steve at hearnden dot org.uk When trying to compile a new machine description, I found that testsuite testsuite/gcc.c-torture/compile/930623-1.c was crashing. The machine description needs a 4th parameter to be added. On investigation of the cause, my 4th parameter to the call function (number of registers) had been set to NULL. With some searching, it appears that the builtins don't work when the 4th Parameter is added, or require it to be specially coded. I believe the correct fix is described below - switching the last two parameters emit_call_insn (GEN_CALL_VALUE (valreg, gen_rtx_MEM (FUNCTION_MODE, function), - const0_rtx, NULL_RTX, const0_rtx)); + const0_rtx, const0_rtx, NULL_RTX));