[PATCH] PR 78534 Change character length from int to size_t
Dominique d'Humières
dominiq@lps.ens.fr
Fri Dec 16 18:23:00 GMT 2016
> Le 16 déc. 2016 à 19:06, Janne Blomqvist <blomqvist.janne@gmail.com> a écrit :
>
> On Fri, Dec 16, 2016 at 5:50 PM, Dominique d'Humières
> <dominiq@lps.ens.fr> wrote:
>> Hi Janne,
>>
>> I have applied your two patches and found that I had to skip the patches for resolve.c and match.c due to the errors
>>
>> ../../p_work/gcc/fortran/resolve.c: In function 'void resolve_select_type(gfc_code*, gfc_namespace*)':
>> ../../p_work/gcc/fortran/resolve.c:8731:58: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'long int' [-Werror=format=]
>> gfc_basic_typename (c->ts.type), charlen, c->ts.kind);
>>
>> and
>>
>> ../../p_work/gcc/fortran/match.c: In function 'gfc_symtree* select_intrinsic_set_tmp(gfc_typespec*)':
>> ../../p_work/gcc/fortran/match.c:5786:55: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'long int' [-Werror=format=]
>> gfc_basic_typename (ts->type), charlen, ts->kind);
>>
>
> Oh, blast. Of course you're right, from the second patch, the part
> that touched resolve.c and match.c are incorrect.
>
>> while the patch for dump-parse-tree.c was needed.
>>
>> With the patches applied I see several failures in the test suite compiled with ‘-m64 -flto’, but not with ‘-m32 -flto’ of the kind
>
> Ok, thanks for the hint. I haven't tested with -flto. Do you just run
> it with something like
>
> CFLAGS="-flto" make -j $NCPUS check-fortran
>
> or how do you do it?
Due to recurrent problems with -flto, I have the following change in my working tree
--- ../_clean/gcc/testsuite/lib/gfortran-dg.exp 2016-02-12 20:21:04.000000000 +0100
+++ gcc/testsuite/lib/gfortran-dg.exp 2016-02-13 10:03:11.000000000 +0100
@@ -140,8 +140,16 @@ proc gfortran-dg-runtest { testcases fla
# we cycle through the option list, otherwise we don't
if [expr [search_for $test "dg-do run"]] {
set option_list $torture_with_loops
+ if [check_effective_target_lto] {
+ lappend option_list { -g -flto }
+ # lappend option_list { -g -O3 -fwhole-program -flto }
+ }
} else {
set option_list [list { -O } ]
+ # if [check_effective_target_lto] {
+ # lappend option_list { -g -flto }
+ # lappend option_list { -g -O3 -fwhole-program -flto }
+ # }
}
set nshort [file tail [file dirname $test]]/[file tail $test]
i.e., I add the options ‘-g -flto’ to the list of options used by the gfortran test suite.
>
> I don't have lldb, but I guess I can see roughly the same with gdb..
For what I do, it is close to gdb (I did not succeed to authorize it on recent darwin).
Dominique
>> The affected tests are
>>
>> array_constructor_17.f90
>> auto_char_len_3.f90
>> char_length_14.f90
>> char_length_5.f90
>> char_result_*.f90
>> charlen_03.f90
>> deferred_type_param_4.f90
>> dummy_procedure_3.f90
>> mapping_[12].f90
>> module_read_[12].f90
>> parens_5.f90
>> pr57910.f90
>> proc_ptr_comp_16.f90
>> result_in_spec_2.f90
>> spec_expr_7.f90
>> string_length_1.f90
>> transfer_intrinsic_3.f90
>> widechar_6.f90
>> zero_length_1.f90
>>
>> Note that I did not run lldb on all of them, thus I cannot guarantee that all fail along the same pattern.
>>
>> Cheers,
>>
>> Dominique
>>
>
>
>
> --
> Janne Blomqvist
More information about the Gcc-patches
mailing list