[fortran,patch] Add SELECTED_CHAR_KIND intrinsic

Jerry DeLisle jvdelisle@verizon.net
Thu May 1 00:42:00 GMT 2008


FX wrote:
> Attached patch adds the Fortran 2003 SELECTED_CHAR_KIND intrinsic: 
> front-end symbol, checking and simplifying routines, library routine, 
> documentation and testcases (both valid and invalid code). This is 
> really fairly straightforward. I include in that patch an unrelated 
> diagnostics bug-fix: I realized that the following code
> 
>   integer, parameter :: k = 1
>   print *, 42_k
>   print *, k_"hello world"
>   end
> 
> when compiled with -O2 -W -Wunused will give warnings that k is an 
> unused parameter, which is not true. This is fixed by calling 
> gfc_set_sym_referenced() on the appropriate kind value named constants 
> right after they are successfully matched; this is done by two 
> one-liners in primary.c.
> 
> Built on i386-apple-darwin8.10.1, will bootstrap and regtest on 
> x86_64-linux as soon as I get back home (later today). OK to commit if 
> it passes bootstrap and regtesting?
> 
> PS: Jerry, what's the status of ENCODING="..." I/O specifier? Can we 
> already claim that we support Fortran 2003 international character sets 
> (the requirements for that are fairly low, as quite a few compilers have 
> a "yes" in that column and I know none that actually supports any 
> nondefault character kind).

ENCODING="default" is now supported.  All the front-end syntaxery is ready to do
ENCODING="UTF-8" whenever we have the internals ready to do it.

Jerry



More information about the Fortran mailing list