true_operand = convert (result_type, true_operand);
false_operand = convert (result_type, false_operand);
- /* If the result type is unconstrained, take the address of the operands and
- then dereference the result. Likewise if the result type is passed by
- reference, because creating a temporary of this type is not allowed. */
+ /* If the result type is unconstrained or variable-sized, take the address
+ of the operands and then dereference the result. Likewise if the result
+ type is passed by reference, because creating a temporary of this type is
+ not allowed. */
if (TREE_CODE (result_type) == UNCONSTRAINED_ARRAY_TYPE
|| type_contains_placeholder_p (result_type)
+ || !TREE_CONSTANT (TYPE_SIZE (result_type))
|| TYPE_IS_BY_REFERENCE_P (result_type))
{
result_type = build_pointer_type (result_type);