]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
This patch rewrites the old VEC macro-based interface into a new one
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2012-11-17 Diego Novillo <dnovillo@google.com>
2
3 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4
5 * frontend-passes.c: Use new vec API in vec.h.
6 * trans-array.c: Likewise.
7 * trans-common.c: Likewise.
8 * trans-decl.c: Likewise.
9 * trans-expr.c: Likewise.
10 * trans-intrinsic.c: Likewise.
11 * trans-openmp.c: Likewise.
12 * trans-stmt.c: Likewise.
13 * trans-types.c: Likewise.
14 * trans.h: Likewise.
15
16 2012-11-17 Jakub Jelinek <jakub@redhat.com>
17
18 PR fortran/55341
19 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert last
20 argument to memcpy to size_type_node type.
21 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
22 * trasn-array.c (duplicate_allocatable): Likewise.
23
24 2012-11-16 Janus Weil <janus@gcc.gnu.org>
25
26 PR fortran/55297
27 * resolve.c (resolve_typebound_intrinsic_op): Only add typebound
28 operators to the operator list in the namespace of the derived type.
29
30
31 2012-11-12 Jan Hubicka <jh@suse.cz>
32
33 * f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
34 (gfc_define_builtin): Use set_call_expr_flags.
35 (gfc_init_builtin_functions): Update.
36
37 2012-11-12 Tobias Burnus <burnus@net-b.de>
38
39 PR fortran/55272
40 * module.c (mio_array_spec): Correctly handle coarray
41 scalars.
42
43 2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org>
44
45 PR fortran/51727
46 * module.c (sorted_pointer_info): New.
47 (gfc_get_sorted_pointer_info): New.
48 (free_sorted_pointer_info_tree): New.
49 (compare_sorted_pointer_info): New.
50 (find_symbols_to_write): New.
51 (write_symbol1_recursion): New.
52 (write_symbol1): Collect symbols that need writing, output in order.
53 (write_generic): Traverse tree in order.
54
55 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
56
57 PR c/53063
58 * options.c (set_Wall): Do not set warn_switch here.
59
60 2012-11-06 Janus Weil <janus@gcc.gnu.org>
61
62 PR fortran/54917
63 * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
64 Handle BT_CLASS.
65 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
66 polymorphic arguments.
67
68 2012-11-04 Janus Weil <janus@gcc.gnu.org>
69
70 PR fortran/55199
71 * primary.c (gfc_match_varspec): Clear typespec if it cannot be
72 determined at this point.
73
74 2012-10-31 Janus Weil <janus@gcc.gnu.org>
75
76 PR fortran/53718
77 * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
78 * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
79 GFC_DECL_PUSH_TOPLEVEL.
80 (build_function_decl): Do not push __copy procedure to toplevel.
81
82 2012-10-31 Tobias Burnus <burnus@net-b.de>
83
84 PR fortran/55134
85 * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
86 array with descriptor.
87
88 2012-10-28 Tobias Burnus <burnus@net-b.de>
89
90 PR fortran/54958
91 * gfortran.h (gfc_resolve_iterator_expr,
92 gfc_check_vardef_context): Update prototype.
93 * expr.c (gfc_check_vardef_context): Add own_scope
94 argument and honour it.
95 * resolve.c (gfc_resolve_iterator_expr): Add own_scope
96 argument and honour it.
97 (resolve_deallocate_expr, resolve_allocate_expr,
98 resolve_data_variables, resolve_transfer
99 resolve_lock_unlock, resolve_code): Update calls.
100 * array.c (resolve_array_list): Ditto.
101 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
102 * interface.c (compare_actual_formal): Ditto.
103 * intrinsic.c (check_arglist): Ditto.
104 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
105
106 2012-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
107
108 * trans.c (gfc_allocate_allocatable): Revert accidental
109 commit.
110
111 2012-10-24 Janus Weil <janus@gcc.gnu.org>
112
113 PR fortran/55037
114 * trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
115 remove an assert.
116
117 2012-10-21 Tobias Burnus <burnus@net-b.de>
118
119 PR fortran/54725
120 * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
121 * cpp.o (gfc_cpp_init_options): Use it for
122 setting gfc_cpp_option.sysroot.
123
124 2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
125
126 PR fortran/54465
127 * lang.opt (Wextra): Add.
128 * invoke.texi: Document that -Wc-binding-type, -Wconversion
129 and -Wline-truncation are implied by -Wall. Document that
130 -Wcompare-reals is implied by -Wextra. Document -Wextra.
131 * options.c (set_Wextra): New function.
132 (gfc_handle_option): Handle -Wextra.
133
134 2012-10-19 Janus Weil <janus@gcc.gnu.org>
135
136 PR fortran/54224
137 * trans-expr.c (conv_function_val): Set TREE_USED.
138
139 2012-10-18 Tobias Burnus <burnus@net-b.de>
140
141 PR fortran/54884
142 * resolve.c (specification_expr): Change to bool.
143 (resolve_formal_arglist, resolve_symbol): Set
144 specification_expr to true before resolving the array spec.
145 (resolve_variable, resolve_charlen, resolve_fl_variable):
146 Properly reset specification_expr.
147 (resolve_function): Set public_use when used in
148 a specification expr.
149
150 2012-10-16 Tobias Burnus <burnus@net-b.de>
151
152 PR fortran/50981
153 PR fortran/54618
154 * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
155 Update prototype.
156 * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
157 calls to those functions.
158 * trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
159 gfc_conv_expr_present): Handle absent polymorphic arguments.
160 (class_scalar_coarray_to_class): New function.
161 (gfc_conv_procedure_call): Update calls.
162
163 2012-10-12 Janus Weil <janus@gcc.gnu.org>
164
165 PR fortran/40453
166 * interface.c (check_dummy_characteristics): Recursively check dummy
167 procedures.
168
169 2012-10-11 Janus Weil <janus@gcc.gnu.org>
170
171 PR fortran/54784
172 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
173 to the _data component for polymorphic allocation with SOURCE.
174
175 2012-10-06 Janus Weil <janus@gcc.gnu.org>
176
177 PR fortran/54832
178 * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
179 attribute for proc-ptr components with RESULT variable.
180
181 2012-10-06 Janus Weil <janus@gcc.gnu.org>
182
183 PR fortran/45521
184 * interface.c (generic_correspondence): Implement additional
185 distinguishability criteria of F08.
186 (compare_actual_formal): Reject data object as actual argument for
187 procedure formal argument.
188
189 2012-10-04 Tobias Burnus <burnus@net-b.de>
190
191 * expr.c (scalarize_intrinsic_call): Plug memory leak.
192 * frontend-passes.c (gcc_assert): Extend assert.
193 * interface.c (gfc_compare_derived_types): Fix comparison.
194 (gfc_check_operator_interface): Move up to make this error
195 message reachable.
196 (get_sym_storage_size): Remove always-true checks.
197 * io.c (format_lex): Add comment.
198 (gfc_free_wait): Free memory.
199 * match.c (gfc_match_select_type): Ditto.
200 * matchexpr.c (match_level_3): Ditto.
201 * primary.c (match_string_constant): Ditto.
202 (match_actual_arg): Check return value.
203 * resolve.c (gfc_resolve_substring_charlen,
204 resolve_typebound_generic_call, resolve_typebound_function,
205 resolve_typebound_subroutine): Free memory.
206 * trans-types.c (gfc_get_derived_type): Remove always-true check.
207
208 2012-10-02 Janus Weil <janus@gcc.gnu.org>
209
210 PR fortran/54778
211 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
212
213 2012-09-30 Janus Weil <janus@gcc.gnu.org>
214
215 PR fortran/54667
216 * intrinsic.texi (C_F_POINTER): Fix description.
217 * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
218 of C_F_POINTER. Modify two error messages. Cleanup.
219
220 2012-09-24 Tobias Burnus <burnus@net-b.de>
221
222 PR fortran/54618
223 PR fortran/54690
224 * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
225 handling for allocatable BT_CLASS.
226
227 2012-09-24 Lawrence Crowl <crowl@google.com>
228
229 * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
230 * target-memory.c (gfc_interpret_logical): Likewise.
231
232 2012-09-23 Tobias Burnus <burnus@net-b.de>
233
234 * parse.c (parse_derived): Don't set attr.alloc_comp
235 for pointer components with allocatable subcomps.
236
237 PR fortran/54599
238 * resolve.c (resolve_fl_namelist): Remove superfluous
239 NULL check.
240 * simplify.c (simplify_min_max): Remove unreachable code.
241 * trans-array.c (gfc_trans_create_temp_array): Change
242 a condition into an assert.
243
244 PR fortran/54618
245 * trans-expr.c (gfc_trans_class_init_assign): Guard
246 re-setting of the _data by gfc_conv_expr_present.
247 (gfc_conv_procedure_call): Fix INTENT(OUT) handling
248 for allocatable BT_CLASS.
249
250 2012-09-22 Thomas König <tkoenig@gcc.gnu.org>
251
252 PR fortran/54599
253 * dependency.c (gfc_dep_compare_expr): Clarify logic,
254 remove dead code.
255
256 2012-09-20 Tobias Burnus <burnus@net-b.de>
257
258 PR fortran/54599
259 * cpp.c (print_line): Properly handle extern C.
260
261 2012-09-20 Martin Jambor <mjambor@suse.cz>
262
263 * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not
264 set and restore current_function_decl.
265 (gfc_init_coarray_decl): Do not set and restore current_function_decl.
266
267 2012-09-17 Tobias Burnus <burnus@net-b.de>
268
269 PR fortran/54608
270 * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
271 Fix handling of BACK=variable.
272
273 2012-09-17 Janus Weil <janus@gcc.gnu.org>
274
275 PR fortran/54285
276 * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
277 as function results.
278 * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
279 result.
280
281 2012-09-17 Tobias Burnus <burnus@net-b.de>
282
283 PR fortran/54603
284 * trans-expr.c (gfc_trans_subcomponent_assign): Handle
285 proc-pointer components.
286
287 2012-09-17 Tobias Burnus <burnus@net-b.de>
288
289 PR fortran/54599
290 * error.c (error_print): Move increment out of the assert.
291 * interface.c (gfc_compare_derived_types): Add assert.
292 (get_expr_storage_size): Remove always-true logical condition.
293 * resolve.c (resolve_allocate_expr): Fix looping logic.
294 * target-memory.c (gfc_target_expr_size): Add assert.
295
296 2012-09-16 Janus Weil <janus@gcc.gnu.org>
297
298 PR fortran/54594
299 * resolve.c (get_checked_tb_operator_target): Add a reference to the
300 relevant quote from the F08 standard.
301
302 2012-09-16 Janus Weil <janus@gcc.gnu.org>
303
304 PR fortran/54594
305 * interface.c (compare_type_rank): Handle CLASS arrays.
306
307 2012-09-16 Janus Weil <janus@gcc.gnu.org>
308
309 PR fortran/54387
310 * expr.c (gfc_check_pointer_assign): Check for result of embracing
311 function.
312
313 2012-09-16 Tobias Burnus <burnus@net-b.de>
314
315 * trans-decl.c (gfc_generate_function_code): Fix
316 gfc_option.coarray check.
317 * trans-stmt.c (compute_inner_temp_size): Fix handling
318 of gfc_option.rtcheck.
319
320 2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
321
322 * symbol.c (gfc_undo_symbols): Correctly undo namelists.
323
324 2012-09-15 Tobias Burnus <burnus@net-b.de>
325
326 * trans-io.c (gfc_trans_transfer): Add an assert.
327
328 2012-09-15 Tobias Burnus <burnus@net-b.de>
329
330 * arith.c (arith_power): Call gfc_free_expr in case of error.
331 * array.c (gfc_match_array_constructor): Initialize variable.
332 (gfc_resolve_character_array_constructor): Remove superfluous check.
333 (gfc_array_dimen_size): Add assert.
334 * check.c (numeric_check): Fix implicit typing.
335 * class.c (gfc_build_class_symbol): Add assert.
336 (finalize_component): Free memory.
337 * dump-parse-tree.c (show_namespace): Add assert.
338 * trans-io.c (transfer_namelist_element, transfer_expr): Avoid
339 memory leakage.
340 (gfc_trans_transfer): Add assert.
341 * trans.c (gfc_trans_runtime_check): Call va_end
342
343 2012-09-15 Tobias Burnus <burnus@net-b.de>
344
345 * match.c (lock_unlock_statement, sync_statement): Fix potential
346 double freeing.
347 (sync_statement): Remove unreachable code.
348 * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
349 (gfc_simplify_repeat): Remove bogus code.
350 * target-memory.h (gfc_target_encode_expr): Update prototype.
351 * target-memory.c (gfc_target_encode_expr, encode_array,
352 encode_derived): Return unsigned HOST_WIDE_INT.
353 (gfc_target_interpret_expr): Add assert.
354 (gfc_merge_initializers): Fix "== 0" check for mpz_t.
355 * symbol.c (gfc_get_typebound_proc): Add assert.
356 (gfc_merge_initializers): Remove unreachable check.
357
358 2012-09-13 Tobias Burnus <burnus@net-b.de>
359
360 PR fortran/54556
361 * resolve.c (resolve_formal_arglist): Allow VALUE arguments
362 with implicit_pure.
363 (gfc_impure_variable): Don't check gfc_pure such that the
364 function also works for gfc_implicit_pure procedures.
365
366 2012-09-12 Tobias Burnus <burnus@net-b.de>
367
368 PR fortran/54225
369 PR fortran/53306
370 * array.c (match_subscript, gfc_match_array_ref): Fix
371 diagnostic of coarray's '*'.
372
373 2012-09-07 Mikael Morin <mikael@gcc.gnu.org>
374
375 PR fortran/54208
376 * simplify.c (simplify_bound_dim): Resolve array spec before
377 proceeding with simplification.
378
379 2012-09-06 Tobias Burnus <burnus@net-b.de>
380
381 PR fortran/54463
382 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
383 call to BLAS if the default-kind has been promoted.
384
385 2012-09-05 Tobias Burnus <burnus@net-b.de>
386
387 PR fortran/54462
388 * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
389
390 2012-09-04 Janus Weil <janus@gcc.gnu.org>
391
392 PR fortran/54435
393 PR fortran/54443
394 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
395 for BT_CLASS.
396
397 2012-09-03 Tobias Burnus <burnus@net-b.de>
398
399 PR fortran/54467
400 * class.c (gfc_find_derived_vtab): Fix disabling of _final
401 by continuing to generate normal type-bound procedures.
402
403 2012-09-03 Tobias Burnus <burnus@net-b.de>
404
405 * class.c (gfc_find_derived_vtab): Disable ABI-breaking
406 generation of the "_final" subroutine for now.
407
408 2012-09-03 Tobias Burnus <burnus@net-b.de>
409
410 * class.c (finalize_component): Fixes to the comment.
411
412 2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
413 Tobias Burnus <burnus@net-b.de>
414
415 PR fortran/37336
416 * gfortran.h (symbol_attribute): Add artificial.
417 * module.c (mio_symbol_attribute): Handle attr.artificial
418 * class.c (gfc_build_class_symbol): Defer creation of the vtab
419 if the DT has finalizers, mark generated symbols as
420 attr.artificial.
421 (has_finalizer_component, finalize_component,
422 finalization_scalarizer, generate_finalization_wrapper):
423 New static functions.
424 (gfc_find_derived_vtab): Add _final component and call
425 generate_finalization_wrapper.
426 * dump-parse-tree.c (show_f2k_derived): Use resolved
427 proc_tree->n.sym rather than unresolved proc_sym.
428 (show_attr): Handle attr.artificial.
429 * resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
430 (resolve_fl_derived): Resolve finalizers before
431 generating the vtab.
432 (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
433 skip artificial symbols.
434 (resolve_fl_derived0): Skip artificial symbols.
435
436 2012-09-02 Tobias Burnus <burnus@net-b.de>
437
438 PR fortran/54426
439 * symbol.c (find_common_symtree): New function.
440 (gfc_undo_symbols): Use it; free common_head if needed.
441
442 2012-08-28 Tobias Burnus <burnus@net-b.de>
443
444 PR fortran/54389
445 * trans-decl.c (gfc_get_extern_function_decl,
446 build_function_decl): Don't mark impure elemental
447 functions as DECL_PURE_P and honour implicit_pure.
448
449 2012-08-28 Tobias Burnus <burnus@net-b.de>
450
451 PR fortran/54382
452 * error.c (show_locus): Avoid out of bound access.
453
454 2012-08-28 Tobias Burnus <burnus@net-b.de>
455
456 PR fortran/54384
457 * decl.c (match_data_constant): Add missing gfc_free_expr.
458 (top_val_list): Remove always-true condition.
459 * data.c (get_array_index, create_character_initializer):
460 Free temporary expressions.
461 (gfc_assign_data_value): Free expression when aborting.
462
463 2012-08-28 Tobias Burnus <burnus@net-b.de>
464
465 PR fortran/54384
466 * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
467
468 2012-08-27 Tobias Burnus <burnus@net-b.de>
469
470 PR fortran/54384
471 * resolve.c (gfc_resolve_character_operator): Free temporary
472 variables.
473 * trans-expr.c (gfc_conv_statement_function): Ditto.
474
475 2012-08-27 Tobias Burnus <burnus@net-b.de>
476
477 PR fortran/54384
478 * dependency.c (check_section_vs_section): Use gfc_free_expr
479 instead of free.
480 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
481 gfc_free_symbol instead of free.
482
483 2012-08-27 Tobias Burnus <burnus@net-b.de>
484
485 PR fortran/54384
486 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
487 and loop.
488
489 2012-08-27 Tobias Burnus <burnus@net-b.de>
490
491 PR fortran/41093
492 * gfortran.h (gfc_common_head): Add "int refs".
493 * match.c (gfc_match_common): Increment refs.
494 * resolve.c (resolve_symbol): Only increment formal_ns->refs
495 if formal_ns is not sym->ns.
496 * symbol.c (gfc_free_symbol): Only free formal_ns if
497 if formal_ns is not sym->ns. Free common_block if refs is one.
498 (gfc_release_symbol): Release formal_ns only if the
499 symbol is not ENTRY of a module.
500 * decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
501 * parse.c (parse_interface): Incement proc_unit->refs++ for
502 proc-pointer result variables.
503 * module.c (mio_symbol): Don't increase sym->refs for its
504 use in sym->formal_ns->proc_name.
505
506 2012-08-27 Tobias Burnus <burnus@net-b.de>
507
508 PR fortran/54370
509 * trans-stmt.c (gfc_trans_do_while): Don't change the logical
510 kind for negation of the condition.
511
512 2012-08-27 Tobias Burnus <burnus@net-b.de>
513
514 * options.c (set_Wall): Don't set for -Wcompare-reals.
515 * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
516 implies -Wcompare-reals.
517
518 2012-08-24 Simon Baldwin <simonb@google.com>
519
520 * lang.opt (-cpp=): Mark flag NoDWARFRecord.
521
522 2012-08-23 Tobias Burnus <burnus@net-b.de>
523
524 PR fortran/54350
525 * trans-array.c (free_ss_info): Free data.array.subscript.
526 (gfc_free_ss): No longer free data.array.subscript.
527 (walk_coarray): New function, moved from trans-intrinsic.c
528 (gfc_conv_expr_descriptor): Walk array descriptor instead
529 of taking passed "ss".
530 (get_array_ctor_all_strlen, gfc_add_loop_ss_code,
531 gfc_conv_array_parameter): Update call and cleanup ss handling.
532 * trans-array.h (gfc_conv_expr_descriptor,
533 gfc_conv_array_parameter): Update prototype.
534 * trans-expr.c (gfc_conv_derived_to_class,
535 conv_isocbinding_procedure, gfc_conv_procedure_call,
536 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
537 gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
538 call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
539 clean up.
540 * trans-intrinsic.c (walk_coarray): Moved to trans-array.c
541 (trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
542 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
543 gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
544 gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
545 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
546 gfc_conv_associated, gfc_conv_intrinsic_loc,
547 conv_intrinsic_move_alloc): Update calls.
548 * trans-io.c (gfc_convert_array_to_string, set_internal_unit,
549 gfc_trans_transfer): Ditto.
550 * trans-stmt.c (gfc_conv_elemental_dependencies,
551 gfc_trans_sync, trans_associate_var,
552 gfc_trans_pointer_assign_need_temp): Ditto.
553
554 2012-08-23 Jakub Jelinek <jakub@redhat.com>
555
556 * trans-decl.c (trans_function_start, generate_coarray_init,
557 create_main_function, gfc_generate_constructors): Call
558 allocate_struct_function instead of init_function_start.
559
560 2012-08-22 Tobias Burnus <burnus@net-b.de>
561
562 * trans-expr.c (gfc_copy_class_to_class,
563 gfc_trans_arrayfunc_assign): Free loop and ss data.
564 * trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
565
566 2012-08-21 Tobias Burnus <burnus@net-b.de>
567
568 * parse.c (parse_contained): Include EXEC_END_PROCEDURE
569 in ns->code to make sure the gfc_code is freed.
570
571 2012-08-20 Tobias Burnus <burnus@net-b.de>
572
573 PR fortran/54301
574 * expr.c (gfc_check_pointer_assign): Warn when a pointer,
575 which is a function result, might outlive its target.
576
577 2012-08-20 Tobias Burnus <burnus@net-b.de>
578
579 PR fortran/54301
580 * expr.c (gfc_check_pointer_assign): Warn when the pointer
581 might outlive its target.
582 * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
583 * options.c (gfc_init_options, set_wall, gfc_handle_option):
584 handle it.
585 * invoke.texi (-Wtarget-lifetime): Document it.
586 (-Wall): Implied it.
587 * lang.opt (-Wtarget-lifetime): New flag.
588
589 2012-08-19 Thomas König <tkoenig@gcc.gnu.org>
590
591 PR fortran/54298
592 * gfortran.h (struct gfc_option_t): Add warn_compare_reals.
593 * lang.opt: Add Wcompare-reals.
594 * invoke.texi: Document -Wcompare-reals.
595 * resolve.c (resolve_operator): If -Wcompare-reals is in effect,
596 warn about equality/inequality comparisions for REAL and COMPLEX.
597 * options.c (gfc_init_options): Set warn_compare_reals.
598 (set_Wall): Include warn_compare_reals in Wall.
599 (gfc_handle_option): Handle Wcompare_reals.
600
601 2012-08-17 Jakub Jelinek <jakub@redhat.com>
602
603 * array.c (gfc_match_array_ref): Fix up memset arguments.
604
605 2012-08-16 Diego Novillo <dnovillo@google.com>
606
607 Revert
608
609 PR bootstrap/54281
610 * gfortran.h: Do not include gmp.h.
611
612 2012-08-16 Diego Novillo <dnovillo@google.com>
613
614 PR bootstrap/54281
615 * gfortran.h: Do not include gmp.h.
616
617 2012-08-15 Janus Weil <janus@gcc.gnu.org>
618
619 PR fortran/54243
620 PR fortran/54244
621 * resolve.c (check_typebound_baseobject): Check for class_ok attribute.
622 (resolve_procedure_interface,resolve_fl_derived0): Copy class_ok
623 attribute.
624
625 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
626
627 PR fortran/47586
628 * trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
629 and typebound functions returning a data pointer.
630
631 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
632
633 * decl.c (match_ppc_decl): Copy the procedure interface's symbol
634 as procedure interface's result.
635
636 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
637
638 * trans-expr.c (gfc_trans_scalar_assign): Rename argument,
639 extend comment.
640
641 2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
642
643 * gfortran.h (gfc_get_proc_ptr_comp): New prototype.
644 (gfc_is_proc_ptr_comp): Update prototype.
645 * expr.c (gfc_get_proc_ptr_comp): New function based on the old
646 gfc_is_proc_ptr_comp.
647 (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
648 (gfc_specification_expr, gfc_check_pointer_assign): Use
649 gfc_get_proc_ptr_comp.
650 * trans-array.c (gfc_walk_function_expr): Likewise.
651 * resolve.c (resolve_structure_cons, update_ppc_arglist,
652 resolve_ppc_call, resolve_expr_ppc): Likewise.
653 (resolve_function): Update call to gfc_is_proc_ptr_comp.
654 * dump-parse-tree.c (show_expr): Likewise.
655 * interface.c (compare_actual_formal): Likewise.
656 * match.c (gfc_match_pointer_assignment): Likewise.
657 * primary.c (gfc_match_varspec): Likewise.
658 * trans-io.c (gfc_trans_transfer): Likewise.
659 * trans-expr.c (gfc_conv_variable, conv_function_val,
660 conv_isocbinding_procedure, gfc_conv_procedure_call,
661 gfc_trans_pointer_assignment): Likewise.
662 (gfc_conv_procedure_call, gfc_trans_array_func_assign):
663 Use gfc_get_proc_ptr_comp.
664
665 2012-08-14 Tobias Burnus <burnus@net-b.de>
666
667 PR fortran/40881
668 * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
669 when the error/warning has been printed.
670 * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
671 * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
672 * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
673 (parse_executable): Add obsolescence check for DATA.
674 * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
675 * symbol.c (gfc_define_st_label, gfc_reference_st_label):
676 Add obsolescence diagnostics.
677 * trans-stmt.c (gfc_trans_label_assign): Handle ST_LABEL_DO_TARGET.
678
679 2012-08-14 Tobias Burnus <burnus@net-b.de>
680
681 PR fortran/54234
682 * check.c (gfc_check_cmplx): Add -Wconversion warning
683 when converting higher-precision REAL to default-precision
684 CMPLX without kind= parameter.
685
686 2012-08-12 Tobias Burnus <burnus@net-b.de>
687
688 PR fortran/54221
689 * trans-decl.c (gfc_finish_var_decl, build_function_decl):
690 Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.
691
692 2012-08-09 Tobias Burnus <burnus@net-b.de>
693
694 PR fortran/54199
695 * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
696 for internal procedures.
697
698 2012-08-06 Janus Weil <janus@gcc.gnu.org>
699
700 PR fortran/35831
701 * interface.c (check_result_characteristics): New function, which checks
702 the characteristics of function results.
703 (gfc_compare_interfaces,gfc_check_typebound_override): Call it.
704
705 2012-08-02 Thomas König <tkoenig@gcc.gnu.org>
706
707 PR fortran/54033
708 * scanner.c (add_path_to_list): New argument warn. Don't
709 warn if it is true.
710 (gfc_add_include_path): Warn if directory is missing.
711 (gfc_add_intrinsic_modules_path): Do not warn if directory
712 is missing.
713 * optinons.c (gfc_handle_option): Do not add directory
714 for intrinsic modules to normal include path.
715
716 2012-08-03 Mikael Morin <mikael@gcc.gnu.org>
717
718 PR fortran/54166
719 * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
720
721 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
722
723 PR fortran/48820
724 * trans-array.c (gfc_conv_ss_startstride): Set the intrinsic
725 result's lower and upper bounds according to the rank.
726 (set_loop_bounds): Set the loop upper bound in the intrinsic case.
727
728 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
729
730 * trans-array.c (set_loop_bounds): Allow non-array-section to be
731 chosen using the stride and lower bound criteria.
732
733 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
734
735 * trans-array.c (set_loop_bounds): Remove useless dimension check.
736 Don't update loopspec if it would loose the wanted stride criterion.
737
738 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
739
740 * trans-array.h (gfc_conv_descriptor_rank): New prototype.
741 * trans-array.c (gfc_conv_descriptor_rank): New function moved and
742 renamed ...
743 * trans-intrinsic.c (get_rank_from_desc): ... from this one.
744 (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
745 gfc_conv_associated): Also rename function calls.
746
747 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
748
749 * iresolve.c (resolve_bound, gfc_resolve_shape):
750 Don't set the shape for assumed rank arrays.
751 * simplify.c (gfc_simplify_shape): Don't try to simplify if the
752 argument is assumed rank.
753
754 2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
755
756 * array.c (gfc_copy_array_ref): Don't copy the offset field.
757 * expr.c (find_array_section): Ignore the offset field.
758 * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
759 any interface mapping to the offset field.
760 * gfortran.h (struct gfc_array_ref): Remove the offset field.
761
762 2012-08-02 Janus Weil <janus@gcc.gnu.org>
763
764 PR fortran/54147
765 * resolve.c (check_proc_interface): New routine for PROCEDURE interface
766 checks.
767 (resolve_procedure_interface,resolve_typebound_procedure,
768 resolve_fl_derived0): Call it.
769
770 2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
771
772 PR fortran/54033
773 * scanner.c (add_path_to_list): Emit warning if an error occurs
774 for an include path, if it is not present or if it is not a
775 directory. Do not add the path in these cases.
776
777 2012-07-31 Janus Weil <janus@gcc.gnu.org>
778
779 PR fortran/42418
780 * decl.c (match_procedure_interface): Move some checks to
781 'resolve_procedure_interface'. Set flavor if appropriate.
782 * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
783 * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
784 identify a procedure as being non-intrinsic.
785 * resolve.c (resolve_procedure_interface): Checks moved here from
786 'match_procedure_interface'. Minor cleanup.
787 (resolve_formal_arglist,resolve_symbol): Cleanup of
788 'resolve_procedure_interface'
789 (resolve_actual_arglist,is_external_proc): Cleanup of
790 'gfc_is_intrinsic'.
791
792 2012-07-31 Janus Weil <janus@gcc.gnu.org>
793
794 PR fortran/54134
795 * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
796
797 2012-07-31 Tobias Burnus <burnus@net-b.de>
798
799 * interface.c (gfc_procedure_use): Return gfc_try instead of void.
800 * gfortran.h (gfc_procedure_use): Update prototype.
801 * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
802 procedures for c_funloc for TS29113.
803 * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
804 diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
805
806 2012-07-30 Janus Weil <janus@gcc.gnu.org>
807
808 PR fortran/51081
809 * gfortran.h (gfc_resolve_intrinsic): Add prototype.
810 * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
811 Check for invalid intrinsics.
812 * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
813 Set procedure flavor if appropriate.
814 * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
815 (resolve_procedure_interface,resolve_procedure_expression,
816 resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
817
818 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
819
820 PR fortran/44354
821 * trans-array.c (gfc_trans_array_constructor_value):
822 Evaluate the iteration bounds before the inner variable shadows
823 the outer.
824
825 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
826
827 PR fortran/44354
828 * array.c (sought_symbol): New variable.
829 (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
830 (resolve_array_list): Check for references to the induction
831 variable in the iteration bounds and issue a diagnostic if some
832 are found.
833
834 2012-07-26 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
835 Tobias Burnus <burnus@net-b.de>
836
837 * module.c (mio_array_spec): Don't read as->lower for
838 assumed-rank arrays.
839
840 2012-07-25 Tobias Burnus <burnus@net-b.de>
841
842 * trans-types.c (gfc_real16_is_float128): Fix spelling
843 in a comment.
844 * trans.h (struct gfc_array_info): Ditto.
845 * gfortran.h (gfc_expr): Ditto.
846 * simplify.c (gfc_count): Ditto.
847 * trans-expr.c (gfc_copy_class_to_class,
848 conv_parent_component_references,
849 gfc_trans_pointer_assignment): Ditto.
850 * expr.c (check_pointer_assign): Fix diagnostic spelling.
851 * interface.c (compare_parameter): Ditto.
852 * parse.c (use_modules, parse_associate): Ditto.
853 * decl.c (match_char_length): Fix spelling of the
854 an function argument.
855
856 2012-07-21 Tobias Burnus <burnus@net-b.de>
857
858 * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
859 * intrinsic.texi (ISO_C_BINDING): Document it.
860
861 2012-07-21 Tobias Burnus <burnus@net-b.de>
862
863 PR fortran/48820
864 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
865 lbound/ubound with dim= for assumed-rank arrays.
866 * array.c (gfc_set_array_spec): Reject coarrays with
867 assumed shape.
868 * decl.c (merge_array_spec): Ditto. Return gfc_try.
869 (match_attr_spec, match_attr_spec): Update call.
870
871 2012-07-21 Tobias Burnus <burnus@net-b.de>
872
873 * resolve.c (resolve_formal_arglist): Put variable
874 declaration before the first assignment.
875
876 2012-07-21 Tobias Burnus <burnus@net-b.de>
877
878 * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
879 to class_array_data_assign.
880
881 2012-07-20 Tobias Burnus <burnus@net-b.de>
882
883 * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
884 with -std=f2008ts.
885
886 2012-07-20 Tobias Burnus <burnus@net-b.de>
887
888 PR fortran/48820
889 * array.c (match_array_element_spec, gfc_match_array_spec,
890 spec_size, gfc_array_dimen_size): Add support for
891 assumed-rank arrays.
892 * check.c (dim_rank_check): Ditto.
893 * class.c (gfc_add_component_ref): Ditto.
894 (gfc_build_class_symbol): Regard assumed-rank arrays
895 as having GFC_MAX_DIMENSIONS. And build extra class
896 container for a scalar pointer class.
897 * decl.c (merge_array_spec): Add assert.
898 * dump-parse-tree.c (show_array_spec): Add support for
899 assumed-rank arrays.
900 * expr.c (gfc_is_simply_contiguous): Ditto.
901 * gfortran.h (array_type): Ditto.
902 (gfc_array_spec, gfc_expr): Add comment to "rank" field.
903 * interface.c (compare_type_rank, argument_rank_mismatch,
904 compare_parameter, gfc_procedure_use): Ditto.
905 (compare_actual_formal): Fix NULL() to optional-dummy
906 handling for polymorphic dummies.
907 * module.c (mio_typespec): Add support for
908 assumed-rank arrays.
909 * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
910 resolve_elemental_actual, resolve_global_procedure,
911 expression_shape, resolve_variable, update_ppc_arglist,
912 check_typebound_baseobject, gfc_resolve_expr,
913 resolve_fl_var_and_proc, gfc_resolve_finalizers,
914 resolve_typebound_procedure, resolve_symbol): Ditto.
915 (assumed_type_expr_allowed): Remove static variable.
916 (actual_arg, first_actual_arg): New static variables.
917 * simplify.c (simplify_bound, gfc_simplify_range): Add
918 support for assumed-rank arrays.
919 * trans-array.c (gfc_conv_array_parameter): Ditto.
920 (gfc_get_descriptor_dimension): New function, which returns
921 the descriptor.
922 (gfc_conv_descriptor_dimension): Use it.
923 (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
924 Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
925 * trans-array.h (gfc_get_descriptor_dimension): New prototype.
926 * trans-decl. (gfc_build_dummy_array_decl,
927 gfc_trans_deferred_vars, add_argument_checking): Add
928 support for assumed-rank arrays.
929 * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
930 gfc_conv_procedure_call): Ditto.
931 (get_scalar_to_descriptor_type, class_array_data_assign,
932 conv_scalar_to_descriptor): New static functions.
933 (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
934 them.
935 * trans-intrinsic.c (get_rank_from_desc): New function.
936 (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
937 * trans-types.c (gfc_array_descriptor_base_caf,
938 gfc_array_descriptor_base): Make space for scalar array.
939 (gfc_is_nodesc_array, gfc_is_nodesc_array,
940 gfc_build_array_type, gfc_get_array_descriptor_base): Add
941 support for assumed-rank arrays.
942 * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
943 GFC_ARRAY_ASSUMED_RANK_CONT.
944
945 2012-07-19 Tobias Burnus <burnus@net-b.de>
946
947 * trans-expr.c (gfc_conv_procedure_call): Fix handling
948 of polymorphic arguments.
949 * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
950 assumed-shape arrays as such.
951
952 2012-07-19 Tobias Burnus <burnus@net-b.de>
953
954 * interface.c (compare_parameter, compare_actual_formal): Fix
955 handling of polymorphic arguments.
956
957 2012-07-17 Janus Weil <janus@gcc.gnu.org>
958
959 PR fortran/51081
960 * error.c (gfc_notify_std): Automatically print the relevant Fortran
961 standard version.
962 * arith.c (arith_power): Remove explicit standard reference string.
963 * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
964 * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
965 gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
966 gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
967 gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
968 gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
969 gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
970 gfc_check_verify): Ditto.
971 * data.c (gfc_assign_data_value): Ditto.
972 * decl.c (var_element, char_len_param_value, match_char_length,
973 gfc_verify_c_interop_param, match_pointer_init, variable_decl,
974 gfc_match_decl_type_spec, gfc_match_import, match_attr_spec,
975 gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
976 match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
977 gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
978 gfc_match_protected, gfc_match_value, gfc_match_volatile,
979 gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
980 gfc_match_enum, match_procedure_in_type): Ditto.
981 * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
982 Ditto.
983 * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
984 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
985 * io.c (format_lex, resolve_tag_format, resolve_tag,
986 compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
987 gfc_resolve_dt, gfc_match_wait): Ditto.
988 * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
989 gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
990 gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
991 gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
992 * module.c (gfc_match_use, gfc_use_module): Ditto.
993 * parse.c (parse_derived_contains, parse_block_construct,
994 parse_associate, parse_contained): Ditto.
995 * primary.c (match_hollerith_constant, match_boz_constant,
996 match_real_constant, match_sym_complex_part, match_arg_list_function,
997 build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
998 * resolve.c (resolve_formal_arglist, resolve_entries,
999 resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
1000 gfc_resolve_iterator_expr, resolve_ordinary_assign,
1001 resolve_fl_var_and_proc, resolve_fl_variable_derived,
1002 resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
1003 resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
1004 * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
1005 gfc_add_extension, gfc_check_symbol_typed): Ditto.
1006
1007 2012-07-17 Tobias Burnus <burnus@net-b.de>
1008
1009 PR fortran/53985
1010 * decl.c (gfc_verify_c_interop_param): Make warning conditional
1011 on -Wc-binding-type works and improve the wording.
1012
1013 2012-07-17 Tobias Burnus <burnus@net-b.de>
1014
1015 PR fortran/52101
1016 * decl.c (match_char_length): Extra argument, show obsolenscent
1017 warning only if *length is used after the typename.
1018 (variable_decl, gfc_match_char_spec): Update call
1019
1020 2012-07-17 Tobias Burnus <burnus@net-b.de>
1021 Steven G. Kargl <kargl@gcc.gnu.org>
1022
1023 PR fortran/49265
1024 * decl.c (match_procedure_in_interface): Support "::" for
1025 Fortran 2008 and later.
1026
1027 2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
1028
1029 PR fortran/53824
1030 * resolve.c (resolve_allocate_deallocate): If both
1031 start indices are NULL, skip the test for equality.
1032
1033 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1034
1035 * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
1036 * Make-lang.in: Fix dependencies.
1037
1038 2012-07-16 Janus Weil <janus@gcc.gnu.org>
1039
1040 PR fortran/53956
1041 * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
1042 prototypes.
1043 * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
1044 of dummy procedures.
1045 (gfc_copy_formal_args_ppc): Ditto.
1046 * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
1047 gfc_copy_formal_args.
1048 (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
1049
1050 2012-07-12 Tobias Burnus <burnus@net-b.de>
1051
1052 * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
1053 inline.
1054
1055 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1056
1057 * trans.c: Do not include defaults.h.
1058 * trans-intrinsic.c: Likewise.
1059
1060 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1061
1062 * gfortran.h: Do not include coretypes.h here.
1063 Make it an error to include this before coretypes.h
1064 * openmp.c: Include coretypes.h.
1065 * interface.c: Likewise.
1066 * intrinsic.c: Likewise.
1067 * symbol.c: Likewise.
1068 * class.c: Likewise.
1069 * decl.c: Likewise.
1070 * matchexp.c: Likewise.
1071 * dump-parse-tree.c: Likewise.
1072 * array.c: Likewise.
1073 * constructor.c: Likewise.
1074 * error.c: Likewise.
1075 * data.c: Likewise.
1076 * expr.c: Likewise.
1077 * module.c: Likewise.
1078 * scanner.c: Likewise.
1079 * bbt.c: Likewise.
1080 * io.c: Likewise.
1081 * frontend-passes.c: Likewise.
1082 * resolve.c: Likewise.
1083 * st.c: Likewise.
1084 * target-memory.c: Likewise.
1085 * match.c: Likewise.
1086 * arith.c: Likewise.
1087 * parse.c: Likewise.
1088 * check.c: Likewise.
1089 * dependency.c: Likewise.
1090 * primary.c: Likewise.
1091 * misc.c: Likewise.
1092 * simplify.c: Likewise.
1093
1094 2012-07-05 Mikael Morin <mikael@gcc.gnu.org>
1095
1096 PR fortran/53732
1097 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
1098 handling nested loop(s) if the subscript flag is true.
1099
1100 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
1101
1102 PR fortran/53449
1103 * parse.c (gfc_parse_file): Initialize errors_before.
1104
1105 2012-06-27 Janus Weil <janus@gcc.gnu.org>
1106
1107 PR fortran/41951
1108 PR fortran/49591
1109 * interface.c (check_new_interface): Rename, add 'loc' argument,
1110 make non-static.
1111 (gfc_add_interface): Rename 'check_new_interface'
1112 * gfortran.h (gfc_check_new_interface): Add prototype.
1113 * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
1114 targets to non-typebound operator list.
1115
1116 2012-06-22 Janus Weil <janus@gcc.gnu.org>
1117
1118 PR fortran/47710
1119 PR fortran/53328
1120 * interface.c (count_types_test, generic_correspondence,
1121 gfc_compare_interfaces): Ignore PASS arguments.
1122 (check_interface1, compare_parameter): Pass NULL arguments to
1123 gfc_compare_interfaces.
1124 * gfortran.h (gfc_compare_interfaces): Modified prototype.
1125 * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
1126 gfc_compare_interfaces.
1127 * resolve.c (resolve_structure_cons): Ditto.
1128 (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
1129 to gfc_compare_interfaces.
1130
1131 2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
1132
1133 PR fortran/39654
1134 * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
1135 library function.
1136
1137 2012-06-18 Tobias Burnus <burnus@net-b.de>
1138
1139 * intrinsic.h (gfc_resolve_rank): New prototype.
1140 * intrinsic.c (add_functions): Use gfc_resolve_rank.
1141 * iresolve.c (add_functions): New function.
1142 * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
1143 (gfc_conv_intrinsic_function): Call it.
1144
1145 2012-06-18 Tobias Burnus <burnus@net-b.de>
1146
1147 PR fortran/53692
1148 * trans-array.c (set_loop_bounds): Don't scalarize via absent
1149 optional arrays.
1150 * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
1151 a warning.
1152
1153 2012-06-18 Tobias Burnus <burnus@net-b.de>
1154
1155 PR fortran/53526
1156 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
1157
1158 2012-06-18 Tobias Burnus <burnus@net-b.de>
1159
1160 PR fortran/53526
1161 * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
1162 and those with different corank.
1163
1164 2012-06-17 Tobias Burnus <burnus@net-b.de>
1165
1166 PR fortran/53691
1167 PR fortran/53685
1168 * check.c (gfc_calculate_transfer_sizes): Return if
1169 SIZE= is not constant or source-size cannot be determined.
1170
1171 2012-06-16 Tobias Burnus <burnus@net-b.de>
1172
1173 PR fortran/53642
1174 PR fortran/45170
1175 * frontend-passes.c (optimize_assignment): Don't remove RHS's
1176 trim when assigning to a deferred-length string.
1177 * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
1178 length is evaluated before the deferred-length LHS is reallocated.
1179
1180 2012-06-13 Tobias Burnus <burnus@net-b.de>
1181
1182 PR fortran/53643
1183 * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
1184 * trans-array.c (structure_alloc_comps): Don't loop for
1185 scalar coarrays.
1186
1187 2012-06-13 Tobias Burnus <burnus@net-b.de>
1188
1189 PR fortran/53597
1190 * decl.c (match_attr_spec): Only mark module variables
1191 as SAVE_IMPLICIT for Fortran 2008 and later.
1192
1193 2012-06-08 Janus Weil <janus@gcc.gnu.org>
1194
1195 PR fortran/52552
1196 * match.c (gfc_match_allocate): Modify order of checks. Change wording
1197 of error message. Remove FIXME note.
1198 * resolve.c (resolve_allocate_expr): Add a comment.
1199
1200 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1201
1202 PR fortran/52861
1203 * frontend-passes.c (optimize_assignment): Don't set the
1204 length of an empty string for deferred-length character
1205 variables.
1206
1207 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
1208
1209 PR fortran/52861
1210 * frontend-passes.c (empty_string): Add prototype.
1211 (optimize_assignment): Set the length of an empty string
1212 constant to zero.
1213
1214 2012-06-04 Tobias Burnus <burnus@net-b.de>
1215
1216 PR fortran/50619
1217 * resolve.c (build_default_init_expr): Don't initialize
1218 ASSOCIATE names.
1219
1220 2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1221 Tobias Burnus <burnus@net-b.de>
1222
1223 PR fortran/48831
1224 * gfortran.h (gfc_check_init_expr): Add prototype declaration
1225 of function.
1226 * check.c (kind_check): Change if condition to use
1227 to gfc_check_init_expr.
1228 * expr.c (check_init_expr): Remove forward declaration
1229 and static keyword. Change name in gfc_check_init_expr.
1230 (scalarize_intrinsic_call, check_init_expr_arguments,
1231 check_inquiry, check_conversion, gfc_reduce_init_expr): Update
1232 call to gfc_check_init_expr.
1233
1234 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1235
1236 * trans-common.c: Do not include output.h.
1237 * trans-decl.c: Likewise.
1238
1239 2012-05-31 Tobias Burnus <burnus@net-b.de>
1240
1241 PR fortran/53521
1242 * trans.c (gfc_deallocate_scalar_with_status): Properly
1243 handle the case size == 0.
1244
1245 2012-05-30 Tobias Burnus <burnus@net-b.de>
1246
1247 PR c/53502
1248 * decl.c (match_attr_spec): Remove "typedef".
1249
1250 2012-05-30 Tobias Burnus <burnus@net-b.de>
1251
1252 * decl.c: Fix comment typos.
1253 * expr.c: Ditto.
1254 * frontend-passes.c: Ditto.
1255 * match.c: Ditto.
1256 * resolve.c: Ditto.
1257 * trans-array.c: Ditto.
1258 * trans-common.c: Ditto.
1259 * trans-intrinsic.c: Ditto.
1260 * trans-types.c: Ditto.
1261
1262 2012-05-23 Tobias Burnus <burnus@net-b.de>
1263
1264 PR fortran/51055
1265 PR fortran/45170
1266 * match.c (gfc_match_allocate): Set length_from_typespec
1267 for characters.
1268 * resolve.c (resolve_charlen): If set, don't check whether
1269 the len is a specification expression.
1270
1271 2012-05-22 Tobias Burnus <burnus@net-b.de>
1272
1273 PR fortran/53389
1274 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
1275 ss->is_alloc_lhs is set.
1276
1277 2012-05-22 Dodji Seketeli <dodji@redhat.com>
1278
1279 PR c++/53322
1280 * f95-lang.c (gfc_init_builtin_functions): Remove the unused
1281 typedef builtin_type.
1282
1283 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1284
1285 PR fortran/52428
1286 * gfortran.texi: Update _gfortran_set_options documentation.
1287 * invoke.texi: Remove runtime behavior description of
1288 -fno-range-check.
1289 * trans-decl.c (create_main_function): Don't pass the range-check
1290 setting to the library.
1291
1292 2012-05-14 Tobias Burnus <burnus@net-b.de>
1293
1294 PR fortran/49110
1295 PR fortran/51055
1296 PR fortran/53329
1297 * trans-expr.c (gfc_trans_assignment_1): Fix allocation
1298 handling for assignment of function results to allocatable
1299 deferred-length strings.
1300 * trans-decl.c (gfc_create_string_length): For deferred-length
1301 module variables, include module name in the assembler name.
1302 (gfc_get_symbol_decl): Don't override the assembler name.
1303
1304 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
1305
1306 PR 53063
1307 * options.c (gfc_handle_option): Call lang-specific generated function.
1308
1309 2012-05-13 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1310 Tobias Burnus <burnus@net-b.de>
1311
1312 PR fortran/52158
1313 PR fortran/45170
1314 PR fortran/49430
1315 * resolve.c (resolve_fl_derived0): Deferred character length
1316 procedure components are supported.
1317 * trans-expr.c (gfc_conv_procedure_call): Handle TBP with
1318 deferred-length results.
1319 (gfc_string_to_single_character): Add a new check to prevent
1320 NULL read.
1321 (gfc_conv_procedure_call): Remove unuseful checks on
1322 symbol's attributes. Add new checks to prevent NULL read on
1323 string length.
1324
1325 2012-05-12 Tobias Burnus <burnus@net-b.de>
1326
1327 PR fortran/49110
1328 PR fortran/52843
1329 * resolve.c (resolve_fl_procedure): Don't regard
1330 character(len=:) as character(*) in the diagnostic.
1331
1332 2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1333
1334 PR fortran/52537
1335 * frontend-passes.c (optimize_op): Change
1336 old-style comparison operators to new-style, simplify
1337 switch as a result.
1338 (empty_string): New function.
1339 (get_len_trim_call): New function.
1340 (optimize_comparison): If comparing to an empty string,
1341 use comparison of len_trim to zero.
1342 Use new-style comparison operators only.
1343 (optimize_trim): Use get_len_trim_call.
1344
1345 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
1346
1347 PR 53063
1348 * options.c: Include diagnostics.h instead of
1349 diagnostics-core.h.
1350 (set_Wall): Do not see warn_unused here.
1351 (gfc_handle_option): Set it here using handle_generated_option.
1352
1353 2012-05-08 Jan Hubicka <jh@suse.cz>
1354
1355 * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
1356 * trans-decl.c (gfc_finish_cray_pointee): Likewise.
1357
1358 2012-05-07 Tobias Burnus <burnus@net-b.de>
1359
1360 PR fortran/53255
1361 * resolve.c (resolve_typebound_static): Fix handling
1362 of overridden specific to generic operator.
1363
1364 2012-05-06 Tobias Burnus <burnus@net-b.de>
1365
1366 PR fortran/41587
1367 * decl.c (build_struct): Don't ignore FAILED status.
1368
1369 2012-05-05 Paul Thomas <pault@gcc.gnu.org>
1370
1371 PR fortran/41600
1372 * trans-array.c (build_array_ref): New static function.
1373 (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
1374 * trans-expr.c (gfc_get_vptr_from_expr): New function.
1375 (gfc_conv_derived_to_class): Add a new argument for a caller
1376 supplied vptr and use it if it is not NULL.
1377 (gfc_conv_procedure_call): Add NULL to call to above.
1378 symbol.c (gfc_is_associate_pointer): Return true if symbol is
1379 a class object.
1380 * trans-stmt.c (trans_associate_var): Handle class associate-
1381 names.
1382 * expr.c (gfc_get_variable_expr): Supply the array-spec if
1383 possible.
1384 * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
1385 for class types.
1386 * trans.h : Add prototypes for gfc_get_vptr_from_expr and
1387 gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
1388 * resolve.c (resolve_variable): For class arrays, ensure that
1389 the target expression has all the necessary _data references.
1390 (resolve_assoc_var): Throw a "not yet implemented" error for
1391 class array selectors that need a temporary.
1392 * match.c (copy_ts_from_selector_to_associate,
1393 select_derived_set_tmp, select_class_set_tmp): New functions.
1394 (select_type_set_tmp): Call one of last two new functions.
1395 (gfc_match_select_type): Copy_ts_from_selector_to_associate is
1396 called if associate-name is typed.
1397
1398 PR fortran/53191
1399 * resolve.c (resolve_ref): C614 applied to class expressions.
1400
1401 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1402
1403 PR fortran/49010
1404 PR fortran/24518
1405 * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
1406 * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
1407 (gfc_simplify_modulo): Likewise, use copysign to fix the result if
1408 zero.
1409 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
1410 builtin_fmod is always available. For modulo, call copysign to fix
1411 the result when signed zeros are enabled.
1412
1413 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
1414
1415 * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
1416 algorithm for choosing temp directory.
1417
1418 2012-05-04 Tobias Burnus <burnus@net-b.de>
1419
1420 PR fortran/53175
1421 * resolve.c (resolve_variable): Set public_used
1422 if a private module variable is used in a (public)
1423 specification expression.
1424 * trans-decl.c (gfc_finish_var_decl): Mark those
1425 TREE_PUBLIC.
1426
1427 2012-05-04 Tobias Burnus <burnus@net-b.de>
1428
1429 PR fortran/53111
1430 * resolve.c (resolve_fl_derived): Fix -std=f95
1431 diagnostic for generic vs. DT names.
1432
1433 2012-05-03 Tobias Burnus <burnus@net-b.de>
1434
1435 PR fortran/52864
1436 * interface.c (compare_parameter_intent): Remove.
1437 (check_intents): Remove call, handle CLASS pointer.
1438 (compare_actual_formal): Handle CLASS pointer.
1439
1440 2012-04-30 Jan Hubicka <jh@suse.cz>
1441
1442 * f95-lang.c (gfc_finish): Update comments.
1443
1444 2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1445
1446 PR fortran/53148
1447 * frontend-passes.c (create_var): If the statement has a label,
1448 put the label around the block.
1449
1450 2012-04-25 Tobias Burnus <burnus@net-b.de>
1451
1452 PR fortran/52196
1453 * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
1454 * gfortran.h (gfc_option_t): Add them.
1455 * options.c (gfc_init_options, gfc_post_options,
1456 gfc_handle_option): Handle them.
1457 * invoke.texi: Document them.
1458 * trans-expr.c (realloc_lhs_warning): New function.
1459 (gfc_trans_arrayfunc_assign,
1460 alloc_scalar_allocatable_for_assignment,
1461 gfc_trans_assignment_1): Use it.
1462
1463 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
1464
1465 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
1466 with NULL_TREE type instead of void_type_node.
1467 * trans-io.c (io_result): Likewise.
1468 * trans-stmt.c (gfc_trans_integer_select,
1469 gfc_trans_character_select): Likewise.
1470
1471 2012-04-16 Tobias Burnus <burnus@net-b.de>
1472
1473 PR fortran/52864
1474 * expr.c (gfc_check_vardef_context): Fix assignment check for
1475 pointer components.
1476
1477 2012-04-16 Janus Weil <janus@gcc.gnu.org>
1478
1479 PR fortran/52968
1480 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
1481 namespace is present.
1482
1483 2012-04-15 Janus Weil <janus@gcc.gnu.org>
1484
1485 PR fortran/51082
1486 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
1487 simple function call (or a more involved PPC reference).
1488
1489 2012-04-15 Tobias Burnus <burnus@net-b.de>
1490
1491 PR fortran/52916
1492 PR fortran/40973
1493 * gfortran.h (symbol_attribute): Add public_used.
1494 * interface.c (check_sym_interfaces, check_uop_interfaces,
1495 gfc_check_interfaces): Set it.
1496 * resolve.c (resolve_typebound_procedure): Ditto.
1497 * trans-decl.c (build_function_decl): Use it.
1498
1499 2012-04-11 Tobias Burnus <burnus@net-b.de>
1500
1501 PR fortran/52729
1502 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
1503
1504 2012-04-08 Tobias Burnus <burnus@net-b.de>
1505
1506 PR fortran/52751
1507 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
1508 for PRIVATE module variables without C-binding label.
1509
1510 PR fortran/40973
1511 * trans-decl.c (build_function_decl): Ditto for procedures.
1512
1513 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1514
1515 PR fortran/52893
1516 * frontend-passes.c: Keep track of wether we are in an implicit
1517 DO loop; do not do function elimination if we are.
1518
1519 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1520
1521 PR fortran/52668
1522 * module.c: Only mark symbols as use_only if they have been
1523 imported via an only list.
1524
1525 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
1526 Tobias Burnus <burnus@gcc.gnu.org>
1527
1528 PR fortran/52652
1529 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
1530 "not.. or" to "neither.. nor".
1531 * parse.c (decode_specification_statement): Correct error in
1532 chpice of matching function for "allocatable".
1533
1534 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
1535
1536 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
1537
1538 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1539
1540 PR fortran/52559
1541 * error.c (gfc_widechar_display_length): Consider tabs as
1542 one character wide, as they're displayed as spaces.
1543 (show_locus): Move tab handling to...
1544 (print_wide_char_into_buffer): ... here.
1545
1546 2012-03-17 Tobias Burnus <burnus@net-b.de>
1547
1548 PR fortran/52585
1549 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
1550 procpointer dummy arguments.
1551
1552 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
1553
1554 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
1555 for __float128.
1556
1557 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
1558
1559 * f95-lang.c (gfc_init_builtin_functions): Initialize
1560 BUILT_IN_IROUND.
1561 * mathbuiltins.def: Add IROUND.
1562 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
1563 type size matches.
1564 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
1565
1566 2012-03-12 Richard Guenther <rguenther@suse.de>
1567
1568 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
1569
1570 2012-03-12 Tobias Burnus <burnus@net-b.de>
1571
1572 PR fortran/52542
1573 * decl.c (match_procedure_decl): If the interface
1574 is bind(C), the procedure is as well.
1575
1576 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
1577
1578 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
1579
1580 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
1581
1582 * Make-lang.in (convert.o): Depend on convert.h.
1583 * convert.c: Header and comment cleanups.
1584 (gfc_thruthvalue_conversion): Rename static function
1585 to truthvalue_conversion. Do not use 'internal_error' from here,
1586 use 'gcc_unreachable' instead.
1587 (convert): Do not use 'error' for conversions to void, use
1588 'gcc_unreachable' instead. Likewise for conversions to non-scalar
1589 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
1590 Clean up #if 0 code.
1591
1592 2012-03-08 Tobias Burnus <burnus@net-b.de>
1593
1594 PR fortran/52469
1595 * trans-types.c (gfc_get_function_type): Handle backend_decl
1596 of a procedure pointer.
1597
1598 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
1599
1600 * f95-lang.c (yyerror, yylex): Remove.
1601 (clear_binding_stack): Remove, fold into its only user.
1602 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
1603 (ridpointers): Remove.
1604 (gfc_eh_initialized_p): Make static.
1605 (gfc_truthvalue_conversion): Move to convert.c.
1606 (gfc_be_parse_file): Clear binding level stack when done.
1607 (gfc_print_identifier): Remove.
1608 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
1609 (poplevel): Remove unused 'reverse' argument. Update all callers.
1610 (ggc_p): Remove.
1611 (gfc_builtin_function): Make static. Do not attempt to make RTL for
1612 builtin functions.
1613 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
1614 and made static.
1615 * trans.h (pushlevel, poplevel): Adjust prototypes.
1616 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
1617 * trans-openmp.c: Update calls to pushlevel and poplevel.
1618 * trans.c: Likewise.
1619 * trans-decl.c: Likewise.
1620
1621 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1622
1623 PR fortran/50981
1624 * gfortran.h (gfc_is_class_container_ref): New prototype.
1625 * class.c (gfc_is_class_container_ref): New function.
1626 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
1627 reference to polymorphic actual arguments.
1628
1629 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1630
1631 PR fortran/50981
1632 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
1633 Handle the case of unallocated arrays passed to elemental procedures.
1634
1635 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
1636
1637 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
1638 the data::scalar subcomponent to the toplevel.
1639 * trans-expr.c (gfc_conv_expr): Update component reference.
1640 * trans-array.c (gfc_add_loop_ss_code): Ditto.
1641 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
1642 the field out of the scalar-only block.
1643
1644 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1645
1646 PR fortran/36160
1647 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
1648 New functions.
1649 (print_wide_char_into_buffer): Return length written.
1650 (show_locus): Fix locus displayed when wide characters are present.
1651
1652 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1653
1654 * module.c (gfc_use_module): Improve error message some more.
1655
1656 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1657
1658 PR fortran/52313
1659 * module.c (gfc_use_module): Improve error messages.
1660
1661 2012-03-03 Tobias Burnus <burnus@net-b.de>
1662
1663 PR fortran/48820
1664 * resolve.c (resolve_actual_arglist): Properly reset
1665 assumed_type_expr_allowed.
1666
1667 2012-03-03 Tobias Burnus <burnus@net-b.de>
1668
1669 * lang.opt (Wc-binding-type): New flag.
1670 * options.c (gfc_init_options, gfc_handle_option): Handle it.
1671 * invoke.texi (Wc-binding-type): Document it.
1672 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
1673 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
1674 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
1675 Ditto.
1676
1677 2012-03-03 Tobias Burnus <burnus@net-b.de>
1678
1679 PR fortran/48820
1680 * decl.c (gfc_match_decl_type_spec): Support type(*).
1681 (gfc_verify_c_interop): Allow type(*).
1682 * dump-parse-tree.c (show_typespec): Handle type(*).
1683 * expr.c (gfc_copy_expr): Ditto.
1684 * interface.c (compare_type_rank, compare_parameter,
1685 compare_actual_formal, gfc_procedure_use): Ditto.
1686 * libgfortran.h (bt): Add BT_ASSUMED.
1687 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
1688 * module.c (bt_types): Ditto.
1689 * resolve.c (assumed_type_expr_allowed): New static variable.
1690 (resolve_actual_arglist, resolve_variable, resolve_symbol):
1691 Handle type(*).
1692 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1693 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
1694
1695 2012-03-02 Tobias Burnus <burnus@net-b.de>
1696
1697 PR fortran/52325
1698 * primary.c (gfc_match_varspec): Add missing ;.
1699
1700 2012-03-02 Tobias Burnus <burnus@net-b.de>
1701
1702 PR fortran/52325
1703 * primary.c (gfc_match_varspec): Add diagnostic for % with
1704 nonderived types.
1705
1706 2012-03-02 Tobias Burnus <burnus@net-b.de>
1707
1708 PR fortran/52270
1709 * expr.c (gfc_check_vardef_context): Fix check for
1710 intent-in polymorphic pointer .
1711 * interface.c (compare_parameter): Allow passing TYPE to
1712 intent-in polymorphic pointer.
1713
1714 2012-03-02 Tobias Burnus <burnus@net-b.de>
1715
1716 PR fortran/52452
1717 * resolve.c (resolve_intrinsic): Don't search for a
1718 function if we know that it is a subroutine.
1719
1720 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
1721
1722 PR fortran/52386
1723 * trans-expr.c (fcncall_realloc_result): Dereference the
1724 descriptor if needed.
1725
1726 2012-02-22 Tobias Burnus <burnus@net-b.de>
1727
1728 PR fortran/52335
1729 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
1730
1731 2012-02-18 Tobias Burnus <burnus@net-b.de>
1732
1733 PR fortran/52295
1734 * interface.c (check_interface0): Internal procs in
1735 generic interfaces are allowed in Fortran 2008.
1736
1737 2012-02-17 Tobias Burnus <burnus@net-b.de>
1738 Roland Stigge <stigge@antcom.de>
1739
1740 PR translation/52273
1741 * interface.c (compare_actual_formal): Fix typo "at at".
1742
1743 2012-02-17 Tobias Burnus <burnus@net-b.de>
1744
1745 * gfortran.texi (Q exponent-letter): Fix grammar.
1746
1747 2012-02-17 Tobias Burnus <burnus@net-b.de>
1748
1749 * gfortran.texi (Status): Fix typos.
1750 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
1751 a majuscule.
1752
1753 2012-02-17 Tobias Burnus <burnus@net-b.de>
1754 Roland Stigge <stigge@antcom.de>
1755
1756 PR translation/52232
1757 PR translation/52234
1758 PR translation/52245
1759 PR translation/52246
1760 PR translation/52262
1761 PR translation/52273
1762 * io.c (gfc_match_open): Fix typo.
1763 * interface.c (compare_actual_formal): Ditto.
1764 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
1765 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
1766 * check.c (gfc_check_associated, gfc_check_null): Ditto.
1767
1768 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1769
1770 PR fortran/50981
1771 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1772 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1773
1774 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1775
1776 * trans-array.c (gfc_walk_elemental_function_args,
1777 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1778 of gfc_walk_elemental_function_args.
1779 * trans-stmt.c (gfc_trans_call): Ditto.
1780 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1781 (gfc_walk_elemental_function_args): Update prototype.
1782
1783 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1784
1785 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1786 (gfc_walk_elemental_function_args): Move code to
1787 gfc_get_proc_ifc_for_expr and call it.
1788
1789 2012-02-08 Tobias Burnus <burnus@net-b.de>
1790
1791 PR fortran/52151
1792 * trans-expr.c (fcncall_realloc_result): Set also the stride.
1793
1794 2012-02-07 Tobias Burnus <burnus@net-b.de>
1795
1796 PR fortran/51514
1797 * trans-expr.c (gfc_conv_procedure_call): Add _data component
1798 for calls of scalar CLASS actuals to TYPE dummies.
1799
1800 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
1801
1802 PR fortran/48847
1803 * trans-decl.c: Warn about unused dummy procedure arguments
1804 if -Wunused-dummy-argument is specified. Suppress middle-end
1805 warnings about procedure arguments.
1806
1807 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
1808
1809 * trans-array.c (gfc_array_allocate): Zero memory for all class
1810 array allocations.
1811 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1812
1813 PR fortran/52102
1814 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1815 array reference, ensure that 'dataref' points to the _data
1816 component that is followed by the array reference..
1817
1818 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
1819
1820 PR fortran/41587
1821 PR fortran/46356
1822 PR fortran/51754
1823 PR fortran/50981
1824 * class.c (insert_component_ref, class_data_ref_missing,
1825 gfc_fix_class_refs): New functions.
1826 * gfortran.h (gfc_fix_class_refs): New prototype.
1827 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1828 gfc_fix_class_refs instead.
1829
1830 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
1831
1832 PR fortran/52012
1833 * trans-expr.c (fcncall_realloc_result): If variable shape is
1834 correct, retain the bounds, whatever they are.
1835
1836 2012-02-02 Tobias Burnus <burnus@net-b.de>
1837
1838 PR fortran/52093
1839 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1840
1841 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
1842
1843 PR fortran/51958
1844 * frontend-passes.c (convert_elseif): New function.
1845 (optimize_namespace): Call it.
1846
1847 2012-02-01 Tobias Burnus <burnus@net-b.de>
1848
1849 PR fortran/52024
1850 * module.c (MOD_VERSION): Bump.
1851 (mio_typebound_proc): Read/write is_operator from/to the
1852 .mod file.
1853
1854 2012-02-01 Tobias Burnus <burnus@net-b.de>
1855
1856 PR fortran/52059
1857 * trans-expr.c (gfc_conv_procedure_call): Add array ref
1858 only to variables.
1859
1860 2012-01-31 Tobias Burnus <burnus@net-b.de>
1861
1862 PR fortran/52024
1863 * gfortran.h (gfc_tbp_generic): Store whether the
1864 generic is an operator.
1865 * decl.c (gfc_match_generic): Set that flag.
1866 * resolve.c (check_generic_tbp_ambiguity): Use it in the
1867 gfc_compare_interfaces check.
1868
1869 2012-01-31 Tobias Burnus <burnus@net-b.de>
1870
1871 PR fortran/52029
1872 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1873
1874 2012-01-31 Tobias Burnus <burnus@net-b.de>
1875
1876 PR fortran/52013
1877 * class.c (get_unique_hashed_string): Adapt trim length.
1878 (gfc_build_class_symbol) Encode also corank in the container name.
1879
1880 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
1881
1882 PR fortran/52012
1883 * trans-expr.c (fcncall_realloc_result): Correct calculation of
1884 result offset.
1885
1886 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1887
1888 * module.c (pointer_info): Make true_name and module pointers
1889 rather than arrays, order pointers before other fields.
1890 (free_pi_tree): free true_name and module as well.
1891 (mio_read_string): Rename to read_string.
1892 (mio_write_string): Remove.
1893 (load_commons): Use read_string.
1894 (read_module): Use read_string rather than mio_internal_string.
1895 (write_blank_common): Call write_atom directly.
1896 (write_symbol): Likewise.
1897
1898 2012-01-29 Tobias Burnus <burnus@net-b.de>
1899
1900 PR fortran/41600
1901 * expr.c (gfc_default_initializer): Convert the values if
1902 the type does not match.
1903
1904 2012-01-29 Tobias Burnus <burnus@net-b.de>
1905
1906 PR fortran/51972
1907 * trans-array.c (structure_alloc_comps): Fix assignment of
1908 polymorphic components (polymorphic deep copying).
1909
1910 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1911
1912 PR fortran/51808
1913 * decl.c (set_binding_label): Make binding_label argument const.
1914 (curr_binding_label): Constify.
1915 * gfortran.h (gfc_symbol): Constify binding_label.
1916 (gfc_common_head): Likewise.
1917 (get_iso_c_sym): Likewise.
1918 * match.c (gfc_match_name_C): Constify buffer argument.
1919 * match.h (gfc_match_name_C): Likewise.
1920 * resolve.c (set_name_and_label): Constify binding_label argument.
1921 (gfc_iso_c_sub_interface): Constify binding_label variable.
1922 * symbol.c (get_iso_c_sym): Constify binding_label argument.
1923
1924 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1925
1926 PR fortran/51808
1927 * decl.c (set_binding_label): Move prototype from match.h to here.
1928 (curr_binding_label): Make a pointer rather than static array.
1929 (build_sym): Check sym->binding_label pointer rather than array,
1930 update set_binding_label call, handle curr_binding_label changes.
1931 (set_binding_label): Handle new curr_binding_label, dest_label
1932 double ptr, and sym->binding_label.
1933 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1934 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1935 than array, update set_binding_label call.
1936 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1937 (match_procedure_decl): Update set_binding_label call.
1938 (gfc_match_bind_c): Change binding_label to pointer, update
1939 gfc_match_name_C call.
1940 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
1941 (gfc_symbol): Make binding_label a pointer.
1942 (gfc_common_head): Likewise.
1943 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
1944 * match.h (gfc_match_name_C): Change prototype argument.
1945 (set_binding_label): Move prototype to decl.c.
1946 * module.c (struct pointer_info): Make binding_label a pointer.
1947 (free_pi_tree): Free unused binding_label.
1948 (mio_read_string): New function.
1949 (mio_write_string): New function.
1950 (load_commons): Redo reading of binding_label.
1951 (read_module): Likewise.
1952 (write_common_0): Change to write empty string instead of name if
1953 no binding_label.
1954 (write_blank_common): Write empty string for binding label.
1955 (write_symbol): Change to write empty string instead of name if no
1956 binding_label.
1957 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
1958 (set_name_and_label): Make binding_label double pointer, use
1959 asprintf.
1960 (gfc_iso_c_sub_interface): Make binding_label a pointer.
1961 (resolve_bind_c_comms): Handle cases if
1962 gfc_common_head->binding_label is NULL.
1963 (gfc_verify_binding_labels): sym->binding_label is a pointer.
1964 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
1965 binding_label.
1966 (gen_special_c_interop_ptr): Don't set binding label.
1967 (generate_isocbinding_symbol): Insert binding_label into symbol
1968 table.
1969 (get_iso_c_sym): Use pointer assignment instead of strcpy.
1970 * trans-common.c (gfc_sym_mangled_common_id): Handle
1971 com->binding_label being a pointer.
1972 * trans-decl.c (gfc_sym_mangled_identifier): Handle
1973 sym->binding_label being a pointer.
1974 (gfc_sym_mangled_function_id): Likewise.
1975
1976 2012-01-29 Tobias Burnus <burnus@net-b.de>
1977
1978 PR fortran/52038
1979 * resolve.c (symbol_as): Remove unused, accidentally
1980 added function.
1981
1982 2012-01-28 Tobias Burnus <burnus@net-b.de>
1983
1984 PR fortran/51972
1985 * trans-stmt.c (gfc_trans_allocate): Properly check whether
1986 we have a BT_CLASS which needs to be memset.
1987
1988 2012-01-27 Tobias Burnus <burnus@net-b.de>
1989
1990 PR fortran/52022
1991 * trans-expr.c (gfc_conv_procedure_call): Fix passing
1992 of functions, which return allocatables.
1993
1994 2012-01-27 Tobias Burnus <burnus@net-b.de>
1995
1996 PR fortran/52016
1997 * resolve.c (resolve_formal_arglist): Fix elemental
1998 constraint checks for polymorphic dummies also for
1999 pointers.
2000
2001 2012-01-27 Tobias Burnus <burnus@net-b.de>
2002
2003 PR fortran/51970
2004 PR fortran/51977
2005 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
2006 handle array spec for BT_CLASS.
2007 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
2008 * frontend-passes.c (create_var): Ditto.
2009 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
2010 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
2011 instead of attr.pointer.
2012 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
2013 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
2014 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
2015
2016 2012-01-27 Tobias Burnus <burnus@net-b.de>
2017
2018 PR fortran/51953
2019 * match.c (gfc_match_allocate): Allow more than allocate
2020 object with SOURCE=.
2021
2022 2012-01-27 Tobias Burnus <burnus@net-b.de>
2023
2024 PR fortran/52016
2025 * resolve.c (resolve_formal_arglist): Fix elemental
2026 constraint checks for polymorphic dummies.
2027
2028 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
2029 Tobias Burnus <burnus@gcc.gnu.org>
2030
2031 PR fortran/48705
2032 PR fortran/51870
2033 PR fortran/51943
2034 PR fortran/51946
2035 * trans-array.c (gfc_array_init_size): Add two extra arguments
2036 to convey the dynamic element size of a calls object and to
2037 return the number of elements that have been allocated.
2038 (gfc_array_allocate): Add the same arguments and use them to
2039 call gfc_array_init_size. Before the allocation dereference
2040 the data pointer, if necessary. Set the allocated array to zero
2041 if the class element size or expr3 are non-null.
2042 * trans-expr.c (gfc_conv_class_to_class): Give this function
2043 global scope.
2044 (get_class_array_ref): New function.
2045 (gfc_copy_class_to_class): New function.
2046 * trans-array.h : Update prototype for gfc_array_allocate.
2047 * trans-stmt.c (gfc_trans_allocate): For non-variable class
2048 STATUS expressions extract the class object and the dynamic
2049 element size. Use the latter to call gfc_array_allocate and
2050 the former for setting the vptr and, via
2051 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
2052 * trans.h : Prototypes for gfc_get_class_array_ref,
2053 gfc_copy_class_to_class and gfc_conv_class_to_class.
2054
2055 2012-01-25 Tobias Burnus <burnus@net-b.de>
2056
2057 * resolve.c (symbol_as): Check also for attr.class_ok.
2058
2059 2012-01-25 Tobias Burnus <burnus@net-b.de>
2060
2061 PR fortran/51995
2062 * class.c (gfc_build_class_symbol): Fix invalid freeing
2063 issue with fclass->f2k_derived.
2064
2065 2012-01-25 Tobias Burnus <burnus@net-b.de>
2066
2067 PR fortran/51995
2068 * class.c (gfc_build_class_symbol): Ensure that
2069 fclass->f2k_derived is set.
2070
2071 2012-01-25 Tobias Burnus <burnus@net-b.de>
2072
2073 PR fortran/51966
2074 * resolve.c (resolve_structure_cons): Only create an
2075 array constructors for nonscalars.
2076
2077 2012-01-23 Tobias Burnus <burnus@net-b.de>
2078
2079 PR fortran/51948
2080 * check.c (variable_check): Fix checking for
2081 variables and deeply nested BLOCKs.
2082
2083 2012-01-21 Tobias Burnus <burnus@net-b.de>
2084 Steven G. Kargl <kargl@gcc.gnu.org>
2085
2086 PR fortran/50556
2087 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
2088 attribute.
2089
2090 2012-01-21 Tobias Burnus <burnus@net-b.de>
2091
2092 PR fortran/51913
2093 * interface.c (compare_parameter): Fix CLASS comparison.
2094
2095 2012-01-20 Tobias Burnus <burnus@net-b.de>
2096 Janus Weil <janus@gcc.gnu.org>
2097
2098 PR fortran/51056
2099 * module.c (load_needed, read_module): Don't mark __vtab etc.
2100 as use_only.
2101
2102 2012-01-19 Tobias Burnus <burnus@net-b.de>
2103
2104 PR fortran/51904
2105 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
2106
2107 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
2108
2109 PR fortran/51634
2110 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
2111 components of temporary class arguments.
2112
2113 2012-01-17 Tobias Burnus <burnus@net-b.de>
2114 Janne Blomqvist <jb@gcc.gnu.org>
2115
2116 PR fortran/51869
2117 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
2118 LHS after allocation, if it has allocatable components.
2119 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
2120
2121 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
2122 Tobias Burnus <burnus@net-b.de>
2123
2124 PR fortran/50981
2125 * trans-array.c (gfc_walk_elemental_function_args): Fix
2126 passing of deallocated allocatables/pointers as absent argument.
2127
2128 2012-01-16 Tobias Burnus <burnus@net-b.de>
2129
2130 PR fortran/51809
2131 * class.c (gfc_find_derived_vtab): Mark __vtab and
2132 __def_init as FL_VARIABLE not as FL_PARAMETER.
2133 * expr.c (gfc_simplify_expr): Remove special
2134 handling of __vtab.
2135 * resolve.c (resolve_values): Ditto.
2136 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
2137 and __def_init as TREE_READONLY.
2138
2139 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
2140 Andreas Kloeckner <kloeckner@cims.nyu.edu>
2141 Steven G. Kargl <kargl@gcc.gnu.org>
2142
2143 PR fortran/48426
2144 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
2145 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
2146 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
2147 and -finteger-4-integer-8. User-desired type conversion information.
2148 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
2149 in declaration parsing.
2150 * trans-types.c (gfc_init_kinds): User-specified type conversion
2151 checked for current backend.
2152 * primary.c (match_integer_constant,match_real_constant): Implement
2153 type conversion in constant parsing.
2154 * options.c (gfc_init_options,gfc_handle_option): Translate input
2155 options to flags in internal options data structure.
2156 * invoke.texi: Document new options. Re-order options in Options
2157 summary section.
2158
2159 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
2160
2161 * trans-array.c (gfc_trans_create_temp_array): In the case of a
2162 class array temporary, detect a null 'eltype' on entry and use
2163 'initial' to provde the class reference and so, through the
2164 vtable, the element size for the dynamic type.
2165 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
2166 expressions, set 'eltype' to null and pass the values via the
2167 'initial' expression.
2168
2169 2012-01-14 Tobias Burnus <burnus@net-b.de>
2170
2171 PR fortran/51800
2172 * resolve.c (build_default_init_expr): Also initialize
2173 nonconstant-length strings with -finit-character=<n>.
2174
2175 2011-01-14 Tobias Burnus <burnus@net-b.de>
2176
2177 PR fortran/51816
2178 * module.c (read_module): Don't make nonexisting
2179 intrinsic operators as found.
2180 (rename_list_remove_duplicate): New function.
2181 (gfc_use_modules): Use it.
2182
2183 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
2184
2185 PR fortran/48351
2186 * trans-array.c (structure_alloc_comps): Suppress interative
2187 call to self, when current component is deallocated using
2188 gfc_trans_dealloc_allocated.
2189 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
2190 attribute from the declared type to the class structure.
2191
2192 2012-01-13 Tobias Burnus <burnus@net-b.de>
2193
2194 PR fortran/51842
2195 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
2196 instead of a signed int of size POINTER_SIZE for
2197 gfc_index_integer_kind.
2198
2199 2012-01-12 Tobias Burnus <burnus@net-b.de>
2200
2201 PR fortran/36755
2202 * intrinsic.texi (CHMOD): Extend a bit and remove statement
2203 that /bin/chmod is called.
2204
2205 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
2206
2207 * gfortran.texi (Fortran 2003 Status): Fix grammar.
2208
2209 2012-01-10 Tobias Burnus <burnus@net-b.de>
2210
2211 PR fortran/51652
2212 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
2213 check whether type-spec matches declaration.
2214
2215 2012-01-10 Tobias Burnus <burnus@net-b.de>
2216
2217 * resolve.c (resolve_ordinary_assign): Improve error wording.
2218
2219 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
2220
2221 PR fortran/51791
2222 * interface.c (matching_typebound_op): Drill down through
2223 possible parentheses to obtain base expression. Do not test for
2224 'class_ok' but, instead for the class structure components.
2225 * resolve.c (resolve_ordinary_assign): Extend error message for
2226 polymorphic assignment to advise checking for specific
2227 subroutine.
2228
2229 PR fortran/51792
2230 * resolve.c (resolve_typebound_function): Restore 'static' to
2231 declaration.
2232
2233 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
2234
2235 PR fortran/51758
2236 * trans-array.c (gfc_walk_elemental_function_args):
2237 Skip over NULL() actual arguments.
2238
2239 2012-01-09 Tobias Burnus <burnus@net-b.de>
2240
2241 * gfortran.texi: Bump copyright year.
2242 (Fortran 2003 Status): Update polymorphism item, add
2243 item for generic interface with DT name.
2244
2245 2012-01-09 Tobias Burnus <burnus@net-b.de>
2246
2247 PR fortran/51578
2248 * gfortran.h (gfc_use_list):
2249 * match.h (gfc_use_module): Rename to ...
2250 (gfc_use_modules): ... this.
2251 * module.c (use_locus, specified_nonint, specified_int): Remove
2252 global variable.
2253 (module_name): Change type to const char*, used with gfc_get_string.
2254 (module_list): New global variable.
2255 (free_rename): Free argument not global var.
2256 (gfc_match_use): Save match to module_list.
2257 (load_generic_interfaces, read_module): Don't free symtree.
2258 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
2259 type change of module_name.
2260 (write_symbol0, write_generic): Optimize due to the type change.
2261 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
2262 locus of rename->where.
2263 (gfc_use_module): Take module_list as argument.
2264 (gfc_use_modules): New function.
2265 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
2266 * parse.c (last_was_use_stmt): New global variable.
2267 (use_modules): New function.
2268 (decode_specification_statement, decode_statement): Move USE match up
2269 and call use_modules.
2270 (next_free, next_fixed): Call use_modules.
2271 (accept_statement): Don't call gfc_module_use.
2272
2273 2012-01-06 Tobias Burnus <burnus@net-b.de>
2274
2275 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
2276 Update call to gfc_trans_dealloc_allocated.
2277 * trans.c (gfc_allocate_using_malloc): Fix spacing.
2278 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
2279 label_finish when an error occurs.
2280 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
2281 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
2282 Update prototype.
2283 (gfor_fndecl_caf_deregister): New tree symbol.
2284 * trans-expr.c (gfc_conv_procedure_call): Update
2285 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
2286 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
2287 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
2288 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
2289 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
2290 gfc_trans_dealloc_allocated): Update prototypes.
2291 * trans-stmt.c (gfc_trans_sync): Fix indentation.
2292 (gfc_trans_allocate): Fix errmsg padding and label handling.
2293 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
2294 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
2295 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
2296 to avoid other stats accidentally matching this one.
2297 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
2298 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
2299 and add decl for caf_deregister.
2300 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
2301 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
2302 gfc_deallocate_with_status.
2303
2304 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
2305
2306 PR fortran/PR48946
2307 * resolve.c (resolve_typebound_static): If the typebound
2308 procedure is 'deferred' try to find the correct specific
2309 procedure in the derived type operator space itself.
2310
2311 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2312
2313 PR fortran/50981
2314 * trans-array.h (gfc_walk_elemental_function_args): New argument.
2315 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
2316 * trans-stmt.c (gfc_trans_call): Ditto.
2317 * trans-array.c (gfc_walk_function_expr): Ditto.
2318 (gfc_walk_elemental_function_args): Get the dummy argument list
2319 if possible. Check that the dummy and the actual argument are both
2320 optional, and set can_be_null_ref accordingly.
2321
2322 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2323
2324 PR fortran/50981
2325 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
2326 * trans-array.c: If the reference can be NULL, save the reference
2327 instead of the value.
2328 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
2329 dereference it.
2330
2331 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
2332
2333 * trans-expr.c (gfc_conv_expr): Move address taking...
2334 (gfc_conv_expr_reference): ... here.
2335
2336 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2337
2338 PR fortran/49693
2339 * trans-common.c (create_common): Update copyright years. Mark
2340 variables as used to avoid warnings about unused variables in
2341 common blocks.
2342
2343 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
2344
2345 * gfortran.h (struct gfc_expr): Add missing "struct"
2346 qualifier for member base_expr.
2347
2348 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
2349
2350 PR fortran/51529
2351 * trans-array.c (gfc_array_allocate): Null allocated memory of
2352 newly allocted class arrays.
2353
2354 PR fortran/46262
2355 PR fortran/46328
2356 PR fortran/51052
2357 * interface.c(build_compcall_for_operator): Add a type to the
2358 expression.
2359 * trans-expr.c (conv_base_obj_fcn_val): New function.
2360 (gfc_conv_procedure_call): Use base_expr to detect non-variable
2361 base objects and, ensuring that there is a temporary variable,
2362 build up the typebound call using conv_base_obj_fcn_val.
2363 (gfc_trans_class_assign): Pick out class procedure pointer
2364 assignments and do the assignment with no further prcessing.
2365 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
2366 gfc_trans_class_assign): Move to top of file.
2367 * gfortran.h : Add 'base_expr' field to gfc_expr.
2368 * resolve.c (get_declared_from_expr): Add 'types' argument to
2369 switch checking of derived types on or off.
2370 (resolve_typebound_generic_call): Set the new argument.
2371 (resolve_typebound_function, resolve_typebound_subroutine):
2372 Set 'types' argument for get_declared_from_expr appropriately.
2373 Identify base expression, if not a variable, in the argument
2374 list of class valued calls. Assign it to the 'base_expr' field
2375 of the final expression. Strip away all references after the
2376 last class reference.
2377
2378 2012-01-02 Tobias Burnus <burnus@net-b.de>
2379
2380 PR fortran/51682
2381 * trans-intrinsic.c (trans_this_image, trans_image_index,
2382 trans_num_images, conv_intrinsic_cobound): Fold_convert the
2383 caf_num_images/caf_this_images variables to the correct int kind.
2384
2385 2012-01-01 Jakub Jelinek <jakub@redhat.com>
2386
2387 * gfortranspec.c (lang_specific_driver): Update copyright notice
2388 dates.
2389 \f
2390 Copyright (C) 2012 Free Software Foundation, Inc.
2391
2392 Copying and distribution of this file, with or without modification,
2393 are permitted in any medium without royalty provided the copyright
2394 notice and this notice are preserved.