From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16750 invoked by alias); 24 Nov 2014 21:39:14 -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 16702 invoked by uid 48); 24 Nov 2014 21:39:09 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64037] Miscompilation with LTO and enum class : char parameter Date: Mon, 24 Nov 2014 21:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: 2014-11/txt/msg02904.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64037 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ubizjak at gmail dot com --- Comment #11 from H.J. Lu --- i386.c has #define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true -- Target Hook: bool TARGET_PROMOTE_PROTOTYPES (const_tree FNTYPE) This target hook returns 'true' if an argument declared in a prototype as an integral type smaller than 'int' should actually be passed as an 'int'. In addition to avoiding errors in certain cases of mismatch, it also makes for better code on certain machines. The default is to not promote prototypes. But it uses movq to pass a QI parameter.