------- 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

Reply via email to