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