[fortran,patch] Wide chars part 5, front-end interface to the library functions

Tobias Burnus burnus@net-b.de
Thu May 15 18:36:00 GMT 2008


FX wrote:
> Attached patch is the fifth part of wide characters support; I had
> planned to submit the rest of changes in one patch, but its size kept
> growing and it would have been harder to review, so I split it once
> again.

+                                    build_pointer_type (pchar1_type_node),
+                                     gfc_charlen_type_node, 
pchar1_type_node);

In my diff there is a spacing problem. The same for the changes a few 
lines down in the patch file; please check.


> Bootstrapped and regtested on x86_64-linux. I will commit on Saturday
> if noone objects to doing it that way.
>   
I assume you will follow up soon with part 6 of the patches. Otherwise I 
would suggest to disable validate_character temporarily for kind=4. 
Because it is quite easy to produce ICEs:

character(kind=1) :: c1
character(kind=4) :: c4
c4 = 4_'Hello World' !  internal compiler error: in 
gfc_conv_constant_to_tree
! Not yet working (as expected):
! c1 = 4_'Hello World' ! Error: Can't convert CHARACTER(4) to 
CHARACTER(1) at (1)
end


Your patch is OK with changing validate_character to return -1 for 
kind=4, or if you promise to fix the ICE soonish with your next patch, 
it is also OK without that change.

Tobias



More information about the Fortran mailing list