summaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog.fortran-dev
blob: 9109ddfcd87123f68fb4ec26f4c49e54d8c8c9f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
2016-20-10  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_conv_expr_descriptor): Detect class object
	with an abstract declared type. Use the type of the data field
	and the dynamic element length from the symbol backend_decl.
	* trans-decl.c (gfc_trans_deferred_vars): Initialize the
	descriptor of allocatable class arrays..

2016-09-10  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_alloc_allocatable_for_assignment): Put
	calculation of element length before setting of extent and sm
	so that the element length field is set, ready for this.
	* trans-intrinsic.c (conv_isocbinding_subroutine): Set the elem
	len field of the descriptor.
	* trans-stmt.c (gfc_conv_intrinsic_size): The one that is
	subtracted from arg_2 has to be an integer_type.

2016-09-07  Paul Thomas  <pault@gcc.gnu.org>

	* trans-expr.c (gfc_conv_scalar_to_descriptor): Correct error
	in setting 'type'.
	(gfc_conv_intrinsic_to_class): Use the expression typespec for
	unlimited polymorphic classes.
	* trans-intrinsic.c (conv_isocbinding_subroutine): Set the elem
	len field of the descriptor.
	* trans-stmt.c (trans_associate_var): Build a null descriptor
	for the associate name, if the target is unlimited polymorphic,
	and copy the dtype, element length and stride measures to the
	associate name.

2016-09-07  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_build_null_descriptor): Set the element
	length to zero for deferred types.
	(gfc_trans_static_array_pointer): Initialize deferred string
	length to zero.
	(gfc_array_init_size): Restore chunk for calculating the ubound
	of array constructor sources.
	* trans-expr.c (gfc_conv_scalar_to_descriptor): If the type is
	NULL_TREE, set the element length to zero.
	(gfc_trans_pointer_assignment): Copy the element length.
	trans-io.c (gfc_build_io_library_fndecls): Update arguments for
	namelist transfers.
	(transfer_namelist_element): Calculate element length and
	update arguments to transfer calls.

2016-08-30  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_array_init_size): Remove argument 'ts'.
	Use the 'expr' typespec instead.
	(gfc_array_allocate): Remove the typespec argument in the call
	to gfc_array_init_size.
	* trans-expr.c (gfc_conv_scalar_to_descriptor): Use the type
	of the scalar to get the element size, rather than that of
	the descriptor.
	(gfc_conv_intrinsic_to_class): Provide the typespec for the
	call to gfc_conv_scalar_to_descriptor.
	(gfc_conv_component_ref): Whitespace.
	(gfc_conv_procedure_call): Provide the typespec as above.
	(gfc_conv_structure): Provide rank for call to
	gfc_conv_initializer.
	(gfc_trans_pointer_assignment): Update the rank field in the
	case of rank remap.
	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Provide the
	typespec for the calls to gfc_conv_scalar_to_descriptor. Change
	call to gfc_get_dtype_rank_type into gfc_get_dtype. Provide
	extra arguments for call to gfc_trans_create_temp_array.
	(conv_caf_send): As previous and eliminate 'tmp2'.
	(gfc_conv_intrinsic_sizeof): Use the elem_len field.

2014-06-14  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_conv_array_parameter): Assign 'old_desc'
	to 'new_desc' rather than some of the components.

2014-06-03  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_conv_expr_descriptor): Use the type of the
	expression for the type of the array. The element length should
	be set initially to the descriptor element type so that the
	stride measure is calculated correctly.
	* trans-stmt.c (gfc_conv_elemental_dependencies): Use the type
	of the elements of the descriptor for 'temptype'. Change the
	comment accordingly.

2014-05-22  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c (gfc_conv_descriptor_stride_get,
	gfc_conv_descriptor_stride_get): Only use 'elem_len' field for
	element size.
	* trans-stmt.c (trans_associate_var): Eliminate redundant
	declaration of 'desc'. Use 'sm' and 'elem_len' fields directly
	to calculate offset.

2013-06-05  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (gfc_array_init_size): Remove superfluous
	"ts" argument due to trunk merging.
	(gfc_array_allocate): Pass only one ts.

2013-05-07  Tobias Burnus  <burnus@net-b.de>

	* trans-intrinsic.c (gfc_conv_intrinsic_bound,
	gfc_conv_intrinsic_size): Set argse.data_not_needed.

