[PATCH] fortran/24917 -- permit postfix BOZ literal constants.
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Nov 22 01:51:00 GMT 2005
On Mon, Nov 21, 2005 at 12:51:28PM -0800, Steve Kargl wrote:
> The attached patch has been bootstrapped and regression tested
> on amd64-*-freebsd for mainline GCC.
>
> This patch implements the nonstandard, but g77 supported,
> postfix BOZ-literal-constant. That is, one can do
> 'abc'z in place of the standard form z'abc'.
>
> I'll apply the patch to 4.1 when the branch re-opens. The
> patch does not cleanly apply to 4.0.x, so I have no intentions
> of committing to 4.0.x.
>
> 2005-11-21 Steven G. Kargl <kargls@comcast.net>
>
> PR fortran/24917
> * primary.c (match_boz_constant): Implement postfix BOZ constants;
> (match_string_constant): Peek for b, o, z, and x
>
> * gfortran.dg/boz_6.f90: New test.
>
This has now been tested on 4.1.
> ! { dg-do run }
! { dg-options "-std=gnu" }
> ! PR 24917
> program test
> integer ib, io, iz, ix
> integer jb, jo, jz, jx
> data ib, jb /b'111', '111'b/
> data io, jo /o'234', '234'o/
> data iz, jz /z'abc', 'abc'z/
> data ix, jx /x'abc', 'abc'x/
> if (ib /= jb) call abort
> if (io /= jo) call abort
> if (iz /= jz) call abort
> if (ix /= jx) call abort
> end program test
--
Steve
More information about the Fortran
mailing list