This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH sh] Fix thinko in FUNCTION_VALUE


I found this by inspection in config/sh/sh.h.

The call to sh_promote_prototypes is wrong, and this could lead to subtle
bugs for functions using attribute renesas.

Ok for mainline?

Paolo

2009-04-17  Paolo Bonzini  <bonzini@gnu.org>

	* config/sh/sh.h (FUNCTION_VALUE): Fix call to sh_promote_prototypes.

Index: gcc/config/sh/sh.h
===================================================================
--- gcc/config/sh/sh.h  (branch promote-function-mode)
+++ gcc/config/sh/sh.h  (working copy)
@@ -1743,7 +1743,7 @@ extern enum reg_class regno_reg_class[FI
                 || TREE_CODE (VALTYPE) == BOOLEAN_TYPE                 \
                 || TREE_CODE (VALTYPE) == REAL_TYPE                    \
                 || TREE_CODE (VALTYPE) == OFFSET_TYPE))                \
-             && sh_promote_prototypes (VALTYPE)                                \
+             && sh_promote_prototypes (FUNC)                           \
            ? (TARGET_SHMEDIA64 ? DImode : SImode) : TYPE_MODE (VALTYPE)), \
           BASE_RETURN_VALUE_REG (TYPE_MODE (VALTYPE)))
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]