2013-05-07  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (gfc_conv_descriptor_stride_get,
	gfc_conv_descriptor_stride_set): Use elem_len, unless it is
	a nonstring intrinsic type for which size_in_bytes is used.
	(gfc_array_init_size): Set elem_len before handling the
	strides.
	* trans-expr.c (gfc_conv_subref_array_arg): Remove no-op
	extent shifting code.

2013-05-06  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (gfc_conv_ss_startstride, set_loop_bounds): Handle
	GFC_ISYM_SHAPE in the scalarizer.
	(gfc_array_init_size, gfc_conv_expr_descriptor): Ensure that
	extent is never negative except for assumed size arrays.
	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Optimizations
	of the bounds handling.
	(gfc_conv_intrinsic_size): Handle SIZE and SHAPE directly without
	calling the library.
	(gfc_conv_intrinsic_function, gfc_add_intrinsic_ss_code,
	gfc_walk_intrinsic_bound, gfc_is_intrinsic_libcall,
	gfc_walk_intrinsic_function): Handle SHAPE.

2013-04-30  Tobias Burnus  <burnus@net-b.de>

	* libgfortran.h (GFC_TYPE_MASK, GFC_TYPE_KIND_SHIFT,
	GFC_TYPE_INTEGER, GFC_TYPE_LOGICAL, GFC_TYPE_REAL, GFC_TYPE_COMPLEX,
	GFC_TYPE_CHARACTER, GFC_TYPE_STRUCT, GFC_TYPE_CPTR, GFC_TYPE_CFUNPTR,
	GFC_TYPE_OTHER): New.
	(GFC_DTYPE_TYPE_SHIFT, GFC_DTYPE_TYPE_MASK, GFC_DTYPE_SIZE_SHIFT):
	Remove.
	(bt): Reorder.
	* trans-array.c (OFFSET_FIELD, ATTR_FIELD): Change value (swap order).
	(gfc_conv_descriptor_rank_set, gfc_conv_descriptor_attr_set,
	gfc_build_null_descriptor): Change data type.
	(gfc_trans_create_temp_array): Add ts and strlen arguments.
	(gfc_trans_array_constructor_subarray, trans_array_constructor,
	gfc_alloc_allocatable_for_assignment): Update call.
	(gfc_conv_loop_setup, gfc_array_init_size): Ditto; add ts argument.
	(gfc_array_allocate, gfc_conv_array_initializer,
	gfc_conv_expr_descriptor): Update calls.
	(gfc_conv_expr_descriptor): Properly set the elem_len.
	(structure_alloc_comps, gfc_trans_deferred_array): Update
	get_dtype call.
	* trans-array.h (gfc_trans_create_temp_array, gfc_conv_loop_setup,
	gfc_build_null_descriptor): Update prototype.
	* trans-decl.c (gfc_trans_deferred_vars, gfc_trans_deferred_vars):
	Update calls.
	* trans-expr.c (gfc_conv_scalar_to_descriptor,
	realloc_lhs_loop_for_fcn_call): Take ts argument.
	(gfc_conv_class_to_class, gfc_conv_subref_array_arg,
	gfc_conv_procedure_call, gfc_conv_procedure_call,
	gfc_conv_initializer, gfc_trans_subarray_assign,
	gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign,
	gfc_trans_assignment_1): Update calls.
	* trans-intrinsic.c (trans_this_image): Change to extent.
	(gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
	gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
	gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
	gfc_conv_intrinsic_transfer, conv_isocbinding_subroutine): Update
	calls.
	* trans-io.c (transfer_namelist_element, transfer_array_component,
	gfc_trans_transfer): Update calls.
	* trans-stmt.c (gfc_conv_elemental_dependencies, gfc_trans_call,
	trans_associate_var, generate_loop_for_temp_to_lhs,
	generate_loop_for_rhs_to_temp, compute_inner_temp_size,
	gfc_trans_pointer_assign_need_temp, gfc_evaluate_where_mask,
	gfc_trans_where_assign, gfc_copy_loopinfo_to_se): Ditto.
	* trans-types.c (gfc_init_types, gfc_get_dtype): Update dtype
	handling.
	(gfc_get_array_descriptor_base): Change data types of the
	descriptor.
	(struct gfc_array_descriptor): Update comment.
	* trans-types.h (gfc_get_dtype): Update prototype.
	* trans.c (gfc_build_final_call): Update calls.

