OSDN Git Service

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