From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24199 invoked by alias); 29 Dec 2004 01:33:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24135 invoked by uid 48); 29 Dec 2004 01:33:33 -0000 Date: Wed, 29 Dec 2004 01:33:00 -0000 Message-ID: <20041229013333.24134.qmail@sourceware.org> From: "dann at godzilla dot ics dot uci dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040517043308.15484.dann@godzilla.ics.uci.edu> References: <20040517043308.15484.dann@godzilla.ics.uci.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/15484] [tree-ssa] bool and short function arguments promoted to int X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03829.txt.bz2 List-Id: ------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-12-29 01:33 ------- (In reply to comment #2) > The underlying ABI might require short & bool arguments to be passed as int. > Some do, some don't. Anyway, that's an argument marshalling issue, which is not > currently addressed at the tree level. > > The cast to int has been inserted by the front end, I think C requires that. > > This is a VRP issue, not an argument marshalling one. A discussion about this is at: http://gcc.gnu.org/ml/gcc/2004-05/msg00752.html in that thread Jim Wilson has some more explanations about what is going on. A patch that seems to work is also in that mail, but I won't have time to properly test it to try to get it committed anytime soon. If someone wants to play with this, it would be great. The problem is that the C and C++ front-ends generate casts to int when c_promoting_integer_type_p returns true. Those casts are generated too early (if they are needed at all, and they might not be needed). Iff the casts are needed they should be when lowering to RTL. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15484