2013-04-30  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (gfc_trans_dummy_array_bias, get_std_lbound,
	gfc_alloc_allocatable_for_assignment): Change ubound to extent.
	* trans-expr.c (gfc_trans_alloc_subarray_assign): Ditto.
	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Ditto.

2013-04-25  Tobias Burnus  <burnus@net-b.de>

	* libgfortran.h (GFC_ATTRIBUTE_*): New defines.
	* trans-array.c (gfc_conv_descriptor_elem_len,
	gfc_conv_descriptor_elem_len_get,
	gfc_conv_descriptor_elem_len_set, gfc_conv_descriptor_rank_set,
	gfc_conv_descriptor_version_set, gfc_conv_descriptor_attr_set):
	New functions.
	(gfc_build_null_descriptor, gfc_trans_static_array_pointer,
	gfc_trans_create_temp_array, gfc_conv_array_initializer,
	gfc_conv_expr_descriptor, structure_alloc_comps): Fill new fields at
	decl time/DT-alloc time.
	(gfc_conv_descriptor_size_1, get_full_array_size,
	gfc_alloc_allocatable_for_assignment): Use extent directly.
	* trans-array.h (gfc_conv_descriptor_elem_len_get,
	gfc_conv_descriptor_elem_len_set, gfc_conv_descriptor_rank_set,
	gfc_conv_descriptor_version_set, gfc_conv_descriptor_attr_set): New
	prototype.
	* trans-common.c (create_common): Update calls.
	* trans-decl.c (gfc_get_symbol_decl, get_proc_pointer_decl,
	gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Ditto.
	* trans-expr.c (gfc_conv_scalar_to_descriptor,
	class_array_data_assign, gfc_conv_derived_to_class,
	gfc_conv_class_to_class, gfc_conv_initializer,
	gfc_trans_pointer_assignment, fcncall_realloc_result): Set new fields.
	(gfc_conv_structure): Update calls.
	(gfc_set_interface_mapping_bounds,
	gfc_conv_subref_array_arg): Use extent directly.
	* trans-intrinsic.c (size_of_string_in_bytes): Remove static.
	* trans-io.c (transfer_namelist_element): Pass elem_size.
	* trans-types.c (gfc_get_array_descriptor_base): Add "attribute" field.
	* trans.h (size_of_string_in_bytes): New prototype.
	(gfc_get_module_backend_decl): Update prototype.

2013-04-01  Tobias Burnus  <burnus@net-b.de>

	* libgfortran.h (GFC_MAX_DIMENSIONS): Change to 15.
	(GFC_DTYPE_RANK_MASK): Remove.
	* trans-array.c (RANK_FIELD): New define.
	(gfc_conv_descriptor_rank): Use rank field.
	(gfc_trans_create_temp_array, gfc_array_init_size,
	gfc_conv_expr_descriptor,
	gfc_alloc_allocatable_for_assignment): Set rank field.
	* trans-expr.c (gfc_conv_scalar_to_descriptor,
	class_array_data_assign, gfc_conv_derived_to_class,
	gfc_conv_class_to_class, gfc_trans_pointer_assignment,
	fcncall_realloc_result): Ditto.
	* trans-intrinsic.c (conv_isocbinding_subroutine): Ditto.
	* trans-io.c (gfc_build_io_library_fndecls,
	transfer_namelist_element): Pass rank as extra argument.
	* trans-types.c (gfc_get_element_type, gfc_get_dtype): Don't
	add the rank to dtype.
	(gfc_get_array_descriptor_base): New "rank" field.

2013-03-31  Tobias Burnus  <burnus@net-b.de>

	* trans-intrinsic.c (conv_isocbinding_subroutine): Fix
	merge-resolution bug.

2013-03-31  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (VERSION_FIELD): New define.
	(ELEM_LEN_FIELD): Renamed from SIZE_FIELD, reordered the fields.
	(gfc_build_null_descriptor): Also set version field (to 1).
	* trans-types.c (gfc_get_array_descriptor_base): Rename "size" to
	"elem_len" and move up, add "version" field.

2012-07-20  Tobias Burnus  <burnus@net-b.de>

	* trans-expr.c (conv_isocbinding_procedure): For C_F_Pointer,
	directly set extent and sm instead of using ubound and stride.

2012-07-15  Tobias Burnus  <burnus@net-b.de>

	* trans-intrinsic.c (gfc_conv_intrinsic_size,
	gfc_conv_intrinsic_sizeof): Replace (ubound-lbound+1) calculation
	by "extent".
	* trans-expr.c (fcncall_realloc_result): Ditto.
	* trans-io.c (gfc_convert_array_to_string): Ditto.
	* trans-openmp.c (gfc_omp_clause_default_ctor,
	gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
	gfc_trans_omp_array_reduction): Ditto.
	* trans-array.c (array_parameter_size): Ditto.
	(gfc_grow_array): Ditto - and fix size calculation for realloc.

2012-07-15  Tobias Burnus  <burnus@net-b.de>

	* trans-intrinsic.c (gfc_conv_associated): Compare sm
	instead of stride.

2012-03-12  Tobias Burnus  <burnus@net-b.de>

	* trans-types.c (gfc_get_array_descriptor_base): Rename "data"
	to "base_addr".

2012-03-11  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (UBOUND_SUBFIELD, STRIDE_SUBFIELD): Remove.
	(LBOUND_SUBFIELD, EXTENT_SUBFIELD, SM_SUBFIELD): Change value.
	(gfc_conv_descriptor_stride): Remove.
	(gfc_conv_descriptor_stride_set): Only set "sm".
	(gfc_conv_descriptor_ubound): Remove.
	(gfc_conv_descriptor_ubound_set): Only set "extent"
	(gfc_conv_shift_descriptor_lbound): Remove ubound-setting call.
	(gfc_conv_array_sm, gfc_conv_array_extent): New functions.
	* trans-array.h (gfc_conv_array_sm, gfc_conv_array_extent): New
	prototypes.
	* trans-types.c (gfc_get_desc_dim_type): Remove stride/ubound,
	rename and reorder according to TS29113.
	* trans-io.h (transfer_namelist_element): Pass extent/sm instead
	of ubound/stride.

2012-03-10  Tobias Burnus  <burnus@net-b.de>

	* trans-array.c (CAF_TOKEN_FIELD): Set to the correct value.
	(gfc_conv_descriptor_ubound_get, gfc_conv_descriptor_ubound_set):
	Remove bogus byte-size handling, correctly handle lower bounds
	which don't start with unity.
	(gfc_conv_shift_descriptor_lbound): Reorder to make sure that
	lbound comes before ubound.
	* trans-expr.c (gfc_conv_subref_array_arg,
	gfc_trans_alloc_subarray_assign): Ditto.

2010-09-01  Paul Thomas  <pault@gcc.gnu.org>

	* trans-array.c : Define and subsequently undefine descriptor
	SIZE_FIELD, SM_SUBFIELD and EXTENT_SUBFIELD. Change the offset
	for DIMENSION_FIELD.
	(gfc_data_field_from_base_field): New function.
	(gfc_conv_descriptor_data_addr): Call it to maintain API.
	(gfc_dimension_field_from_base_field): New function.
	(gfc_conv_descriptor_dimension): Call it.
	(gfc_conv_descriptor_stride_get): Compute the stride from the
	'sm' field.
	(gfc_conv_descriptor_stride_set): Compute and set 'sm' field.
	(gfc_conv_descriptor_sm, gfc_conv_descriptor_sm_get,
	gfc_conv_descriptor_sm_set): New functions.
	(gfc_conv_descriptor_extent, gfc_conv_descriptor_extent_get,
	gfc_conv_descriptor_extent_set): New functions.
	(gfc_conv_descriptor_ubound_get): Compute the ubound from the
	'extent' field.
	(gfc_conv_descriptor_ubound_set): Compute and set 'extent'
	field.
	trans-array.h: New prototypes for gfc_conv_descriptor_sm_get,
	gfc_conv_descriptor_extent_get, gfc_data_field_from_base_field,
	gfc_dimension_field_from_base_field,gfc_conv_descriptor_sm_set,
	and gfc_conv_descriptor_extent_set.
	trans-types.c (gfc_get_desc_dim_type): Add 'sm' and 'extent'
	fields.
	(gfc_get_array_descriptor_base): Add 'size' field.
	(gfc_get_array_descr_info): Call gfc_data_field_from_base_field
	and gfc_dimension_field_from_base_field instead of using the
	field offsets explicitly.