From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB0483858C5E; Mon, 11 Sep 2023 06:55:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB0483858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694415348; bh=XDWuIAQCtZXgdEWhCjBbOEq3gAaug6dOVZNEDGjsP7c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UxXvduSVpzu4IXWOIjNqhqKd3TWPYknN38uP+JQP2jx3GipLAkIY//uK6qjDyv2+w YbMENpwTKNd7RUEu2yf8rt7z4R8SI0nt4Gvsge1VmCY9+umyUGbPJuXo25RqlRiJ4f +Xz/Cj3y4lxWaxpAIPt4hk1gEiUdFOxiyIqjOlAk= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE Date: Mon, 11 Sep 2023 06:55:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: inline-asm, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to cc 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111340 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail do= t com CC|uros at gcc dot gnu.org | --- Comment #5 from Uro=C5=A1 Bizjak --- (In reply to Jakub Jelinek from comment #4) > Of course, what exactly falls under the "g" constraint is target specific. > Though, because that constraint also allows the constant to be reload int= o a > register, > if such constant isn't valid, then RA should have reloaded it into regist= er > or memory. >=20 > Seems the failure is that i386.cc (output_pic_addr_const) doesn't have the > CONST_WIDE_INT case unlike output_addr_const. Indeed. Patch in testing: --cut here-- diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 1cef7ee8f1a..477e6cecc38 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -12344,8 +12344,8 @@ output_pic_addr_const (FILE *file, rtx x, int code) assemble_name (asm_out_file, buf); break; - case CONST_INT: - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); + CASE_CONST_SCALAR_INT: + output_addr_const (file, x); break; case CONST: --cut here--=