]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
PR 78534 Change character length from int to size_t
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2017-01-03 Janne Blomqvist <jb@gcc.gnu.org>
2
3 PR fortran/78534
4 PR fortran/66310
5 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
6 hardcoded kind.
7 (find_intrinsic_vtab): Likewise.
8 * expr.c (gfc_get_character_expr): Length parameter of type
9 gfc_charlen_t.
10 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
11 (gfc_extract_hwi): New function.
12 (simplify_const_ref): Make string_len of type gfc_charlen_t.
13 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
14 * gfortran.h (gfc_mpz_get_hwi): New prototype.
15 (gfc_mpz_set_hwi): Likewise.
16 (gfc_charlen_t): New typedef.
17 (gfc_expr): Use gfc_charlen_t for character lengths.
18 (gfc_size_kind): New extern variable.
19 (gfc_extract_hwi): New prototype.
20 (gfc_get_character_expr): Use gfc_charlen_t for character length.
21 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
22 * iresolve.c (gfc_resolve_repeat): Pass string length directly without
23 temporary, use gfc_charlen_int_kind.
24 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
25 * misc.c (gfc_mpz_get_hwi): New function.
26 (gfc_mpz_set_hwi): New function.
27 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
28 (parse_integer): Don't complain about large integers.
29 (write_atom): Use HOST_WIDE_INT for integers.
30 (mio_integer): Handle integer type mismatch.
31 (mio_hwi): New function.
32 (mio_intrinsic_op): Use HOST_WIDE_INT.
33 (mio_array_ref): Likewise.
34 (mio_expr): Likewise.
35 * resolve.c (resolve_select_type): Use HOST_WIDE_INT for charlen,
36 use snprintf.
37 (resolve_charlen): Use mpz_sgn to determine sign.
38 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
39 instead of long.
40 * target-memory.c (size_character): Length argument of type
41 gfc_charlen_t.
42 (gfc_encode_character): Likewise.
43 (gfc_interpret_character): Use gfc_charlen_t.
44 * target-memory.h (gfc_encode_character): Modify prototype.
45 * trans-array.c (get_array_ctor_var_strlen): Use
46 gfc_conv_mpz_to_tree_type.
47 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
48 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
49 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
50 gfc_charlen_type_node.
51 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
52 4, fold_convert to correct type.
53 (gfc_conv_class_to_class): Build const of type size_type_node for
54 size.
55 (gfc_copy_class_to_class): Likewise.
56 (gfc_conv_string_length): Use same type in expression.
57 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
58 (gfc_conv_string_tmp): Make sure len is of the right type.
59 (gfc_conv_concat_op): Use same type in expression.
60 (gfc_conv_procedure_call): Likewise.
61 (alloc_scalar_allocatable_for_subcomponent_assignment):
62 fold_convert to right type.
63 (gfc_trans_subcomponent_assign): Likewise.
64 (trans_class_vptr_len_assignment): Build const of correct type.
65 (gfc_trans_pointer_assignment): Likewise.
66 (alloc_scalar_allocatable_for_assignment): fold_convert to right
67 type in expr.
68 (trans_class_assignment): Build const of correct type.
69 * trans-intrinsic.c (gfc_conv_associated): Likewise.
70 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
71 * trans-io.c (gfc_build_io_library_fndecls): Use
72 gfc_charlen_type_node for character lengths.
73 * trans-stmt.c (gfc_trans_label_assign): Build const of
74 gfc_charlen_type_node.
75 (gfc_trans_character_select): Likewise.
76 (gfc_trans_allocate): Likewise, don't typecast strlen result.
77 (gfc_trans_deallocate): Don't typecast strlen result.
78 * trans-types.c (gfc_size_kind): New variable.
79 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
80 from size_type_node.
81
82 2017-01-02 Janne Blomqvist <jb@gcc.gnu.org>
83
84 PR fortran/78534
85 * trans-expr.c (gfc_trans_string_copy): Rework string copy
86 algorithm to avoid -Wstringop-overflow warning.
87
88 2017-01-01 Jakub Jelinek <jakub@redhat.com>
89
90 Update copyright years.
91
92 * gfortranspec.c (lang_specific_driver): Update copyright notice
93 dates.
94 * gfc-internals.texi: Bump @copying's copyright year.
95 * gfortran.texi: Ditto.
96 * intrinsic.texi: Ditto.
97 * invoke.texi: Ditto.
98 \f
99 Copyright (C) 2017 Free Software Foundation, Inc.
100
101 Copying and distribution of this file, with or without modification,
102 are permitted in any medium without royalty provided the copyright
103 notice and this notice are preserved.