Hi, TYPE may be NULL in ix86_promote_function_mode. I checked in this patch to handle it.
H.J. --- commit 31770e61e70228463b70361c46ff6fa81eb856f8 Author: H.J. Lu <hjl.to...@gmail.com> Date: Fri May 6 10:02:18 2011 -0700 Handle NULL TYPE argument. diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index 57b2786..9426489 100644 --- a/gcc/ChangeLog.x32 +++ b/gcc/ChangeLog.x32 @@ -1,3 +1,8 @@ +2011-05-06 H.J. Lu <hongjiu...@intel.com> + + * config/i386/i386.c (ix86_promote_function_mode): Handle NULL + TYPE argument. + 2011-04-14 H.J. Lu <hongjiu...@intel.com> * config/i386/gnu-user64.h (ASM_SPEC): Support x32. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3e5169e..1a567f1 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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;