1 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
3 * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
4 arguments to elemental calls.
5 * trans-stmt.c (replace_ss): New function.
6 (gfc_conv_elemental_dependencies): Remove temporary loop handling.
7 Create a new ss for the temporary and replace the original one with it.
8 Remove fake array references. Recalculate all offsets.
10 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
12 * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
13 * trans-array.c (gfc_free_ss): Remove forward declaration.
15 (set_delta, gfc_set_delta): Remove forward declaration.
16 Make non-static and rename the former to the later. Update uses.
18 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
20 * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
21 * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
22 * dependency.c (gfc_check_argument_var_dependency): Check dependencies
23 of inline intrinsics' arguments.
25 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
27 * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
28 dimension's ss and loop. Use them.
30 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
32 * trans-array.c (outermost_loop): New function.
33 (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
34 gfc_add_loop_ss_code): Put generated code out of the outermost loop.
36 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
38 * trans-array.c (constant_array_constructor_loop_size):
39 Handle multiple loops.
41 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
43 * trans-array.c (get_rank, get_loop_upper_bound_for_array):
45 (gfc_trans_array_constructor): Handle multiple loops.
47 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
49 * trans.h (struct gfc_loopinfo): New field parent.
50 * trans-array.c (gfc_cleanup_loop): Free nested loops.
51 (gfc_add_ss_to_loop): Set nested_loop's parent loop.
52 (gfc_trans_array_constructor): Update assertion.
53 (gfc_conv_loop_setup): Ditto.
55 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
57 * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
58 Call recursively gfc_add_loop_ss_code for all the nested loops.
59 (gfc_conv_ss_startstride): Only get the descriptor for the outermost
60 ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
61 (set_loop_bounds): Call recursively for all the nested loops.
64 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
66 * trans.h (struct gfc_loopinfo): New fields nested and next.
67 * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
68 ss has non-null nested_ss field.
70 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
72 * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
74 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
76 * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
77 Rename the former to the latter and loop over the parents.
78 (innermost_ss): New function.
79 (get_array_ref_dim_for_loop_dim): New function.
80 (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
81 (set_loop_bounds): Use get_array_dim_for_loop_dim).
83 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
85 * trans.h (struct gfc_ss): New field nested_ss.
86 * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
88 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
90 * trans-array.c (set_vector_loop_bounds): Loop over the parents.
92 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
94 * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
96 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
98 * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
101 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
103 * trans.h (struct gfc_ss): New field parent.
104 * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
106 * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
109 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
111 * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
112 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get loop from ss.
113 Update reference to loop. Remove loop argument.
114 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
115 gfc_trans_create_temp_array.
116 * trans-expr.c (gfc_conv_procedure_call): Ditto.
117 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
118 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
119 Set loop before calling gfc_trans_create_temp_array.
121 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
123 * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
124 Set total_dim to loop's rank. Replace usages of loop's rank.
126 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
128 * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
129 Rename the former to the later. Get loop from ss.
130 Remove loop argument.
131 (gfc_add_loop_ss_code): Update call.
133 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
135 * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
136 Remove loop argument.
137 (gfc_add_loop_ss_code): Update call.
139 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
141 * trans.h (struct gfc_ss): New field loop.
142 * trans-array.c (set_ss_loop): New function.
143 (gfc_add_ss_to_loop): Call set_ss_loop.
145 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
147 * trans.h (struct gfc_ss_info): New field refcount.
148 * trans-array.c (free_ss_info): Decrement refcount. Return early if
150 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
153 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
155 * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
156 out of the containing loop.
158 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
160 * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
161 Move specloop arrays clearing from the former to the latter.
163 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
165 * trans-array.c (set_loop_bounds): Separate the beginning of
166 gfc_conv_loop_setup into a function of its own.
167 (set_delta): Separate the end of gfc_conv_loop_setup into a function
169 (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
170 (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
171 pointer to the specloop field from the loop struct.
173 2011-11-03 Tobias Burnus <burnus@net-b.de>
176 * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
178 2011-11-03 Tobias Burnus <burnus@net-b.de>
181 * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
183 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
185 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
186 gfc_ss::where into gfc_ss_info.
187 * trans-array.c (gfc_add_loop_ss_code):
188 Update reference chains.
189 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
191 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
193 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
194 gfc_ss::useflags into gfc_ss_info.
195 * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
196 gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
197 Update reference chains.
198 * trans-expr.c (gfc_conv_procedure_call): Ditto.
199 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
201 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
203 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
204 gfc_ss::data::info into gfc_ss_info::data and remove empty union
206 * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
207 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
208 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
209 gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
210 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
211 add_array_offset, gfc_trans_preloop_setup,
212 gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
213 gfc_conv_ss_startstride, gfc_could_be_alias,
214 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
215 gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
216 Update reference chains and factor them where possible.
217 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
218 gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
220 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
221 * trans-io.c (transfer_array_component): Ditto.
222 * trans-stmt.c (gfc_conv_elemental_dependencies,
223 gfc_trans_pointer_assign_need_temp): Ditto.
225 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
227 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
228 gfc_ss::data::temp into gfc_ss_info::data.
229 * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
232 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
234 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
235 gfc_ss::data::scalar into newly created union gfc_ss_info::data,
236 and rename subfield expr to value.
237 * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
238 gfc_conv_expr_descriptor): Update reference chains.
239 * trans-const.c (gfc_conv_constant): Ditto.
240 * trans-expr.c (gfc_conv_expr): Ditto.
242 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
244 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
245 string_length from the former struct to the latter.
247 (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
248 gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
249 gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
250 gfc_conv_expr_descriptor): Update references to string_length and
251 factor common reference chains where possible.
252 * trans-const.c (gfc_conv_constant): Ditto.
253 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
254 gfc_conv_expr): Ditto.
256 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
258 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
259 the former struct to the latter.
261 (gfc_get_array_ss, gfc_get_scalar_ss,
262 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
263 gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
264 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
265 gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
266 gfc_could_be_alias, gfc_conv_resolve_dependencies,
267 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
268 gfc_alloc_allocatable_for_assignment): Update references to expr and
269 factor common reference chains where possible.
270 * trans-const.c (gfc_conv_constant): Ditto.
271 * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
272 gfc_conv_array_constructor_expr, gfc_conv_expr,
273 gfc_conv_expr_reference): Ditto.
274 * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
275 gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
276 gfc_add_intrinsic_ss_code): Ditto.
277 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
279 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
281 * trans.h (struct gfc_ss_info): New struct.
282 (gfc_get_ss_info): New macro.
283 (struct gfc_ss): Move type field to struct gfc_ss_info.
284 Add an info field of type gfc_ss_info.
285 * trans-array.c (free_ss_info): New function.
286 (gfc_free_ss): Call free_ss_info.
287 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
288 Allocate gfc_ss_info field.
289 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
290 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
291 gfc_conv_array_index_offset, gfc_trans_preloop_setup,
292 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
293 gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
294 gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
295 gfc_walk_elemental_function_args): Update references to type.
296 * trans-const.c (gfc_conv_constant): Factor common reference chains
297 and update reference to type.
298 * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
299 Update reference to type.
300 (gfc_conv_array_constructor_expr, gfc_conv_expr,
301 gfc_conv_expr_reference): Ditto. Factor common reference chains.
302 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
304 * trans-stmt.c (gfc_trans_where_assign): Ditto.
306 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
308 * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
309 from the former struct to the latter.
310 * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
311 Update field references.
312 * trans-expr.c (gfc_trans_subarray_assign): Update field references
313 and factor common reference chains.
314 * trans-io.c (transfer_array_component): Ditto.
316 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
318 * trans.h (struct gfc_array_info): Move dim and dimen fields...
319 (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field.
320 * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
322 (gfc_get_temp_ss): Initialize dim and dimen.
323 (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
324 gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
325 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
326 gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
327 gfc_trans_preloop_setup, gfc_conv_ss_startstride,
328 gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
329 gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
330 gfc_walk_array_ref): Update field references.
331 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
333 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
334 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
336 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
338 * trans.h (struct gfc_ss_info, struct gfc_array_info):
339 Rename the former to the latter.
340 * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
341 get_array_ref_dim, gfc_trans_create_temp_array,
342 gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
343 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
344 add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
345 gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
346 gfc_conv_expr_descriptor): Update all uses.
347 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
349 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
350 walk_inline_intrinsic_transpose): Ditto.
351 * trans-stmt.c (gfc_conv_elemental_dependencies,
352 gfc_trans_pointer_assign_need_temp): Ditto.
354 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
356 * trans-array.c (dim_ok, transposed_dims): Rename the former to the
357 latter. Change argument type. Invert return value.
358 (gfc_conv_expr_descriptor): Update calls.
360 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
362 * trans-array.c (get_array_ref_dim): Change argument type and name.
363 Obtain previous argument from the new argument in the body.
364 (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
366 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
368 * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
369 Rename the former to the latter. Change type and name of argument.
370 Get previous argument from the new one.
371 (gfc_add_loop_ss_code): Update call.
373 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
375 * trans-array.h (gfc_trans_create_temp_array): Replace info argument
377 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
378 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
379 gfc_trans_create_temp_array.
380 * trans-expr.c (gfc_conv_procedure_call): Ditto.
381 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
382 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
384 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
386 * trans-array.c (gfc_trans_array_bound_check): Use ss argument
389 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
391 * trans-array.c (gfc_trans_array_bound_check,
392 trans_array_bound_check): Rename the former to the latter.
393 Replace descriptor argument with ss argument. Get descriptor from ss.
394 (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
395 former to the latter. Update call to trans_array_bound_check.
396 Replace info argument with ss argument. Get info from ss.
397 (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
398 (add_array_offset): Ditto
400 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
402 * trans-array.c (gfc_trans_constant_array_constructor,
403 trans_constant_array_constructor): Rename the former to the latter.
404 Don't set the rank of the temporary for the loop. Remove then unused
406 (gfc_trans_array_constructor): Update call.
408 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
410 * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
411 marker, not after it.
413 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
415 * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
417 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
419 * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
420 array dimensions instead of loop dimensions.
422 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
424 * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
426 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
428 * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
430 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
432 * trans-array.c (get_array_ref_dim): Remove redundant condition.
434 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
436 * trans-array.c (gfc_trans_preloop_setup): Move common code...
437 (add_array_offset): ...into that new function.
439 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
441 * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
442 of array's dimention. Check that it is indeed the same.
444 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
446 * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
447 Special case outermost loop.
449 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
451 * trans-array.c (gfc_trans_preloop_setup): Factor loop index
454 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
456 * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
458 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
460 * trans-array.c (gfc_trans_preloop_setup): Move array reference
461 initialisation earlier. Factor subsequent array references.
463 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
465 * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
467 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
470 * check.c (gfc_check_dshift): Update argument checking for BOZ.
471 Update checking SHIFT against BITSIZE of I or J.
472 * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
474 2011-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
476 * check.c (gfc_check_atan_2): Typo in comment.
477 (gfc_check_nearest): If 's' is constant, check that it is not 0.
478 * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
479 gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
480 gfc_simplify_nearest): Remove dead code.
482 2011-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
484 * simplify.c (simplify_transformation_to_array): Fix memory leak.
486 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
489 * check.c (gfc_check_ishftc): Check args are constant before
490 extracting the integer.
492 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
495 * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
496 (gfc_check_ishftc): Check |shift| <= bit_size(i) and check
497 that size is positive.
499 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
502 * resolve.c (resolve_ref): Check return value of resolve_substring().
504 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
506 * io.c (match_dt_format): Match a user-defined operator or a kind
507 type prefixed string.
509 2011-10-19 Janus Weil <janus@gcc.gnu.org>
512 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
513 * intrinsinc.texi (SIZEOF): Document it.
514 (STORAGE_SIZE): Fix special characters. Fix line breaks.
516 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
519 * trans.c (gfc_build_array_ref): If type is not an array, check that
520 there is nothing to do, and do nothing.
522 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
525 * trans-types.c (gfc_build_array_type): Don't force lower bound to one
526 in the deferred case.
528 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
531 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
532 Don't set already set array ref.
534 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
536 * array.c (gfc_find_array_ref): Remove coarray-specific handling.
538 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
541 * check.c (dim_corank_check): Use gfc_get_corank to get corank.
543 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
546 * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
549 * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
550 the scalarization chain initialization.
552 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
555 * trans-intrinsic.c (walk_coarray): Allow subreferences after a
556 coarray object reference.
558 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
561 * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
562 if they are coarrays.
564 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
566 * trans-array.h (gfc_walk_array_ref): New prototype.
567 * trans-array.c (gfc_walk_array_ref): New function, containing
568 all but the beginning of gfc_walk_variable_expr's code.
569 (gfc_walk_variable_expr): Use gfc_walk_array_ref.
571 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
574 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
575 ndim for the descriptor's rank.
577 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
580 * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
581 from zero, and add then the relevant offset (either ndim or loop.dimen)
582 depending on context.
584 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
586 * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
588 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
590 * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
593 2011-10-18 Janus Weil <janus@gcc.gnu.org>
596 * decl.c (verify_c_interop_param): Renamed to
597 'gfc_verify_c_interop_param'. Add error message for polymorphic
599 (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
600 polymorphic variables.
601 (verify_bind_c_sym): Renamed 'verify_c_interop'.
602 * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
603 * check.c (gfc_check_sizeof): Ditto.
604 * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
605 * symbol.c (verify_bind_c_derived_type): Ditto.
607 2011-10-15 Tom Tromey <tromey@redhat.com>
608 Dodji Seketeli <dodji@redhat.com>
610 * cpp.c (print_line, cb_define): Adjust to avoid using internals
611 of struct line_map. Use the public API instead.
613 2011-10-17 Janus Weil <janus@gcc.gnu.org>
617 * primary.c (match_kind_param): Avoid segfault.
619 2011-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
621 * frontend-passes.c (current_ns): Make static.
622 (create_var): Note parent of newly created namespace.
623 (optimize_namespace): Don't wak sibling namespaces
624 if they are EXEC_BLOCK because this is handled...
625 (gfc_code_walker): ... here. Also walk ASSOCIATE lists.
627 2011-10-16 Janus Weil <janus@gcc.gnu.org>
630 * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
631 (get_kind): Pass on 'is_iso_c' flag.
632 (match_integer_constant,match_real_constant,match_logical_constant):
633 Set 'ts.is_c_interop'.
635 2011-10-16 Janus Weil <janus@gcc.gnu.org>
638 * resolve.c (resolve_formal_arglist): Remove unneeded error message.
641 2011-10-15 Tobias Burnus <burnus@net-b.de>
643 * gfortran.texi (Fortran 2008 status, TS 29113 status,
644 Further Interoperability of Fortran with C): Update implementation
645 status, change references from TR 29113 to TS 29113.
646 * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
647 * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
648 * lang.opt (std=): Ditto.
649 * options.c (gfc_handle_option, set_default_std_flags): Ditto and
650 change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
651 * libgfortran.h: Ditto.
652 * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
653 * decl.c (verify_c_interop_param): Ditto.
655 2011-10-14 Janus Weil <janus@gcc.gnu.org>
658 * expr.c (gfc_check_vardef_context): Don't throw an error on
659 non-pointer assignments involving an intent(in) pointer dummy.
661 2011-10-14 Tobias Burnus <burnus@net-b.de>
664 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
665 for dummy arguments with VALUE attribute.
667 2011-10-11 Tobias Burnus <burnus@net-b.de>
668 Janus Weil <janus@gcc.gnu.org>
670 * invoke.texi (-fwhole-file): Update wording since -fwhole-file
671 is now enabled by default.
673 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
675 * trans-expr.c (gfc_conv_power_op): Delete old interface with two
676 parallel arrays to hold standard builtin declarations, and replace
677 it with a function based interface that can support creating
678 builtins on the fly in the future. Change all uses, and poison
679 the old names. Make sure 0 is not a legitimate builtin index.
680 (fill_with_spaces): Ditto.
681 (gfc_trans_string_copy): Ditto.
682 (gfc_trans_zero_assign): Ditto.
683 (gfc_build_memcpy_call): Ditto.
684 (alloc_scalar_allocatable_for_assignment): Ditto.
685 * trans-array.c (gfc_trans_array_constructor_value): Ditto.
686 (duplicate_allocatable): Ditto.
687 (gfc_alloc_allocatable_for_assignment): Ditto.
688 * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
689 (gfc_omp_clause_assign_op): Ditto.
690 (gfc_trans_omp_atomic): Ditto.
691 (gfc_trans_omp_do): Ditto.
692 (gfc_trans_omp_task): Ditto.
693 * trans-stmt.c (gfc_trans_stop): Ditto.
694 (gfc_trans_sync): Ditto.
695 (gfc_trans_allocate): Ditto.
696 (gfc_trans_deallocate): Ditto.
697 * trans.c (gfc_call_malloc): Ditto.
698 (gfc_allocate_using_malloc): Ditto.
699 (gfc_call_free): Ditto.
700 (gfc_deallocate_with_status): Ditto.
701 (gfc_deallocate_scalar_with_status): Ditto.
702 * f95-lang.c (gfc_define_builtin): Ditto.
703 (gfc_init_builtin_functions): Ditto.
704 * trans-decl.c (create_main_function): Ditto.
705 * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
707 2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
710 * frontend-passes (forall_level): New variable.
711 (cfe_register_funcs): Don't register functions if we
712 are within a forall loop.
713 (optimize_namespace): Set forall_level to 0 before entry.
714 (gfc_code_walker): Increase/decrease forall_level.
716 2011-10-09 Tobias Burnus <burnus@net-b.de>
719 * trans-common.c (translate_common): Fix -Walign-commons check.
721 2011-10-09 Mikael Morin <mikael.morin@sfr.fr>
723 * interface.c (check_dummy_characteristics): Count dimensions starting
724 from one in diagnostic.
726 2011-10-09 Tobias Burnus <burnus@net-b.de>
728 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
729 dependency on iso-c-binding.def and iso-fortran-env.def.
730 * module.c (import_iso_c_binding_module): Add error when
731 explicitly importing a nonstandard symbol; extend standard-
733 * iso-c-binding.def: Add c_float128 and c_float128_complex
734 integer parameters (for -std=gnu).
735 * intrinsic.texi (ISO_C_Binding): Document them.
736 * symbol.c (generate_isocbinding_symbol): Change macros
737 to ignore GFC_STD_* data.
738 * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
739 nonstatic and renamed from "init_c_interop_kinds".
740 (gfc_init_kinds): Don't call it
741 * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
742 * f95-lang.c (gfc_init_decl_processing): Call it.
744 2011-10-09 Janus Weil <janus@gcc.gnu.org>
747 * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
749 2011-10-08 Paul Thomas <pault@gcc.gnu.org>
752 * trans-array.c (gfc_conv_array_index_offset): Use descriptor
753 stride for pointer function results.
755 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
757 * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
759 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
761 * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
763 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
765 * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
766 Remove conditions on coarray.
767 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
768 (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
770 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
772 * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
773 argument. Remove condition on coarray_last.
774 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
775 (gfc_conv_expr_descriptor): Ditto.
777 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
779 * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
780 handling. Don't reset array ref's corank and codimensions' types
781 in the full array ref case. Update loop upper limit.
782 Remove DIMEN_THIS_IMAGE case. Remove unnecessary conditions.
784 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
786 * trans.h (gfc_ss_info): Remove codimen field.
787 * trans-array.c (gfc_get_array_ss): Don't set codimen field.
788 (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
789 (gfc_trans_constant_array_constructor): Update loop upper limit.
790 (gfc_conv_ss_startstride): Don't set codimen field.
791 Don't get descriptor's cobounds.
792 (gfc_walk_variable_expr): Update dimension index.
793 * trans-intrinsic.c (trans_this_image, trans_image_index,
794 conv_intrinsic_cobound): Don't set codimen field
796 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
798 * trans.h (gfc_loopinfo): Remove codimen field.
799 * trans-array.c (gfc_set_vector_loop_bounds,
800 gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
802 (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
804 (gfc_start_scalarized_body): Update loop lower limit.
805 (gfc_conv_ss_startstride): Don't set loop's codimen field.
806 (gfc_conv_loop_setup): Remove unnecessary condition.
807 (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
809 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
811 * trans.h (gfc_ss): Remove data.temp.codimen field.
812 * trans-array.c (gfc_conv_resolve_dependencies,
813 gfc_conv_expr_descriptor): Don't set temp's codimen field.
815 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
817 * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
818 associated dimen_type) in the full array ref case.
820 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
822 * trans-intrinsic.c (walk_coarray): New function.
823 (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
824 (trans-this_image, trans_image_index, conv_intrinsic_cobound):
827 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
829 * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
832 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
834 * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
836 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
838 * trans-array.c (gfc_conv_section_startstride): Move code to
839 evaluate_bound. Use evaluate_bound.
840 (evaluate_bound): New function.
842 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
844 * trans-array.c (gfc_conv_section_startstride): Update assertion to
845 also accept coarrays.
847 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
849 * trans-array.c (gfc_conv_section_startstride): Factor common
850 array ref references.
852 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
854 * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
855 loop.codimen as argument to gfc_get_array_type_bounds.
857 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
859 * trans-array.h (struct gfc_se): New flag want_coarray.
860 * trans-intrinsic.c (trans_this_image, trans_image_index,
861 conv_intrinsic_cobound): Set want_coarray.
862 * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
863 earlier and without relying on the scalarizer.
865 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
867 * expr.c (gfc_get_corank): Return 0 if input expression is not a
870 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
872 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
873 descriptor setup code.
875 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
877 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
879 (resolve_array_ref): ... here.
881 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
883 * check.c (is_coarray): Remove.
884 (coarray_check): Use gfc_is_coarray.
886 2011-10-07 Janus Weil <janus@gcc.gnu.org>
889 * class.c (gfc_build_class_symbol): Fix whitespace.
890 * module.c (mio_symbol): Set 'class_ok' attribute.
891 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
892 been built for class symbols.
894 2011-10-04 Janus Weil <janus@gcc.gnu.org>
897 * interface.c (check_dummy_characteristics): Check the array shape.
899 2011-10-01 Janus Weil <janus@gcc.gnu.org>
902 * interface.c (get_expr_storage_size): Check if 'length' component is
905 2011-09-29 Janus Weil <janus@gcc.gnu.org>
908 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
912 * symbol.c (check_conflict): Forbid TARGET attribute for statement
915 2011-09-27 Jakub Jelinek <jakub@redhat.com>
917 * trans-types.c (gfc_type_for_size): Return wider type
918 if no suitable narrower type has been found.
919 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
920 returned type doesn't have expected TYPE_MODE.
922 2011-09-26 Janus Weil <janus@gcc.gnu.org>
925 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
928 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
930 2011-09-22 Janus Weil <janus@gcc.gnu.org>
933 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
935 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
936 for PURE and ELEMENTAL attributes.
937 (compare_actual_formal): Remove pureness check here.
939 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
941 * check.c (gfc_check_c_sizeof): Remove redundant word.
943 2011-09-20 Simon Baldwin <simonb@google.com>
945 * module.c (gfc_dump_module): Omit timestamp from output.
947 2011-09-17 Janus Weil <janus@gcc.gnu.org>
950 * symbol.c (gfc_use_derived): Fix coding style.
952 2011-09-15 Janus Weil <janus@gcc.gnu.org>
955 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
958 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
960 2011-09-14 Tobias Burnus <burnus@net-b.de>
964 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
965 * resolve.c (resolve_transfer): Reject NULL without MOLD.
966 * interface.c (gfc_procedure_use): Reject NULL without MOLD
967 if no explicit interface is known.
968 (gfc_search_interface): Reject NULL without MOLD if it would
971 2011-09-13 Janus Weil <janus@gcc.gnu.org>
974 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
977 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
980 * frontend-passes.c (dummy_expr_callback): New function.
981 (convert_do_while): New function.
982 (optimize_namespace): Call code walker to convert do while loops.
984 2011-09-11 Janus Weil <janus@gcc.gnu.org>
988 * interface.c (check_dummy_characteristics): New function to check the
989 characteristics of dummy arguments.
990 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
992 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
994 * trans-array.c (gfc_trans_constant_array_constructor): Remove
995 superfluous initialisation of DIM field.
996 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
997 (gfc_conv_expr_descriptor): Ditto.
998 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1000 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1002 * trans-array.h (gfc_get_scalar_ss): New prototype.
1003 * trans-array.c (gfc_get_scalar_ss): New function.
1004 (gfc_walk_variable_expr, gfc_walk_op_expr,
1005 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1006 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1007 (gfc_trans_assignment_1): Ditto.
1008 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1009 gfc_trans_where_3): Ditto.
1011 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1013 * trans-array.h (gfc_get_temp_ss): New prototype.
1014 * trans-array.c (gfc_get_temp_ss): New function.
1015 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1016 (gfc_conv_expr_descriptor): Ditto.
1017 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1019 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1021 * trans-array.h (gfc_get_array_ss): New prototype.
1022 * trans-array.c (gfc_get_array_ss): New function.
1023 (gfc_walk_variable_expr, gfc_walk_function_expr,
1024 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1025 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1026 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1027 gfc_walk_intrinsic_libfunc): Ditto.
1028 * trans-io.c (transfer_array_component): Ditto.
1030 2011-09-08 Tobias Burnus <burnus@net-b.de>
1033 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1034 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1035 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1036 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1037 lock_unlock_statement, sync_statement, gfc_match_allocate,
1038 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1039 (gfc_match_do): Match DO CONCURRENT.
1040 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1041 match_forall_iterator, match_forall_header, match_simple_forall,
1042 gfc_match_forall): Move up in the file.
1043 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1044 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1045 * resolve.c (do_concurrent_flag): New global variable.
1046 (resolve_function, pure_subroutine, resolve_branch,
1047 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1049 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1050 * trans-stmt.c (gfc_trans_do_concurrent): New function.
1051 (gfc_trans_forall_1): Handle do concurrent.
1052 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1053 * trans.c (trans_code): Call it.
1054 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1056 2011-09-07 Janus Weil <janus@gcc.gnu.org>
1059 * primary.c (gfc_match_structure_constructor): Handle parsing of
1060 procedure pointers components in structure constructors.
1061 * resolve.c (resolve_structure_cons): Check interface of procedure
1062 pointer components. Changed wording of some error messages.
1064 2011-09-04 Janus Weil <janus@gcc.gnu.org>
1067 * trans-types.c (gfc_sym_type): Check for proc_name.
1069 2011-08-30 Tobias Burnus <burnus@net-b.de>
1072 * trans-common.c (build_common_decl): Warn if named common
1073 block's size is not everywhere the same.
1075 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1078 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1080 2011-08-29 Janus Weil <janus@gcc.gnu.org>
1083 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1084 allocatable function results.
1086 2011-08-29 Tobias Burnus <burnus@net-b.de>
1088 * trans-decl.c (generate_coarray_sym_init): Use
1089 GFC_CAF_COARRAY_STATIC for static coarrays.
1091 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1093 * scanner.c (load_file): Don't abuse LC_RENAME reason while
1094 (indirectly) calling linemap_add.
1096 2011-08-26 Jakub Jelinek <jakub@redhat.com>
1098 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1100 * symbol.c (check_conflict): Allow threadprivate attribute with
1101 FL_PROCEDURE if proc_pointer.
1103 2011-08-25 Mikael Morin <mikael@gcc.gnu.org>
1106 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1107 (free_expr0): Remove redundant NULL shape check.
1108 * resolve.c (check_host_association): Ditto.
1109 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1111 * trans-io.c (transfer_array_component): Ditto.
1113 2011-08-25 Tobias Burnus <burnus@net-b.de>
1115 * trans-array.c (gfc_conv_descriptor_token): Add assert.
1116 * trans-decl.c (gfc_build_qualified_array,
1117 create_function_arglist): Handle assumed-shape arrays.
1118 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1119 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1120 add "caf_token" to assumed-shape descriptors, new akind argument.
1121 (gfc_get_array_type_bounds): Pass akind.
1122 * trans.h (lang_decl): New elements caf_offset and token.
1123 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1125 2011-08-25 Tobias Burnus <burnus@net-b.de>
1127 * trans-array.c (structure_alloc_comps): Fix for allocatable
1128 scalar coarray components.
1129 * trans-expr.c (gfc_conv_component_ref): Ditto.
1130 * trans-type.c (gfc_get_derived_type): Ditto.
1132 2011-08-24 Tobias Burnus <burnus@net-b.de>
1135 * expr.c (check_init_expr): Return when an error occured.
1137 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1139 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1141 2011-08-23 Tobias Burnus <burnus@net-b.de>
1144 * symbol.c (gfc_add_type): Better diagnostic if redefining
1145 use-associated symbol.
1146 * module.c (gfc_use_module): Use module name as locus.
1148 2011-08-22 Gabriel Charette <gchare@google.com>
1150 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1151 defined in cpp_define_builtins.
1153 2011-08-22 Mikael Morin <mikael@gcc.gnu.org>
1156 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1157 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1158 (free_expr0): Re-use gfc_free_shape.
1159 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1160 * trans-io.c (transfer_array_component): Ditto.
1161 * resolve.c (check_host_association): Ditto.
1162 (gfc_expr_to_initialize): Don't force the rank value and free the shape
1163 after updating the expression. Recalculate shape and rank.
1164 (resolve_where_shape): Re-use gfc_clear_shape.
1165 * array.c (gfc_array_ref_shape): Ditto.
1167 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1170 * expr.c (gfc_check_assign): Check for type conversions when the
1171 right-hand side is a constant REAL/COMPLEX contstant the left-hand
1172 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
1173 for REAL does not change the value of the constant.
1175 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1178 * resolve.c (resolve_array_ref): Don't calculate upper bound
1179 if the stride is zero.
1181 2011-08-20 Janus Weil <janus@gcc.gnu.org>
1184 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1185 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1187 * frontend-passes.c (optimize_comparison): Ditto.
1188 * interface.c (gfc_check_typebound_override): Ditto.
1190 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1193 * parse.c (parse_where): Undo changes after emitting an error.
1195 2011-08-19 Jakub Jelinek <jakub@redhat.com>
1198 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1199 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1200 lhs needs reallocation.
1201 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1202 code is NULL, emit a barrier if workshare emitted no code at all
1203 and NOWAIT clause isn't present.
1205 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1208 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1209 * parse.c (check_statement_label): Accept ST_END_BLOCK and
1210 ST_END_ASSOCIATE as valid branch target.
1211 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1212 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1213 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1214 EXEC_END_NESTED_BLOCK.
1215 (resolve_branch): Ditto.
1216 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1217 * st.c (gfc_free_statement): Ditto.
1218 * trans.c (trans_code): Ditto.
1220 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
1223 * symbol.c (gfc_get_st_label): Use the derived type namespace when
1224 we are parsing a derived type definition.
1226 2011-08-18 Tobias Burnus <burnus@net-b.de>
1229 * parse.c (parse_derived): Add lock_type
1230 checks, improve coarray_comp handling.
1231 * resolve.c (resolve_allocate_expr,
1232 resolve_lock_unlock, resolve_symbol): Fix lock_type
1235 2011-08-17 Tobias Burnus <burnus@net-b.de>
1238 * trans-decl.c (generate_local_decl): Warn about
1239 unused explicitly imported module variables/parameters.
1241 2011-08-17 Janus Weil <janus@gcc.gnu.org>
1244 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1245 in COMMON variables.
1247 2011-08-16 Tobias Burnus <burnus@net-b.de>
1248 Dominique Dhumieres <dominiq@lps.ens.fr>
1251 * resolve.c (resolve_symbol): Fix stupid typo.
1253 2011-08-15 Tobias Burnus <burnus@net-b.de>
1255 * resolve.c (resolve_symbol): Fix coarray result-var check.
1257 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
1259 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
1261 2011-08-14 Janus Weil <janus@gcc.gnu.org>
1264 * decl.c (check_function_name): New function, separated off from
1265 'variable_decl' and slightly extended.
1266 (variable_decl,attr_decl1): Call it.
1268 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1270 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1272 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1273 Thomas Koenig <tkoenig@gcc.gnu.org>
1276 * dependency.c (are_identical_variables): For dummy arguments only
1277 check for equal names, not equal symbols.
1278 * interface.c (gfc_check_typebound_override): Add checking for rank
1279 and character length.
1281 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1284 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
1286 * dependency.c (gfc_are_identical_variables,are_identical_variables):
1287 Renamed the former to the latter and made static.
1288 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
1289 commutativity of multiplication.
1290 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
1291 made static and removed argument 'def'.
1292 (check_section_vs_section): Renamed 'gfc_is_same_range'.
1293 * gfortran.h (gfc_check_typebound_override): New prototype.
1294 * interface.c (gfc_check_typebound_override): Moved here from ...
1295 * resolve.c (check_typebound_override): ... here (and renamed).
1296 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
1298 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1301 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
1303 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
1306 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1309 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
1310 * target-memory.h (gfc_target_interpret_expr): Add boolean
1311 argument wether to convert wide characters.
1312 * target-memory.c (gfc_target_expr_size): Also return length
1313 of characters for non-constant expressions if these can be
1314 determined from the cl.
1315 (interpret_array): Add argument for gfc_target_interpret_expr.
1316 (gfc_interpret_derived): Likewise.
1317 (gfc_target_interpret_expr): Likewise.
1318 * check.c: Include target-memory.h.
1319 (gfc_calculate_transfer_sizes): New function.
1320 (gfc_check_transfer): When -Wsurprising is in force, calculate
1321 sizes and warn if result is larger than size (check moved from
1322 gfc_simplify_transfer).
1323 * simplify.c (gfc_simplify_transfer): Use
1324 gfc_calculate_transfer_sizes. Remove warning.
1326 2011-08-04 Richard Guenther <rguenther@suse.de>
1329 * trans-array.c (add_to_offset): New function.
1330 (gfc_conv_array_ref): Build the array index expression in optimally
1332 (gfc_walk_variable_expr): Adjust for the backward walk.
1334 2011-08-02 Daniel Kraft <d@domob.eu>
1337 * trans-array.c (gfc_trans_auto_array_allocation): Change
1338 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
1340 2011-08-02 Tobias Burnus <burnus@net-b.de>
1342 * trans-array.c (gfc_array_allocate): Pass token to
1343 gfc_allocate_allocatable for -fcoarray=lib.
1344 * trans-stmt.c (gfc_trans_allocate): Update
1345 gfc_allocate_allocatable call.
1346 * trans.h (gfc_allocate_allocatable): Update prototype.
1347 (gfc_allocate_using_lib): Remove.
1348 * trans.c (gfc_allocate_using_lib): Make static, handle token.
1349 (gfc_allocate_allocatable): Ditto.
1351 2011-08-02 Jakub Jelinek <jakub@redhat.com>
1354 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
1355 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
1356 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
1357 (gfc_match_omp_clauses): Handle parsing final and mergeable
1359 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
1360 (gfc_match_omp_taskyield): New function.
1361 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
1362 Cray pointers in clauses other than REDUCTION.
1363 (gfc_match_omp_atomic): Match optional
1364 read/write/update/capture keywords after !$omp atomic.
1365 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1366 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
1367 print final and mergeable clauses.
1368 (show_code_node): Handle EXEC_OMP_TASKYIELD.
1369 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
1371 (gfc_trans_omp_taskyield): New function.
1372 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
1373 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1374 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
1375 (gfc_omp_predetermined_sharing): Adjust comment.
1376 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
1378 (gfc_omp_clauses): Add final_expr and mergeable fields.
1379 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
1380 (gfc_omp_atomic_op): New enum typedef.
1381 (struct gfc_code): Add ext.omp_atomic.
1382 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
1383 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
1384 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
1386 * st.c (gfc_free_statement): Likewise.
1387 * match.h (gfc_match_omp_taskyield): New prototype.
1388 * parse.c (decode_omp_directive): Handle taskyield directive.
1389 Handle !$omp end atomic.
1390 (case_executable): Add ST_OMP_TASKYIELD case.
1391 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
1392 (parse_omp_atomic): Return gfc_statement instead of void.
1393 For !$omp atomic capture parse two assignments instead of
1394 just one and require !$omp end atomic afterwards, for
1395 other !$omp atomic forms just allow !$omp end atomic at the
1397 (parse_omp_structured_block, parse_executable): Adjust
1398 parse_omp_atomic callers.
1400 2011-08-02 Tobias Burnus <burnus@net-b.de>
1402 * intrinsic.c (OMP_LIB): Updated openmp_version's
1404 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
1405 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
1406 remove deleted omp_integer_kind and omp_logical_kind constants.
1408 2011-07-31 Janus Weil <janus@gcc.gnu.org>
1411 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
1412 only call 'resolve_fl_derived0'.
1413 (resolve_typebound_procedures): Resolve typebound procedures of
1415 (resolve_fl_derived0): New function, which does a part of the work
1416 for 'resolve_fl_derived'.
1417 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
1420 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1423 * expr.c (gfc_simplify_expr): If end of a string is less
1424 than zero, set it to zero.
1426 2011-07-28 Jakub Jelinek <jakub@redhat.com>
1429 * frontend-passes.c (optimize_minmaxloc): New function.
1430 (optimize_expr): Call it.
1432 2011-07-27 Tobias Burnus <burnus@net-b.de>
1435 * trans-types.c (gfc_get_derived_type): Ensure that pointer
1436 component types are marked as nonrestricted.
1438 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
1441 * trans.c (gfc_allocate_using_malloc): Change function signature.
1442 Return nothing. New parameter "pointer". Eliminate temorary variables.
1443 (gfc_allocate_using_lib): Ditto.
1444 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
1445 and gfc_allocate_using_malloc. Do not free and then reallocate a
1446 variable that is already allocated.
1447 (gfc_likely): New function. Basedon gfc_unlikely.
1448 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
1449 Instructions to modify the array descriptor are stored in this block
1450 while other instructions continue to be stored in "pblock".
1451 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
1452 descriptor_block so that the array descriptor is only updated if
1453 the array was allocated successfully.
1454 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
1455 * trans.h (gfc_allocate_allocatable): Change function signature.
1456 Function now returns void.
1457 (gfc_allocate_using_lib): Ditto, and new function parameter.
1458 (gfc_allocate_using_malloc): Ditto.
1459 * trans-openmp.c (gfc_omp_clause_default_ctor,
1460 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
1461 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
1462 * trans-stmt.c (gfc_trans_allocate): Update function calls for
1463 gfc_allocate_allocatable and gfc_allocate_using_malloc.
1465 2011-07-26 Tobias Burnus <burnus@net-b.de>
1467 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
1468 (gfc_conv_descriptor_token): New function.
1469 * trans-array.h (gfc_conv_descriptor_token): New prototype.
1470 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
1471 with -fcoarray=lib, append "void *token" to the array descriptor.
1472 (gfc_array_descriptor_base_caf): New static variable.
1473 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
1474 when passing a descriptor coarray to a nondescriptor dummy.
1476 2011-07-23 Tobias Burnus <burnus@net-b.de>
1478 * resolve.c (resolve_symbol): Fix coarray var decl check.
1480 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
1482 * trans.c (gfc_allocate_with_status): Split into two functions
1483 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
1484 (gfc_allocate_using_malloc): The status parameter is now the
1485 actual status rather than a pointer. Code cleanup.
1486 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
1487 errlen. Pass these to the coarray lib.
1488 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
1489 gfc_allocate_allocatable.
1490 (gfc_omp_clause_copy_ctor): Ditto.
1491 (gfc_trans_omp_array_reduction): Ditto.
1492 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
1493 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
1494 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
1495 functions. Move error checking outside the if (!gfc_array_allocate)
1496 block so that it also affects trees produced by gfc_array_allocate.
1497 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
1498 and errlen. Replace parameter pstat by status. Code cleanup. Update
1499 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
1500 * trans-array.h (gfc_array_allocate): Update signature of
1503 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
1505 * gfortran.texi: Remove a duplicate word.
1507 2011-07-21 Tobias Burnus <burnus@net-b.de>
1509 * check.c (gfc_check_present): Allow coarrays.
1510 * trans-array.c (gfc_conv_array_ref): Avoid casting
1511 when a pointer is wanted.
1512 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
1513 handle hidden token and offset arguments for nondescriptor
1515 * trans-expr.c (get_tree_for_caf_expr): New function.
1516 (gfc_conv_procedure_call): For -fcoarray=lib pass the
1517 token and offset for nondescriptor coarray dummies.
1518 * trans.h (lang_type): Add caf_offset tree.
1519 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
1521 2011-07-19 Tobias Burnus <burnus@net-b.de>
1523 * expr.c (gfc_is_coarray): New function.
1524 * gfortran.h (gfc_is_coarray): New prototype.
1525 * interface.c (compare_parameter): Use it.
1527 2011-07-19 Richard Guenther <rguenther@suse.de>
1529 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
1530 (gfc_trans_string_copy): Likewise.
1531 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
1532 * trans-types.c (gfc_get_array_descr_info): Likewise.
1533 * trans.c (gfc_build_array_ref): Likewise.
1535 2011-07-19 Janus Weil <janus@gcc.gnu.org>
1538 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
1540 2011-07-18 Tobias Burnus <burnus@net-b.de>
1542 * trans-decl.c (gfc_build_qualified_array): Make coarray's
1543 token TYPE_QUAL_RESTRICT.
1545 2011-07-18 Tobias Burnus <burnus@net-b.de>
1547 * resolve.c (resolve_transfer): Mention defined I/O
1548 in the diagnostic for alloc_comp/pointer_comp.
1550 2011-07-17 Tobias Burnus <burnus@net-b.de>
1553 * module.c (check_for_ambiguous): Check whether the name is matches
1554 the current program unit.
1556 2011-07-17 Tobias Burnus <burnus@net-b.de>
1559 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
1562 2011-07-16 Tobias Burnus <burnus@net-b.de>
1564 * expr.c (gfc_ref_this_image): New function.
1565 (gfc_is_coindexed): Use it.
1566 * gfortran.h (gfc_ref_this_image): New prototype.
1567 * resolve.c (resolve_deallocate_expr,
1568 resolve_allocate_expr): Support alloc scalar coarrays.
1569 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
1570 gfc_conv_descriptor_cosize, gfc_array_allocate,
1571 gfc_trans_deferred_array): Ditto.
1572 * trans-expr.c (gfc_conv_variable) Ditto.:
1573 * trans-stmt.c (gfc_trans_deallocate): Ditto.
1574 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
1575 gfc_get_array_descr_info): Ditto.
1576 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1578 2011-07-11 Jakub Jelinek <jakub@redhat.com>
1581 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
1582 inner_size to gfc_index_one_node instead of integer_one_node.
1584 2011-07-10 Tobias Burnus <burnus@net-b.de>
1587 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
1589 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
1592 * expr.c (gfc_get_corank): Change return value to int.
1593 * gfortran.h (gfc_get_corank): Update function prototype.
1595 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
1598 * resolve.c (resolve_symbol): Force resolution of function result's
1599 array specification.
1601 2011-07-07 Tobias Burnus <burnus@net-b.de>
1603 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
1604 with NULL arguments for (new) stat=/errmsg= arguments.
1606 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
1608 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
1609 allocatable. Rename function gfc_allocate_array_with_status to
1610 gfc_allocate_allocatable_with_status. Update function call for
1611 gfc_allocate_with_status.
1612 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
1613 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
1614 * trans-stmt.c (gfc_trans_allocate): Update function call for
1615 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
1616 to gfc_allocate_allocatable_with_status.
1617 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
1618 so it uses the library for memory allocation when -fcoarray=lib.
1619 (gfc_allocate_allocatable_with_status): Renamed from
1620 gfc_allocate_array_with_status.
1621 (gfc_allocate_allocatable_with_status): Update function call for
1622 gfc_allocate_with_status.
1623 * trans.h (gfc_coarray_type): New enum.
1624 (gfc_allocate_with_status): Update prototype.
1625 (gfc_allocate_allocatable_with_status): Renamed from
1626 gfc_allocate_array_with_status.
1627 * trans-decl.c (generate_coarray_sym_init): Use the new constant
1628 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
1630 2011-07-06 Richard Guenther <rguenther@suse.de>
1632 * f95-lang.c (gfc_init_decl_processing):
1633 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1635 2011-07-04 Jakub Jelinek <jakub@redhat.com>
1638 * gfortranspec.c (lang_specific_driver): Ignore options with
1639 CL_ERR_MISSING_ARG errors.
1641 2011-07-02 Janus Weil <janus@gcc.gnu.org>
1644 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
1646 2011-06-30 Jakub Jelinek <jakub@redhat.com>
1649 * gfortran.h (gfc_constructor): Add repeat field.
1650 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
1651 * array.c (current_expand): Add repeat field.
1652 (expand_constructor): Copy repeat.
1653 * constructor.c (node_free, node_copy, gfc_constructor_get,
1654 gfc_constructor_lookup): Handle repeat field.
1655 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
1656 * data.h (gfc_assign_data_value): Add mpz_t * argument.
1657 (gfc_assign_data_value_range): Removed.
1658 * constructor.h (gfc_constructor_advance): Removed.
1659 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
1660 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
1661 also handle overwriting a range with a single entry.
1662 (gfc_assign_data_value_range): Removed.
1663 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
1664 call. Use gfc_assign_data_value instead of
1665 gfc_assign_data_value_expr.
1667 2011-06-27 Janus Weil <janus@gcc.gnu.org>
1670 * trans-array.c (structure_alloc_comps): Make sure sub-components
1671 and extended types are correctly deallocated.
1673 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
1675 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
1676 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
1677 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
1679 2011-06-21 Janus Weil <janus@gcc.gnu.org>
1682 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
1683 symbols SAVE_IMPLICIT.
1685 2011-06-20 Tobias Burnus <burnus@net-b.de>
1688 * gfortran.h (gfc_check_vardef_context): Update prototype.
1689 (iso_fortran_env_symbol): Handle derived types.
1690 (symbol_attribute): Add lock_comp.
1691 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
1692 * interface.c (compare_parameter, gfc_procedure_use): Handle
1694 (compare_actual_formal): Update
1695 gfc_check_vardef_context call.
1696 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
1697 * intrinsic.c (check_arglist): Ditto.
1698 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
1699 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
1700 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
1701 * module.c (mio_symbol_attribute): Handle lock_comp.
1702 (create_derived_type): New function.
1703 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
1704 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
1705 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
1706 checks for LOCK_TYPE.
1707 (gfc_resolve_iterator, resolve_deallocate_expr,
1708 resolve_allocate_expr, resolve_code, resolve_transfer): Update
1709 gfc_check_vardef_context call.
1710 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
1711 * trans-stmt.c (gfc_trans_lock_unlock): New function.
1712 * trans.c (trans_code): Handle LOCK and UNLOCK.
1714 2011-06-18 Janus Weil <janus@gcc.gnu.org>
1717 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
1720 2011-06-17 Janus Weil <janus@gcc.gnu.org>
1723 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
1724 make sure the vtab is present.
1726 2011-06-16 Janus Weil <janus@gcc.gnu.org>
1729 * interface.c (gfc_extend_assign): Propagate the locus from the
1730 assignment to the type-bound procedure call.
1732 2011-06-16 Janus Weil <janus@gcc.gnu.org>
1735 * module.c (mio_component): Make sure the 'class_ok' attribute is set
1736 for use-associated CLASS components.
1737 * parse.c (parse_derived): Check for 'class_ok' attribute.
1738 * resolve.c (resolve_fl_derived): Ditto.
1740 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1742 * frontend-passes.c (remove_trim): New function.
1743 (optimize_assignment): Use it.
1744 (optimize_comparison): Likewise. Return correct status
1745 for previous change.
1747 2011-06-12 Tobias Burnus
1750 * trans-expr.c (gfc_trans_assignment_1): Tell
1751 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
1752 with allocatable components.
1753 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
1755 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1757 * frontend-passes.c (optimize_assignment): Follow chains
1758 of concatenation operators to the end for removing trailing
1759 TRIMS for assignments.
1761 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
1763 * trans-decl.c (gfc_build_builtin_function_decls):
1764 Updated declaration of caf_sync_all and caf_sync_images.
1765 * trans-stmt.c (gfc_trans_sync): Function
1766 can now handle a "stat" variable that has an integer type
1767 different from integer_type_node.
1769 2011-06-09 Richard Guenther <rguenther@suse.de>
1771 * trans.c (gfc_allocate_array_with_status): Mark error path
1774 2011-06-08 Tobias Burnus <burnus@net-b.de>
1777 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
1778 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
1779 (gfc_code): Add expr4.
1780 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
1781 * match.c (gfc_match_lock, gfc_match_unlock,
1782 lock_unlock_statement): New functions.
1783 (sync_statement): Bug fix, avoiding double freeing.
1784 (gfc_match_if): Handle LOCK/UNLOCK statement.
1785 * parse.c (decode_statement, next_statement,
1786 gfc_ascii_statement): Ditto.
1787 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
1788 * resolve.c (resolve_lock_unlock): New function.
1789 (resolve_code): Call it.
1790 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
1792 2011-06-07 Richard Guenther <rguenther@suse.de>
1794 * f95-lang.c (gfc_init_decl_processing): Do not set
1795 size_type_node or call set_sizetype.
1797 2011-06-05 Tobias Burnus <burnus@net-b.de>
1800 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1803 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
1804 Thomas Koenig <tkoenig@gcc.gnu.org>
1806 * dump-parse-tree.c (show_symbol): Don't dump namespace
1807 for ENTRY to avoid infinite recursion.
1809 2011-06-02 Asher Langton <langton2@llnl.gov>
1812 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
1813 pointees as AS_EXPLICIT.
1815 2011-06-02 Asher Langton <langton2@llnl.gov>
1818 * decl.c (variable_decl): Merge current_as before copying to cp_as.
1820 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
1823 * decl.c (gfc_match_modproc): Allow for a double colon in a module
1824 procedure statement.
1825 * parse.c ( decode_statement): Deal with whitespace around :: in
1828 2011-05-31 Tobias Burnus <burnus@net-b.de>
1831 * intrinsic.c (klass): Add CLASS_ATOMIC.
1832 (add_subroutines): Add atomic_ref/atomic_define.
1833 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
1834 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
1835 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
1836 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
1837 and GFC_ISYM_ATOMIC_REF.
1838 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
1839 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
1841 * check.c (gfc_check_atomic, gfc_check_atomic_def,
1842 gfc_check_atomic_ref): New functions.
1843 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
1844 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
1845 * trans-intrinsic.c (conv_intrinsic_atomic_def,
1846 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
1848 (conv_intrinsic_move_alloc) Renamed from
1849 gfc_conv_intrinsic_move_alloc - and made static.
1850 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
1851 (gfc_conv_intrinsic_subroutine) Add prototype.
1852 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
1853 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
1855 (gfc_init_kinds): Set them.
1857 2011-05-31 Tobias Burnus <burnus@net-b.de>
1860 * trans-array.c (gfc_trans_dummy_array_bias): Handle
1861 cobounds of assumed-shape arrays.
1863 2011-05-31 Tobias Burnus <burnus@net-b.de>
1866 * resolve.c (resolve_fl_variable): Handle static coarrays
1867 with non-constant cobounds.
1869 2011-05-29 Janus Weil <janus@gcc.gnu.org>
1872 * module.c (mio_component_ref): Handle components of extended types.
1873 * symbol.c (gfc_find_component): Return is sym is NULL.
1875 2011-05-29 Tobias Burnus <burnus@net-b.de>
1878 * interface.c (compare_parameter): Add check for passing coarray
1879 to allocatable noncoarray dummy.
1881 2011-05-29 Tobias Burnus <burnus@net-b.de>
1882 Richard Guenther <rguenther@suse.de>
1885 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
1886 the type's TREE_TYPE.
1887 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
1888 * trans.c (gfc_build_array_ref): Ditto.
1890 2011-05-27 Tobias Burnus <burnus@net-b.de>
1893 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
1894 * match.c (gfc_match_nullify): Ditto.
1895 * resolve.c (resolve_deallocate_expr): Ditto.
1896 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
1899 2011-05-27 Tobias Burnus <burnus@net-b.de>
1902 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
1903 * intrinsic.c (add_functions): Add rank intrinsic.
1904 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
1905 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
1906 * simplify.c (gfc_simplify_rank): New function.
1907 * intrinsic.texi (RANK): Add description for rank intrinsic.
1908 * check.c (gfc_check_rank): New function.
1910 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
1911 Thomas Koenig <tkoenig@gcc.gnu.org>
1914 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
1915 changed to GFC_ENABLE_REVERSE.
1916 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
1917 to GFC_INHIBIT_REVERSE.
1918 * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
1919 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
1920 * dependency.c (gfc_dep_resolver): Change names for elements of
1921 gfc_reverse as necessary. Change the logic so that forward
1922 dependences are remembered as well as backward ones. When both
1923 have appeared, force a temporary.
1925 2011-05-26 Tobias Burnus <burnus@net-b.de>
1928 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
1929 * trans-decl.c (has_coarray_vars, caf_init_block,
1930 gfor_fndecl_caf_register): New file-global variables.
1931 (gfc_finish_var_decl): Make sure that coarrays in main are static.
1932 (gfc_build_qualified_array): Generate coarray token variable.
1933 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
1934 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
1935 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
1937 (generate_local_decl): Check for local coarrays.
1938 (create_main_function): SYNC ALL before calling MAIN.
1939 (generate_coarray_sym_init): Register static coarray.
1940 (generate_coarray_init): Generate CAF registering constructor
1942 (gfc_generate_function_code): Call it, if needed, do not create
1944 (gfc_generate_module_vars, gfc_process_block_locals): Call
1945 generate_coarray_init.
1946 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
1948 * trans.h (gfor_fndecl_caf_register): New variable.
1949 (lang_type): New element caf_token.
1950 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
1952 2011-05-24 Joseph Myers <joseph@codesourcery.com>
1954 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
1955 (gfortran$(exeext)): Use libcommon-target.a.
1957 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1959 * frontend-passes.c (cfe_register_funcs): Also register
1960 character functions if their charlens are known and constant.
1961 Also register allocatable functions.
1963 2011-05-21 Janus Weil <janus@gcc.gnu.org>
1966 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
1967 selector is ALLOCATABLE.
1969 2011-05-20 Janus Weil <janus@gcc.gnu.org>
1972 * module.c (write_dt_extensions): Do not write extended types which
1973 are local to a subroutine.
1975 2011-05-20 Joseph Myers <joseph@codesourcery.com>
1977 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
1979 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
1981 * gfortran.texi (set_fpe): Update documentation.
1982 * invoke.texi (-ffpe-trap): Likewise.
1983 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
1984 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
1985 precision an alias for it.
1987 2011-05-19 Tobias Burnus <burnus@net-b.de>
1990 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
1991 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
1993 * trans.c (gfc_build_array_ref): Return original type not variant
1994 copy for scalar coarrays.
1995 * trans-array.c (gfc_conv_array_ref): Ditto.
1997 2011-05-18 Janus Weil <janus@gcc.gnu.org>
2000 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2001 argument to avoid memory leaks.
2003 2011-05-16 Tobias Burnus <burnus@net-b.de>
2005 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2006 (Fortran 2008 status): Multi-image support for coarrays.
2007 (TR 19113 status): New section.
2009 2011-05-15 Tobias Burnus <burnus@net-b.de>
2012 actual argument is not an array; rank mismatch is diagnosted later.
2013 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2015 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2017 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
2020 * trans-types.c: Include "tm.h".
2021 [0] (c_size_t_size): Remove.
2023 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2026 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2027 is now the default, the library defaults to backtracing disabled.
2029 2011-05-14 Tobias Burnus <burnus@net-b.de>
2031 * lang.opt (fdump-core): Re-add as ignored option
2032 for backward compatibility.
2034 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2037 * gfortran.texi: Update mixed-language programming section
2038 reflecting the removal of the fdump-core option, and that
2039 -fbacktrace is now enabled by default.
2041 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2044 * frontend-passes.c (cfe_register_funcs): Also register functions
2045 for potential elimination if the rank is > 0, the shape is unknown
2046 and reallocate on assignment is active.
2047 (create_var): For rank > 0 functions with unknown shape, create
2048 an allocatable temporary.
2050 2011-05-14 Tobias Burnus <burnus@net-b.de>
2053 * interface.c (compare_parameter): Skip diagnostic if
2054 actual argument is not an array; rank mismatch is diagnosted later.
2056 2011-05-14 Tobias Burnus <burnus@net-b.de>
2058 * options.c (gfc_init_options, gfc_post_options): Enable
2059 -fstack-arrays by default if -Ofast is used.
2060 * invoke.texi (-fstack-arrays): Document this.
2062 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2065 * gfortran.h (gfc_option_t): Remove flag_dump_core.
2066 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2067 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2068 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2069 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2071 * lang.opt: Remove -fdump-core.
2072 * options.c (gfc_init_options): Make backtrace default to enabled,
2074 (gfc_handle_option): Remove OPT_fdump-core.
2075 * trans-decl.c: Pass a 0 to preserve ABI.
2077 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2079 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2081 2011-05-13 Tobias Burnus <burnus@net-b.de>
2084 * io.c (resolve_tag_format, resolve_tag): Make sure
2085 that the string is of default kind.
2086 (gfc_resolve_inquire): Also resolve decimal tag.
2088 2011-05-12 Tobias Burnus <burnus@net-b.de>
2091 * resolve.c (resolve_intrinsic): Don't resolve module
2092 intrinsics multiple times.
2094 2011-05-11 Tobias Burnus <burnus@net-b.de>
2097 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2098 instead of e->symtree->n.sym, if available.
2100 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2102 * f95-lang.c (global_bindings_p): Return bool and simplify.
2104 2011-05-07 Tobias Burnus <burnus@net-b.de>
2108 * trans.h: Move gfc_init_coarray_decl prototype ...
2109 * gfortran.h: ... to here.
2110 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2111 (gfc_parse_file): Update translate_all_program_units call.
2112 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2113 new argument whether DECL_EXTERNAL should be used.
2114 (create_main_function): Update gfc_init_coarray_decl call.
2115 * trans-intrinsic.c (trans_this_image, trans_image_index,
2116 conv_intrinsic_cobound): Ditto.
2118 2011-05-06 Tobias Burnus <burnus@net-b.de>
2121 * trans-array.c (gfc_walk_variable_expr): Continue walking
2122 for scalar coarrays.
2123 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2124 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2125 (trans_this_image): Fix algorithm.
2126 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2127 gfc_sym_type): Handle scalar coarrays.
2129 2011-05-06 Tobias Burnus <burnus@net-b.de>
2133 * lang.opt (std=f2008tr): New.
2134 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2135 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2136 procedures for -std=f2008tr/gnu/legacy.
2137 (gfc_match_import): Set sym to NULL.
2138 * options.c (set_default_std_flags,gfc_handle_option): Handle
2140 * invoke.texi (-std=): Document -std=f2008tr.
2142 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2144 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2145 * trans-io.c (add_case): Likewise.
2146 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2147 (gfc_trans_character_select): Likewise.
2149 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2151 * trans-decl.c (trans_function_start): Do not set
2152 dont_save_pending_sizes_p.
2154 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2156 * trans.h (gfc_chainon_list): Delete.
2157 * trans.c (gfc_chainon_list): Delete.
2159 2011-05-04 Tobias Burnus <burnus@net-b.de>
2162 * invoke.texi (fno-protect-parens): Document
2163 that -Ofast implies -fno-protect-parens.
2164 * options.c (gfc_init_options, gfc_post_options):
2165 Make -Ofast imply -fno-protect-parens.
2167 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2169 * trans-decl.c (build_library_function_decl_1): Call
2170 build_function_type_vec. Adjust argument list building accordingly.
2171 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2172 * trans-types.c (gfc_get_function_type): Likewise.
2174 2011-05-04 Richard Guenther <rguenther@suse.de>
2176 * trans-array.c (gfc_trans_array_constructor_value): Use
2177 size_int for bounds of range types.
2178 (gfc_trans_array_constructor_value): Use size_type_node
2179 for memcpy argument.
2180 * trans-common.c (build_field): Use gfc_charlen_type_node
2182 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2183 as type to build_int_cst.
2184 * trans-const.c (gfc_build_string_const): Use size_int
2185 for bounds of range types.
2186 (gfc_build_wide_string_const): Likewise.
2187 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2189 (gfc_trans_character_select): Likewise.
2190 (gfc_trans_character_select): Do not pass NULL
2191 as type to build_int_cst.
2192 (gfc_trans_character_select): Use size_int for bounds of range types.
2193 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2194 (add_case): Do not pass NULL as type to build_int_cst.
2195 (transfer_expr): Likewise.
2196 (transfer_array_desc): Likewise.
2197 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2199 (gfc_trans_assign_aux_var): Likewise.
2200 (create_main_function): Use size_int for bounds of range types.
2201 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2202 NULL as type to build_int_cst.
2203 (gfc_conv_intrinsic_spacing): Likewise.
2204 (gfc_conv_intrinsic_rrspacing): Likewise.
2205 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2207 2011-05-04 Richard Guenther <rguenther@suse.de>
2209 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2210 argument to int_const_binop.
2212 2011-05-03 Tobias Burnus <burnus@net-b.de>
2215 * trans-intrinsic.c (trans_this_image): Implement version with
2217 (conv_intrinsic_cobound): Simplify code.
2218 (gfc_conv_intrinsic_function): Call trans_this_image for
2219 this_image(coarray) except for -fcoarray=single.
2221 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
2224 * gfortran.texi: Document the 'Q' exponent-letter extension.
2225 * invoke.texi: Document -Wreal-q-constant.
2226 * lang.opt: Add -Wreal-q-constant option.
2227 * gfortran.h: Add warn_real_q_constant to option struct.
2228 * primary.c (match_real_constant): Use it. Accept 'Q' as
2229 exponent-letter for REAL(16) real-literal-constant with a
2230 fallback to REAL(10) or error if REAL(10) is not available.
2231 * options.c (gfc_init_options, set_Wall) Set it.
2232 (gfc_handle_option): Handle new option.
2234 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2236 * dump-prase-tree.c (show_code_node): Set the current
2237 namespace to the BLOCK before displaying it; restore
2240 2011-04-30 Tobias Burnus <burnus@net-b.de>
2243 * decl.c (gfc_match_import): Don't try to find the
2244 symbol if already found.
2246 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
2249 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2250 offset so that the lbounds are one.
2251 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2253 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
2256 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2257 automatic reallocation when the lhs is a target.
2260 * trans-expr.c (fcncall_realloc_result): Make sure that the
2261 result dtype field is set before the function call.
2263 2011-04-29 Tobias Burnus <burnus@net-b.de>
2266 * resolve.c (resolve_typebound_generic_call): Don't check access
2267 flags of the specific function.
2270 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2271 to AS_ASSUMED_SHAPE for function results.
2272 (resolve_fl_var_and_proc): Print also for function results with
2273 AS_DEFERRED an error, if they are not a pointer or allocatable.
2274 (resolve_types): Make sure arguments of procedures in interface
2275 blocks are resolved.
2277 2011-04-29 Michael Matz <matz@suse.de>
2279 * options.c (options.c): Set warn_maybe_uninitialized.
2281 2011-04-28 Tobias Burnus <burnus@net-b.de>
2284 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
2285 function results only once.
2286 (resolve_symbol): Always resolve function results.
2289 * expr.c (gfc_check_vardef_context): Fix handling of generic
2291 * interface.c (check_interface0): Reject internal functions
2292 in generic interfaces, unless -std=gnu.
2294 2011-04-27 Tobias Burnus <burnus@net-b.de>
2297 * resolve.c (resolve_global_procedure): Error recovery -
2298 avoid segfault for (non)character-returning functions.
2300 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2302 * decl.c (gfc_match_end): Check that the block name starts
2304 * parse.c (gfc_build_block_ns): Make block names unique by
2307 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2309 * frontend-passes.c (inserted_block): New variable.
2310 (changed_statement): Likewise.
2311 (create_var): Encase statement to be operated on in a BLOCK.
2312 Adjust code insertion for BLOCK.
2313 (cfe_code): Set inserted_block and changed_statement to NULL.
2315 2011-04-23 Tobias Burnus <burnus@net-b.de>
2318 * module.c (mio_array_spec): Set as->cotype on reading.
2319 * resolve.c (resolve_allocate_expr): Fix allocating coarray
2322 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2325 * frontend_passes (cfe_register_funcs): Remove workaround for DO
2327 (gfc_code_walker): Make sure the pointer to the current
2328 statement doen't change when other statements are inserted.
2330 2011-04-21 Tobias Burnus <burnus@net-b.de>
2333 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
2335 2011-04-20 Jim Meyering <meyering@redhat.com>
2337 * expr.c (free_expr0): Remove useless if-before-free.
2338 * gfortranspec.c (lang_specific_pre_link): Likewise.
2339 * interface.c (gfc_extend_expr): Likewise.
2340 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2342 2011-04-19 Tobias Burnus <burnus@net-b.de>
2347 * module.c (fix_mio_expr): Commit created symbol.
2349 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2351 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
2353 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2355 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
2358 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2360 * misc.c (gfc_getmem): Remove function.
2361 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
2362 usage with XCNEW or XCNEWVEC.
2363 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
2365 * options.c (gfc_handle_module_path_options)
2366 (gfc_get_option_string): Likewise.
2367 * resolve.c (gfc_resolve_forall): Likewise.
2368 * simplify.c (simplify_transformation_to_array): Likewise.
2369 * target-memory.c (gfc_target_interpret_expr): Likewise.
2370 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
2371 (get_init_field): Likewise.
2372 * trans-expr.c (gfc_conv_statement_function): Likewise.
2373 * trans-io.c (nml_full_name): Likewise.
2374 * trans-stmt.c (gfc_trans_forall_1): Likewise.
2375 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
2377 2011-04-19 Tobias Burnus <burnus@net-b.de>
2380 * parse.c (resolve_all_program_units): Skip modules.
2381 (translate_all_program_units): Handle modules.
2382 (gfc_parse_file): Defer code generation for modules.
2384 2011-04-19 Martin Jambor <mjambor@suse.cz>
2386 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
2387 instead of cgraph_get_create_node.
2389 2011-04-18 Jim Meyering <meyering@redhat.com>
2391 remove now-unused definition of gfc_free
2392 * misc.c (gfc_free): Remove function.
2393 * gfortran.h (gfc_free): Remove its prototype.
2395 2011-04-18 Jim Meyering <meyering@redhat.com>
2397 convert each use of gfc_free (p) to free (p)
2398 Do that by running this command:
2399 perl -pi -e 's/\bgfc_free ?\(/free (/' \
2400 $(git grep -El '\bgfc_free ?\(')
2401 which also corrects the few uses that lacked a space between
2402 the function name and the open parenthesis.
2403 Manually undo the change to the function definition itself
2404 and its prototype. They'll be removed next.
2405 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
2406 * constructor.c (node_free): Likewise.
2407 * cpp.c (dump_queued_macros): Likewise.
2408 * data.c (gfc_assign_data_value): Likewise.
2409 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
2410 (gfc_free_data_all, match_old_style_init): Likewise.
2411 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
2413 (gfc_match_modproc): Likewise.
2414 * dependency.c (check_section_vs_section): Likewise.
2415 * error.c (gfc_pop_error, gfc_free_error): Likewise.
2416 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
2417 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
2418 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
2420 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
2421 (strip_function_call, optimize_comparison): Likewise.
2422 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
2423 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
2425 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
2426 (gfc_convert_chartype): Likewise.
2427 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
2429 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
2430 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
2431 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
2433 (free_case, gfc_free_forall_iterator): Likewise.
2435 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
2436 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
2437 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
2438 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
2439 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
2440 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
2441 * openmp.c (gfc_free_omp_clauses): Likewise.
2442 * options.c (gfc_post_options): Likewise.
2443 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
2444 * primary.c (gfc_free_structure_ctor_component): Likewise.
2445 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
2446 (gfc_resolve_forall, resolve_equivalence): Likewise.
2447 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
2448 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
2449 (load_file, gfc_read_orig_filename): Likewise.
2450 * simplify.c (simplify_transformation_to_array): Likewise.
2451 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
2453 (gfc_simplify_compiler_options): Likewise.
2454 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
2455 (gfc_free_association_list): Likewise.
2456 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
2458 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
2459 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
2460 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
2461 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
2463 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
2464 (gfc_free_namespace): Likewise.
2465 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
2466 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
2467 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
2468 * trans-common.c (get_init_field, create_common): Likewise.
2469 * trans-const.c (gfc_build_wide_string_const): Likewise.
2470 (gfc_conv_string_init): Likewise.
2471 * trans-decl.c (gfc_generate_function_code): Likewise.
2472 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
2474 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
2475 (gfc_trans_subarray_assign): Likewise.
2476 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
2477 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
2478 (transfer_namelist_element, transfer_array_component): Likewise.
2479 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2480 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
2481 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
2484 2011-04-15 Jim Meyering <meyering@redhat.com>
2486 gfortran: remove cpp definition of free, ...
2487 in preparation for the s/gfc_free/free/ transformation.
2488 * gfortran.h (free): Remove macro definition that would otherwise
2489 prevent direct use of the function.
2491 2011-04-18 Tobias Burnus <burnus@net-b.de>
2494 * array.c (gfc_match_array_ref): Check for too many codimensions.
2495 * check.c (gfc_check_image_index): Check number of elements
2497 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
2499 2011-04-18 Tobias Burnus <burnus@net-b.de>
2502 * iresolve.c (gfc_resolve_image_index): Set ts.type.
2503 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
2504 are not known at compile time and handle -fcoarray=lib.
2505 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
2507 (conv_intrinsic_cobound): Fix comment typo.
2508 (trans_this_image): New function.
2509 * trans-array.c (gfc_unlikely): Move to trans.c.
2510 * trans.c (gfc_unlikely): Function moved from trans-array.c.
2511 (gfc_trans_runtime_check): Use it.
2512 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
2513 * trans.h (gfc_unlikely): Add prototype.
2515 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
2518 * trans-expr.c (fcncall_realloc_result): Renamed version of
2519 realloc_lhs_bounds_for_intrinsic_call that does not touch the
2520 descriptor bounds anymore but makes a temporary descriptor to
2522 (gfc_trans_arrayfunc_assign): Modify the reference to above
2525 2011-05-17 Tobias Burnus <burnus@net-b.de>
2528 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
2529 for external procedures with proc arguments.
2531 2011-04-15 Michael Matz <matz@suse.de>
2533 * trans-array.c (toplevel): Include gimple.h.
2534 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
2535 properly expand variable length arrays.
2536 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
2537 variable length decls and associate them with their scope.
2538 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
2539 * options.c (gfc_init_options): Handle -fstack_arrays option.
2540 * lang.opt (fstack-arrays): Add option.
2541 * invoke.texi (Code Gen Options): Document it.
2542 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
2544 2011-04-15 Tobias Burnus <burnus@net-b.de>
2547 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
2548 code which is also causing an ICE.
2550 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
2552 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
2554 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2556 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
2559 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
2563 * trans-array.c (get_std_lbound): For derived type variables
2564 return array valued component lbound.
2566 2011-04-12 Martin Jambor <mjambor@suse.cz>
2568 * trans-decl.c (gfc_generate_function_code): Call
2569 cgraph_get_create_node instead of cgraph_node.
2571 2011-04-11 Tobias Burnus <burnus@net-b.de>
2574 * simplify.c (simplify_bound_dim): Exit for
2575 ucobound's last dimension unless -fcoarray=single.
2576 * trans-array (gfc_conv_descriptor_size_1): Renamed from
2577 gfc_conv_descriptor_size, made static, has now from_dim and
2579 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
2580 (gfc_conv_descriptor_cosize): New function.
2581 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
2582 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
2583 and handle last codim of ucobound for when -fcoarray is not "single".
2585 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
2588 * gfortran.h (gfc_option_t): Add warn_function_elimination and
2589 flag_frontend_optimize.
2590 * lang.opt (Wfunction-elimination): Add.
2591 (ffrontend-optimize): Add.
2592 * invoke.texi: Add documentation for -Wfunction-elimination
2593 and -ffrontend-optimize. Add -faggressive-function-elimination
2594 to list of code generation options.
2595 * frontend-passes.c (gfc_run_passes): Run optimizations if
2596 flag_frontend_optimize is set.
2597 (warn_function_elimination): New function.
2598 (cfe_expr_0): Call it if requested to do so.
2599 * options.c (gfc_init_options): Initiate warn_function_elimination
2600 and flag_frontend_optimize.
2601 (gfc_post_options): Set flag_frontend_optimize if not specified
2602 by user, depending on the optimization level.
2603 (gfc_handle_option): Handle -Wfunction-elimination and
2604 -ffrontend-optimize.
2606 2011-04-06 Tobias Burnus <burnus@net-b.de>
2609 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
2610 call for this_image.
2612 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
2614 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
2615 build_function_type_list instead of build_function_type. Correct
2616 argument order for func_frexp and func_scalbn.
2618 2011-04-05 Duncan Sands <baldrick@free.fr>
2620 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
2622 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2624 * frontend-passes: (optimize_lexical_comparison): New function.
2625 (optimize_expr): Call it.
2626 (optimize_comparison): Also handle lexical comparison functions.
2627 Return false instad of -2 for unequal comparison.
2629 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2632 * frontend-passes (cfe_expr_0): Reverse the order of going
2635 2011-04-04 Tobias Burnus <burnus@net-b.de>
2636 Mikael Morin <mikael.morin@sfr.fr>
2639 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
2640 * expr.c (gfc_is_coindexed): Ditto.
2641 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
2642 * interface.c (compare_parameter): Use gfc_expr_attr and
2644 * resolve.c (check_dimension, compare_spec_to_ref,
2645 resolve_allocate_expr, check_data_variable): Update for
2647 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
2648 gfc_simplify_ucobound): Allow non-constant bounds.
2649 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
2650 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
2651 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
2652 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
2653 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
2654 gfc_conv_ss_startstride, gfc_conv_loop_setup,
2655 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
2656 gfc_walk_variable_expr): Handle codimen.
2657 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
2658 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
2659 (conv_intrinsic_cobound): New function.
2660 (gfc_conv_intrinsic_function): Call it.
2661 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
2662 ucobound, lcobound, this_image.
2663 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
2664 (gfc_get_dtype): Honour corank.
2665 (gfc_get_nodesc_array_type): Save corank and codimensions.
2666 (gfc_get_array_type_bounds): Save cobound.
2667 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
2668 (gfc_array_kind): Add corank item.
2669 (GFC_TYPE_ARRAY_CORANK): New macro.
2671 2011-04-03 Kai Tietz <ktietz@redhat.com>
2674 * Make-lang.in (f95-lang.o): Add some missing dependencies.
2676 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2679 * frontend-passes (cfe_register_funcs): Don't
2680 register functions if they appear as iterators in DO loops.
2682 2011-03-30 Michael Matz <matz@suse.de>
2685 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
2686 don't use local variable.
2687 (gfc_trans_arrayfunc_assign): Adjust caller.
2689 2011-03-29 Janus Weil <janus@gcc.gnu.org>
2692 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
2693 * module.c (MOD_VERSION): Bump.
2694 (mio_typespec): Read/write 'interface' field.
2695 * primary.c (match_string_constant,match_logical_constant): Remove
2697 (match_complex_constant): Make sure to clear the typespec.
2699 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2701 * frontend-passes.c (create_var): Warn about creating an
2702 array temporary if requested.
2704 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2707 * frontend-passes.c (optimize_trim): Also follow references, except
2708 when they are substring references or array references.
2710 2011-03-27 Tobias Burnus <burnus@net-b.de>
2713 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
2714 GFC_ISYM_NUM_IMAGES.
2715 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
2716 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
2718 * invoke.texi (-fcoarray=): Document "lib" argument.
2719 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
2720 * libgfortran.h (libgfortran_stat_codes): Add comments.
2721 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
2722 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
2723 Handle GFC_FCOARRAY_LIB.
2724 * trans.h (gfc_init_coarray_decl): New prototype.
2725 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
2726 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
2727 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
2728 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
2729 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
2730 New global variables.
2731 * trans-decl.c: Declare several CAF functions (cf. above).
2732 (gfc_build_builtin_function_decls): Initialize those.
2733 (gfc_init_coarray_decl): New function.
2734 (create_main_function): Call CAF init/finalize functions.
2735 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
2736 (gfc_conv_intrinsic_function): Call those.
2737 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
2738 Add code for GFC_FCOARRAY_LIB.
2740 2011-03-26 Janus Weil <janus@gcc.gnu.org>
2743 * class.c (get_unique_hashed_string): Adjust maximum allowable length
2744 for unique type string.
2746 2011-03-25 Kai Tietz <ktietz@redhat.com>
2748 * scanner.c (preprocessor_line): Use filename_cmp
2751 2011-03-25 Tobias Burnus <burnus@net-b.de>
2755 * trans-types.c (gfc_get_function_type): Don't use varargs if the
2756 procedure is known to have no arguments.
2758 2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2761 * gfortran.h (gfc_option_t) : Add
2762 flag_aggressive_function_elimination.
2763 (gfc_dep_compare_functions): Add prototype.
2764 * lang.opt: Add faggressive-function-elimination.
2765 * invoke.texi: Document -faggressive-function-elimination.
2766 * frontend_passes (expr_array): New static variable.
2767 (expr_size): Likewise.
2768 (expr_count): Likewise.
2769 (current_code): Likewise.
2770 (current_ns): Likewise.
2771 (gfc_run_passes): Allocate and free space for expressions.
2772 (cfe_register_funcs): New function.
2773 (create_var): New function.
2774 (cfc_expr_0): New function.
2775 (cfe_code): New function.
2776 (optimize_namespace): Invoke gfc_code_walker with cfe_code
2778 * dependency.c (gfc_dep_compare_functions): New function.
2779 (gfc_dep_compare_expr): Use it.
2780 * options.c (gfc_init_options): Handle
2781 flag_aggressive_function_elimination.
2782 (gfc_handle_option): Likewise.
2784 2011-03-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2786 * arith.c (arith_power): Plug memory leak.
2788 2011-03-12 Janus Weil <janus@gcc.gnu.org>
2791 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
2792 for polymorphic arguments.
2794 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2797 * intrinsic.texi: Clarify doc of logarithm functions.
2799 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2802 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
2803 the string length variable.
2805 2011-03-11 Janus Weil <janus@gcc.gnu.org>
2808 * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
2809 (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
2811 2011-03-06 Paul Thomas <pault@gcc.gnu.org>
2812 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2815 * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
2816 the expression has an iterator. Otherwise, iterate through the
2817 array, checking for constant expressions for each element.
2819 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
2822 * intrinsic.texi: Update CTIME and FDATE documentation.
2824 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2826 * invoke.texi (Option Summary, Fortran Dialect Options)
2827 (Preprocessing Options, Runtime Options, Code Gen Options):
2828 Fix vertical list spacing by using @itemx for additinoal
2829 items, empty line before @table. Fix typos.
2831 2011-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2834 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
2836 2011-02-26 Tobias Burnus <burnus@net-b.de>
2839 * trans-stmt.c (gfc_trans_allocate): Fix allocation with
2840 type-spec of deferred-length strings.
2842 2011-02-26 Tobias Burnus <burnus@net-b.de>
2845 * openmp.c (gfc_resolve_omp_directive): Resolve if()
2846 condition of OpenMP's task.
2848 2011-02-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2851 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
2853 2011-02-24 Tobias Burnus <burnus@net-b.de>
2856 * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
2857 multitable for linebreak between different syntax variants.
2859 2011-02-24 Richard Guenther <rguenther@suse.de>
2862 * f95-lang.c (pushdecl): For externs in non-global scope push
2863 a copy of the decl into the BLOCK.
2865 2011-02-23 Mikael Morin <mikael@gcc.gnu.org>
2868 * trans.c (gfc_prepend_expr_to_block): New function.
2869 * trans.h (gfc_prepend_expr_to_block): Declare.
2870 * trans-array.c (gfc_conv_array_parameter): Replace
2871 gfc_add_expr_to_block with gfc_prepend_expr_to_block.
2873 2011-02-22 Paul Thomas <pault@gcc.gnu.org>
2876 * trans-decl.c (gfc_get_extern_function_decl): Don't use the
2877 gsymbol backend_decl if the procedure has a formal argument
2878 that is a procedure.
2880 2011-02-22 Tobias Burnus <burnus@net-b.de>
2883 * trans-stmt.c (gfc_trans_if_1): Use correct line for
2884 expressions in the if condition.
2886 2011-02-20 Tobias Burnus <burnus@net-b.de>
2889 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
2890 gfc_restore_backend_locus to have better debug locations.
2891 * trans-array.c (gfc_trans_deferred_array): Ditto.
2893 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
2897 * trans-types.c (gfc_get_derived_type): Remove code that looks
2898 for decls in gsym and add call to gfc_get_module_backend_decl.
2899 * trans.h : Add prototype for gfc_get_module_backend_decl.
2900 * trans-decl.c (gfc_get_module_backend_decl): New function.
2901 (gfc_get_symbol_decl): Call it.
2903 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
2906 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
2907 (get_array_ctor_var_strlen): Add block dummy and add call to
2908 get_array_ctor_all_strlen instead of giving up on substrings.
2909 Call gcc_unreachable for default case.
2910 (get_array_ctor_strlen): Add extra argument to in call to
2911 get_array_ctor_var_strlen.
2913 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2916 * primary.c (gfc_match_structure_constructor): Handle empty parent
2919 2011-02-18 Tobias Burnus
2922 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
2923 esym to check whether the specific procedure returns an
2924 allocatable or pointer.
2926 2011-02-18 Michael Matz <matz@suse.de>
2929 * gfortran.h (struct gfc_component): Add norestrict_decl member.
2930 * trans.h (struct lang_type): Add nonrestricted_type member.
2931 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
2933 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
2934 (gfc_sym_type): Use it.
2936 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2939 * resolve.c (resolve_transfer): Reject variables with procedure pointer
2942 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2945 * gfortran.h (gfc_check_access): Removed prototype.
2946 (gfc_check_symbol_access): Added prototype.
2947 * module.c (gfc_check_access): Renamed to 'check_access', made static.
2948 (gfc_check_symbol_access): New function, basically a shortcut for
2950 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
2951 'gfc_check_symbol_access'.
2952 (write_operator,write_module): Renamed 'gfc_check_access'.
2953 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
2954 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
2955 'gfc_check_symbol_access'.
2957 2011-02-16 Janus Weil <janus@gcc.gnu.org>
2960 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
2961 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
2962 'gfc_build_class_symbol'.
2963 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
2964 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
2965 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
2966 'gfc_build_class_symbol'.
2967 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
2969 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
2972 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
2974 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2977 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
2979 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2982 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
2984 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
2987 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2990 * interface.c (get_expr_storage_size): Handle derived-type components.
2992 2011-02-13 Tobias Burnus <burnus@net-b.de>
2995 * interface.c (compare_parameter): Avoid ICE with
2996 character components.
2998 2011-02-12 Janus Weil <janus@gcc.gnu.org>
3000 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
3001 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
3002 'gfc_build_class_symbol'.
3004 2011-02-12 Michael Matz <matz@suse.de>
3005 Janus Weil <janus@gcc.gnu.org>
3006 Tobias Burnus <burnus@net-b.de>
3009 * trans-expr.c (conv_parent_component_references): Avoid unintendent
3010 skipping of parent compounds.
3012 2011-02-11 Tobias Burnus <burnus@net-b.de>
3015 * resolve.c (resolve_formal_arglist): PURE with VALUE
3016 and no INTENT: Add -std= diagnostics.
3018 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3021 * resolve.c (resolve_procedure_interface): If interface has a result
3022 variable, copy the typespec and set result pointer to self.
3024 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3027 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
3029 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3032 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
3034 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3036 * io.c (match_io_element): Do not set dt if not inquire.
3038 2011-02-08 Janus Weil <janus@gcc.gnu.org>
3041 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
3042 initialization target.
3044 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
3045 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3047 * gfortran.texi (Thread-safety): texinfo styling fixes.
3048 * intrinsic.texi: Likewise.
3050 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3052 * gfortran.texi (Compiler Characteristics): Add reference to
3053 thread-safety section.
3055 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3057 * gfortran.texi (Thread-safety): New section.
3058 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
3060 (GET_ENVIRONMENT_VARIABLE): Likewise.
3063 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
3066 * trans-stmt.c (gfc_trans_allocate): For deferred character
3067 length allocations with SOURCE, store to the values and string
3068 length to avoid calculating twice. Replace gfc_start_block
3069 with gfc_init_block to avoid unnecessary contexts and to keep
3070 declarations of temporaries where they should be. Tidy up the
3073 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
3076 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
3078 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3079 Paul Thomas <pault@gcc.gnu.org>
3082 * trans-expr.c (gfc_trans_class_init_assign): Add call to
3083 gfc_get_derived_type.
3084 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
3087 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3090 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
3092 2011-02-01 Janus Weil <janus@gcc.gnu.org>
3095 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
3096 pointer components with allocatable result.
3098 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3101 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
3102 with pointer or allocatable result.
3104 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
3107 * trans-stmt.c (gfc_trans_allocate): Improve handling of
3108 deferred character lengths with SOURCE.
3109 * iresolve.c (gfc_resolve_repeat): Calculate character
3110 length from source length and ncopies.
3111 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
3112 expressions for ALLOCATE.
3114 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3117 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
3118 an argument of a typebound assignment being a component.
3120 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3122 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
3123 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
3125 2011-01-31 Tobias Burnus <burnus@net-b.de>
3128 * resolve.c (resolve_fl_procedure): Reject stmt functions
3129 with pointer/allocatable attribute.
3131 2011-01-31 Tobias Burnus <burnus@net-b.de>
3134 * interface.c (gfc_procedure_use): Add explicit interface check for
3135 pointer/allocatable functions.
3137 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
3140 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
3141 expr and is assigned to a deferred character length scalar,
3142 make sure that the function is called before reallocation,
3143 so that the length is available. Include procedure pointer
3144 and procedure pointer component rhs as well.
3149 * gfortran.dg/allocatable_function_5.f90: New test not added by
3150 mistake on 2011-01-28.
3152 2011-01-29 Tobias Burnus <burnus@net-b.de>
3155 * check.c (gfc_check_shape): Support kind argument in SHAPE.
3156 * intrinsic.c (add_functions): Ditto.
3157 * resolve.c (gfc_resolve_shape): Ditto.
3158 * simplify.c (gfc_simplify_shape): Ditto.
3159 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
3160 gfc_simplify_shape): Update prototypes.
3161 * intrinisc.text (SHAPE): Document kind argument.
3163 2011-01-28 Tobias Burnus <burnus@net-b.de>
3166 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
3167 attribute also without INTENT.
3169 2011-01-28 Tobias Burnus <burnus@net-b.de>
3171 * gfortran.texi (Fortran 2003 status): Mention support for
3172 nonconstant namelist variables.
3174 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
3175 Tobias Burnus <burnus@gcc.gnu.org>
3180 * interface.c (compare_actual_formal): An allocatable or pointer
3181 deferred length actual is only allowed if the formal argument
3182 is also deferred length. Clean up whitespace.
3183 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
3184 deferred character length formal arguments by reference. Do the
3185 same for function results.
3186 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
3187 and rhs character lengths, if deferred length lhs. In this case
3188 set the lhs character length to that of the rhs.
3189 (gfc_conv_string_parameter): Remove assert that string length is
3191 (is_scalar_reallocatable_lhs): New function.
3192 (alloc_scalar_allocatable_for_assignment): New function.
3193 (gfc_trans_assignment_1): Call above new function. If the rhs is
3194 a deferred character length itself, makes ure that the function
3195 is called before reallocation, so that the length is available.
3196 (gfc_trans_asssignment): Remove error about assignment to
3197 deferred length character variables.
3198 * gfortran.texi : Update entry about (re)allocation on
3200 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
3201 length character variables.
3202 * module.c (mio_typespec): Transfer deferred characteristic.
3203 * trans-types.c (gfc_get_function_type): New code to generate
3204 hidden typelist, so that those character lengths that are
3205 passed by reference get the right type.
3206 * resolve.c (resolve_contained_fntype): Supress error for
3207 deferred character length functions.
3208 (resolve_function, resolve_fl_procedure) The same.
3209 (check_symbols): Remove the error that support for
3210 entity with deferred type parameter is not yet implemented.
3211 (resolve_fl_derived): The same.
3212 match.c (alloc_opt_list): Allow MOLD for deferred length object.
3213 * trans-decl.c (gfc_get_symbol_decl): For deferred character
3214 length dummies, generate a local variable for string length.
3215 (create_function_arglist): Hidden length can be a pointer.
3216 (gfc_trans_deferred_vars): For deferred character length
3217 results and dummies, assign the string length to the local
3218 variable from the hidden argument on entry and the other way
3219 round on exit, as appropriate.
3221 2011-01-27 Tobias Burnus <burnus@net-b.de>
3224 * trans-decl.c (gfc_generate_function_code): Fix init
3225 of allocatable result variable with allocatable components.
3227 2011-01-27 Tobias Burnus <burnus@net-b.de>
3230 * options.c (gfc_handle_module_path_options): Save
3231 module path without trailing slash as include path.
3233 2011-01-25 Tobias Burnus <burnus@net-b.de>
3236 * interface.c (gfc_check_operator_interface): Fix
3237 defined-assignment check.
3239 2011-01-23 Tobias Burnus <burnus@net-b.de>
3242 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
3243 scalar allocatable dummy arguments.
3245 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3248 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
3249 check for array sections followed by component references
3250 which are illegal. Also check for coindexed arguments.
3252 2011-01-22 Tobias Burnus <burnus@net-b.de>
3255 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
3258 2011-01-21 Tobias Burnus <burnus@net-b.de>
3261 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
3262 Use defined instead of magic number exit status codes.
3263 * scanner.c (include_line, gfc_new_file): Ditto.
3265 2011-01-21 Tobias Burnus <burnus@net-b.de>
3268 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
3269 without pointer attribute.
3271 2011-01-18 Janus Weil <janus@gcc.gnu.org>
3274 * resolve.c (expression_rank): Fix rank of procedure poiner components.
3275 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
3276 pointer components as actual arguments.
3278 2011-01-17 Jakub Jelinek <jakub@redhat.com>
3281 * gfortran.h (struct gfc_omp_saved_state): New type.
3282 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
3283 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
3285 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
3288 2011-01-17 Tobias Burnus <burnus@net-b.de>
3291 * invoke.texi (Options to request or suppress errors
3292 and warnings): Fix cross link.
3294 2011-01-15 Tobias Burnus <burnus@net-b.de>
3296 * gfortran.texi: Update Fortran 2003 Status section.
3299 * invoke.texi: Add missing "-E" to the -dM example.
3301 2011-01-13 Tobias Burnus <burnus@net-b.de>
3304 * intrinsic.texi (get_command_argument, get_environment_variable):
3305 Mark arguments as optional in the Arguments section.
3307 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
3308 Tobias Burnus <burnus@net-b.de>
3311 * trans-decl.c (gfc_get_extern_function_decl,
3312 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
3313 calling decl_attributes.
3315 2011-01-13 Tobias Burnus <burnus@net-b.de>
3316 Mikael Morin <mikael@gcc.gnu.org>
3320 * gfortran.h (gfc_code): Move union ext's case_list into
3322 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
3324 * frontend-passes.c (gfc_code_walker): Ditto.
3325 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
3326 gfc_match_type_is, gfc_match_class_is): Ditto.
3327 * resolve.c (resolve_select, resolve_select_type): Ditto.
3328 * st.c (gfc_free_statement): Ditto.
3329 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
3330 gfc_trans_character_select): Ditto.
3331 * parse.c (resolve_all_program_units): For error recovery, avoid
3332 segfault is proc_name is NULL.
3334 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
3337 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
3338 to be standard compliant by testing for shape rather than size
3339 before skipping reallocation. Improve comments.
3341 2011-01-09 Janus Weil <janus@gcc.gnu.org>
3344 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
3347 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
3350 * resolve.c (is_scalar_expr_ptr): For a substring reference,
3351 use gfc_dep_compare_expr to compare start and end expession.
3352 Add FIXME for using gfc_deb_compare_expr elsewhere.
3354 2011-01-09 Janus Weil <janus@gcc.gnu.org>
3357 * class.c (get_unique_type_string): Make type name start with upper
3360 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3363 * invoke.texi: Mention -ffree-line-length-none and
3364 -ffixed-line-length-none for preprocessing.
3366 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
3369 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
3370 procedure argument (eg TRANSPOSE) use a temporary if there is
3371 any chance of aliasing due to host or use association.
3372 (arrayfunc_assign_needs_temporary): Correct logic for function
3373 results and do not use a temporary for implicitly PURE
3374 variables. Use a temporary for Cray pointees.
3375 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
3376 implicit pureness of containing procedure.
3377 * decl.c (match_old_style_init, gfc_match_data): Where decl
3378 would fail in PURE procedure, set implicit_pure to zero.
3379 * gfortran.h : Add implicit_pure to structure symbol_attr and
3380 add prototype for function gfc_implicit_pure.
3381 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
3382 Where decl would fail in PURE procedure, reset implicit_pure.
3383 * io.c (match_vtag, gfc_match_open, gfc_match_close,
3384 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
3385 * match.c (gfc_match_critical, gfc_match_stopcode,
3386 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
3388 * parse.c (decode_omp_directive): The same.
3389 (parse_contained): If not PURE, set implicit pure attribute.
3390 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
3391 resolve_function, resolve_ordinary_assign) : The same.
3392 (gfc_implicit_pure): New function.
3393 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
3394 to ab_attribute enum and use it in this function.
3396 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3399 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
3400 make static and move in front of its only caller, to ...
3401 * trans-array.c (symbols_could_alias): ... here.
3402 Pass information about pointer and target status as
3403 arguments. Allocatable arrays don't alias anything
3404 unless they have the POINTER attribute.
3405 (gfc_could_be_alias): Keep track of pointer and target
3406 status when following references. Also check if typespecs
3407 of components match those of other components or symbols.
3409 2011-01-07 Tobias Burnus <burnus@net-b.de>
3412 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
3413 * intrinsic.c (add_functions): Use simplify functions for
3414 EXTENDS_TYPE_OF and SAME_TYPE_AS.
3415 * intrinsic.h (gfc_simplify_extends_type_of,
3416 gfc_simplify_same_type_as): New prototypes.
3417 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
3418 gfc_simplify_same_type_as): New functions.
3420 2011-01-07 Janus Weil <janus@gcc.gnu.org>
3424 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
3425 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
3427 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
3428 * resolve.c (resolve_deallocate_expr): _data component will be added
3429 at translation stage.
3430 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
3431 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
3433 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
3437 * parse.c (parse_interface): Remove check for procedure types.
3438 * interface.c (check_interface0): Verify that procedures are
3439 either all SUBROUTINEs or all FUNCTIONs.
3441 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3444 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
3445 'vtab' is initialized).
3447 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3450 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
3451 assignment, set the _vptr component to the declared type.
3453 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
3456 * resolve.c (resolve_allocate_deallocate): Follow references to
3457 check for duplicate occurence of allocation/deallocation objects.
3459 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3462 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
3463 of polymorphic allocatables according to their declared type.
3465 2011-01-04 Janus Weil <janus@gcc.gnu.org>
3468 * class.c (gfc_find_derived_vtab): Set the module field for the copying
3469 routine to make sure it receives module name mangling.
3471 2011-01-03 Jakub Jelinek <jakub@redhat.com>
3473 * gfortranspec.c (lang_specific_driver): Update copyright notice
3476 2011-01-03 Janus Weil <janus@gcc.gnu.org>
3478 * intrinsic.texi (LEADZ): Fix example.
3480 2011-01-02 Janus Weil <janus@gcc.gnu.org>
3483 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
3487 Copyright (C) 2011 Free Software Foundation, Inc.
3489 Copying and distribution of this file, with or without modification,
3490 are permitted in any medium without royalty provided the copyright
3491 notice and this notice are preserved.