From: Danny Smith Date: Thu, 18 Sep 2003 21:22:17 +0000 (+0000) Subject: re PR c++/12320 (ICE on use of undefined enum) X-Git-Tag: releases/gcc-3.4.0~3650 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f50d3dd9d05836954dd17d31866834923caa4d5;p=thirdparty%2Fgcc.git re PR c++/12320 (ICE on use of undefined enum) PR c++/12320 * call.c (type_passed_as): Check for incomplete type. (convert_for_arg_passing): Likewise. From-SVN: r71546 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ad41de2c00e8..1bc2abf5e9c4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-09-18 Danny Smith + + PR c++/12320 + * call.c (type_passed_as): Check for incomplete type. + (convert_for_arg_passing): Likewise. + 2003-09-18 Nathan Sidwell PR c++/9848 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4f86cc67c3c8..b2b9d000c6bc 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4342,6 +4342,7 @@ type_passed_as (tree type) type = build_reference_type (type); else if (PROMOTE_PROTOTYPES && INTEGRAL_TYPE_P (type) + && COMPLETE_TYPE_P (type) && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (integer_type_node))) type = integer_type_node; @@ -4361,6 +4362,7 @@ convert_for_arg_passing (tree type, tree val) val = build1 (ADDR_EXPR, build_reference_type (type), val); else if (PROMOTE_PROTOTYPES && INTEGRAL_TYPE_P (type) + && COMPLETE_TYPE_P (type) && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (integer_type_node))) val = perform_integral_promotions (val);