diff options
Diffstat (limited to 'gcc/cp/call.c')
| -rw-r--r-- | gcc/cp/call.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4f86cc67c3c..b2b9d000c6b 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); |

