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