@@ -1,3 +1,8 @@
+2011-05-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_promote_function_mode): Handle NULL
+ TYPE argument.
+
2011-04-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/gnu-user64.h (ASM_SPEC): Support x32.
@@ -7673,7 +7673,7 @@ ix86_promote_function_mode (const_tree type, enum machine_mode mode,
int *punsignedp, const_tree fntype,
int for_return)
{
- if (for_return != 1 && POINTER_TYPE_P (type))
+ if (for_return != 1 && type != NULL_TREE && POINTER_TYPE_P (type))
{
*punsignedp = POINTERS_EXTEND_UNSIGNED;
return Pmode;