J3/06-226r1
To: J3
From: Aleksandar Donev
Subject: C13 - UTI 67, 68 : MERGE_BITS
Date: 15-Aug-2006
---------------------
Unresolved Technical Issues 67 and 68 (page 405) raise issues
concerning inconsistencies in the types of the arguments to
MERGE_BITS.
Reply:
Because the result of the MERGE_BITS intrinsic is described in
terms of IAND and IOR, both of which accept a mix of integer and
bits arguments, it seems consistent to allow any combination of
INTEGER/BITS arguments. The BITS_KIND must be the same for all
argument, and integerness wins for the result, as for IAND and IOR.
If two or more of the arguments are integer, we should require
that they have the same kind type parameters (since they may have
different kinds even though they have the same number of bits). This
also needs to be fixed for IAND, IOR and IEOR.
Edits:
-----
[387:15], [390:3], and [392:5]
Prepend to the sentence starting with "BITS_KIND(I)":
"If both I and J are integer, they shall have the same kind type
parameter; otherwise..."
[405:19] Replace the description of the J argument with:
"shall be of type integer or bits. BITS_KIND(I) shall be equal to
BITS_KIND(J)."
[405:20] Replace the description of the MASK argument with
"shall be of type integer or bits. BITS_KIND(I) shall be equal to
BITS_KIND(MASK)."
[405: 20+] Append to the arguments description:
"All integer arguments shall have the same kind type parameter."
[405:21] Replace the Result Characteristics description with:
"If I, J and MASK all have the same type, the result characteristics
are the same as I. Otherwise, the result characteristics are the same
as those of the argument with integer type."
#EOF