https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91160

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2019-07-15
     Ever confirmed|0                           |1

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Fortran allows the arguments of merge_bits() to be BOZ literal constants.
>  merge_bits is broken for said arguments.

AFAIU the current implementation of BOZ literal constants, they are INTEGER(16)
(INTEGER(8) with -m32) and the error should be expected. The following changes

! { dg-do run }
program foo
   integer(16) m, n, k
   m = merge_bits(b'010101', 1234_16, 42_16);   if (m /=  1232) stop 1
   n = merge_bits(1234_16, z'3456', 42_16);     if (n /= 13398) stop 2
   k = merge_bits(1234_16, 3456_16, o'12334');  if (k /=  3536) stop 3
end program foo

allow the code to compile and run (for -m64).

Note that the errors "Error: 'j' argument ..." disappeared between revisions
r267284 and r267553 (r267415?).

Reply via email to