ChangeLog: Add commit message from rev.
[platform/upstream/gcc.git] / gcc / fortran / ChangeLog
1 2013-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2
3         * trans-expr.c (build_memcmp_call):  New function.
4         (gfc_build_compare_string):  If the strings
5         compared have constant and equal lengths and
6         the strings are kind=1, or, for kind=4 strings,
7         the test is for (in)equality, use memcmp().
8
9 2013-03-29  Tobias Burnus  <burnus@net-b.de>
10
11         PR fortran/35203
12         * trans-decl.c (create_function_arglist): Pass hidden argument
13         for passed-by-value optional+value dummies.
14         * trans-expr.c (gfc_conv_expr_present,
15         gfc_conv_procedure_call): Handle those.
16
17 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
18
19         PR fortran/45159
20         * gfortran.h (gfc_dep_difference):  Add prototype.
21         * dependency.c (discard_nops):  New function.
22         (gfc_dep_difference):  New function.
23         (check_section_vs_section):  Use gfc_dep_difference
24         to calculate the difference of starting indices.
25         * trans-expr.c (gfc_conv_substring):  Use
26         gfc_dep_difference to calculate the length of
27         substrings where possible.
28
29 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
30
31         PR fortran/55806
32         * frontend-passes.c (optimize_code):  Keep track of
33         current code to make code insertion possible.
34         (combine_array_constructor):  New function.
35         (optimize_op):  Call it.
36
37 2013-03-27  Tobias Burnus  <burnus@net-b.de>
38
39         PR fortran/56650
40         PR fortran/36437
41         * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
42         gfc_check_storage_size): Update checks.
43         * intrinsic.texi (SIZEOF): Correct class.
44         * intrinsic.h (gfc_simplify_sizeof,
45         gfc_simplify_storage_size): New prototypes.
46         * intrinsic.c (add_functions): Use them.
47         * simplify.c (gfc_simplify_sizeof,
48         gfc_simplify_storage_size): New functions.
49
50 2013-03-27  Janne Blomqvist  <jb@gcc.gnu.org>
51
52         PR fortran/25708
53         * module.c (module_locus): Use long for position.
54         (module_content): New variable.
55         (module_pos): Likewise.
56         (prev_character): Remove.
57         (bad_module): Free data instead of closing mod file.
58         (set_module_locus): Use module_pos.
59         (get_module_locus): Likewise.
60         (module_char): use buffer rather than stdio file.
61         (module_unget_char): Likewise.
62         (read_module_to_tmpbuf): New function.
63         (gfc_use_module): Call read_module_to_tmpbuf.
64
65 2013-03-26  Tobias Burnus  <burnus@net-b.de>
66
67         PR fortran/56649
68         * simplify.c (gfc_simplify_merge): Simplify more.
69
70 2013-03-25  Tobias Burnus  <burnus@net-b.de>
71
72         PR fortran/38536
73         PR fortran/38813
74         PR fortran/38894
75         PR fortran/39288
76         PR fortran/40963
77         PR fortran/45824
78         PR fortran/47023
79         PR fortran/47034
80         PR fortran/49023
81         PR fortran/50269
82         PR fortran/50612
83         PR fortran/52426
84         PR fortran/54263
85         PR fortran/55343
86         PR fortran/55444
87         PR fortran/55574
88         PR fortran/56079
89         PR fortran/56378
90         * check.c (gfc_var_strlen): Properly handle 0-sized string.
91         (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
92         (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
93         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
94         functions.
95         * expr.c (check_inquiry): Add c_sizeof, compiler_version and
96         compiler_options.
97         (gfc_check_pointer_assign): Refine function result check.
98         gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
99         GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
100         GFC_ISYM_C_LOC.
101         (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
102         NAMED_SUBROUTINE.
103         (generate_isocbinding_symbol): Update prototype.
104         (get_iso_c_sym): Remove.
105         (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
106         * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
107         (gfc_intrinsic_sub_interface): Use it.
108         (add_functions, add_subroutines): Add missing C-binding intrinsics.
109         (gfc_intrinsic_func_interface): Add special case for c_loc.
110         gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
111         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
112         * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
113         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
114         gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
115         * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
116         functions.
117         * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
118         NAMED_FUNCTION.
119         * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
120         * module.c (create_intrinsic_function): Support subroutines and
121         derived-type results.
122         (use_iso_fortran_env_module): Update calls.
123         (import_iso_c_binding_module): Ditto; update calls to
124         generate_isocbinding_symbol.
125         * resolve.c (find_arglists): Skip for intrinsic symbols.
126         (gfc_resolve_intrinsic): Find intrinsic subs via id.
127         (is_scalar_expr_ptr, gfc_iso_c_func_interface,
128         set_name_and_label, gfc_iso_c_sub_interface): Remove.
129         (resolve_function, resolve_specific_s0): Remove calls to those.
130         (resolve_structure_cons): Fix handling.
131         * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
132         generation.
133         (gen_cptr_param, gen_fptr_param, gen_shape_param,
134         build_formal_args, get_iso_c_sym): Remove.
135         (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
136         (generate_isocbinding_symbol): Support hidden symbols and
137         using c_ptr/c_funptr symtrees for nullptr defs.
138         * target-memory.c (gfc_target_encode_expr): Fix handling
139         of c_ptr/c_funptr.
140         * trans-expr.c (conv_isocbinding_procedure): Remove.
141         (gfc_conv_procedure_call): Remove call to it.
142         (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
143         of c_ptr/c_funptr.
144         * trans-intrinsic.c (conv_isocbinding_function,
145         conv_isocbinding_subroutine): New.
146         (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
147         Call them.
148         * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
149         * trans-types.c (gfc_typenode_for_spec,
150         gfc_get_derived_type): Ditto.
151         (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
152
153 2013-03-18  Tobias Burnus  <burnus@net-b.de>
154
155         * gfortran.h (gfc_option_t): Remove flag_whole_file.
156         * invoke.texi (-fno-whole-file): Remove.
157         * lang.opt (fwhole-file): Change to Ignore.
158         * options.c (gfc_init_options, gfc_post_options,
159         gfc_handle_option): Remove !flag_whole_file handling
160         * parse.c (resolve_all_program_units, translate_all_program_units,
161         gfc_parse_file): Ditto.
162         * resolve.c (resolve_global_procedure): Ditto.
163         * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
164         gfc_create_module_variable): Ditto.
165         * trans-types.c (gfc_get_derived_type): Ditto.
166
167 2013-03-15  Tobias Burnus  <burnus@net-b.de>
168
169         PR fortran/56615
170         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
171         if they are not simply contiguous.
172
173 2013-03-11  Tobias Burnus  <burnus@net-b.de>
174
175         * gfortran.texi (STRUCTURE and RECORD): State more clearly how
176         to convert them into derived types.
177
178 2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
179
180         PR fortran/56575
181         * expr.c (gfc_default_initializer): Check that a class declared
182         type has any components.
183         * resolve.c (resolve_fl_derived0): On failing the test for C437
184         set the type to BT_UNKNOWN to prevent repeat error messages.
185
186 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
187
188         PR fortran/56477
189         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
190
191 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
192
193         PR fortran/54730
194         * array.c (gfc_match_array_constructor): Set a checkpoint before
195         matching a typespec.  Drop it on success, restore it otherwise.
196
197 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
198
199         PR fortran/54730
200         * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
201         (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
202         gfc_restore_last_undo_checkpoint): New prototypes.
203         * symbol.c (default_undo_chgset_var): Update initialization.
204         (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
205         free_undo_change_set_data, pop_undo_change_set,
206         gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
207         New functions.
208         (save_symbol_data): Handle multiple change sets.  Make sure old_symbol
209         field's previous value is not overwritten.  Clear gfc_new field.
210         (restore_old_symbol): Restore previous old_symbol field.
211         (gfc_restore_last_undo_checkpoint): New function, using body renamed
212         from gfc_undo_symbols.  Restore the previous change set as current one.
213         (gfc_undo_symbols): New body.
214         (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
215         Call enforce_single_undo_checkpoint.
216         (gfc_symbol_done_2): Ditto.  Free change set data.
217
218 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
219
220         * symbol.c (restore_old_symbol): Fix thinko.
221
222 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
223
224         * symbol.c (gfc_undo_symbols): Move code...
225         (restore_old_symbol): ... here as a new function.
226
227 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
228
229         * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
230         * gfortran.h: Include vec.h.
231         (gfc_undo_change_set): New struct.
232         * symbol.c (tentative_tbp): Remove struct.
233         (changed_syms, tentative_tbp_list): Remove variables.
234         (default_undo_chgset_var, latest_undo_chgset): New variables.
235         (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
236         gfc_commit_symbols, gfc_commit_symbol,
237         gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
238         Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
239
240 2013-03-01  Tobias Burnus  <burnus@net-b.de>
241
242         PR fortran/56491
243         * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
244         * symbol.c (free_components): Free proc-pointer components.
245
246 2013-03-01  Tobias Burnus  <burnus@net-b.de>
247
248         * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
249         * trans-io.c (build_dt): Ditto.
250
251 2013-02-24  Joseph Myers  <joseph@codesourcery.com>
252
253         * resolve.c (generate_component_assignments): Don't use UTF-8
254         ligature in diagnostic.
255
256 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
257
258         PR fortran/56385
259         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
260         components with allocatable result.
261
262 2012-02-21  Tobias Burnus  <burnus@net-b.de>
263
264         PR fortran/56416
265         * gfortran.texi (Part II: Language Reference, Extensions,
266         Non-Fortran Main Program): Sort @menu to match actual section order.
267         * intrinsic.texi (Intrinsic Procedures): Ditto.
268         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
269
270 2013-02-15  Tobias Burnus  <burnus@net-b.de>
271             Mikael Morin  <mikael@gcc.gnu.org>
272
273         PR fortran/56318
274         * simplify.c (gfc_simplify_matmul): Fix result shape
275         and matmul result.
276
277 2013-02-15  Tobias Burnus  <burnus@net-b.de>
278
279         PR fortran/53818
280         * resolve.c (apply_default_init_local): Don't create an
281         initializer for a result variable.
282
283 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
284
285         PR fortran/56224
286         * gfortran.h (gfc_add_include_path):  Add boolean argument
287         for warn.
288         * scanner.c (gfc_add_include_path):  Pass along warn argument
289         to add_path_to_list.
290         * options.c (gfc_post_options):  Add true warn argument to
291         gfc_add_include_path.
292         (gfc_handle_module_path_options):  Likewise.
293         (gfc_handle_option): Also gfc_add_include_path for intrinsic
294         modules, without warning.
295
296 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
297             Tobias Burnus  <burnus@net-b.de>
298
299         PR testsuite/56138
300         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
301         results for functions without extra result variable.
302
303         Revert:
304         2013-01-30  Tobias Burnus  <burnus@net-b.de>
305
306         PR fortran/56138
307         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
308         results for functions without extra result variable.
309
310 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
311
312         PR fortran/46952
313         * resolve.c (resolve_call): Do not check deferred procedures for
314         recursiveness.
315
316 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
317
318         PR fortran/55362
319         * check.c (array_check): It is an error if a procedure is
320         passed.
321
322 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
323
324         PR fortran/54107
325         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
326         to error_mark_node on entry.  Detect recursive types.  Build a variadic
327         procedure type if the type is recursive.  Restore the initial
328         backend_decl.
329
330 2013-02-07  Tobias Burnus  <burnus@net-b.de>
331
332         PR fortran/54339
333         * gfortran.texi (Standards): Mention TS29113.
334         (Varying Length Character): Mention deferred-length
335         strings.
336         (Fortran 2003 Status): Add unlimited polymorphic.
337         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
338         (C Interop): Update the section about TS29113.
339
340 2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
341
342         PR fortran/55789
343         * trans-array.c (trans_array_constructor): Remove condition
344         'dynamic' = true if the loop ubound is a VAR_DECL.
345
346 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
347
348         PR fortran/56008
349         PR fortran/47517
350         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
351         the lhs descriptor before it is modified for reallocation. Use
352         it to deallocate allocatable components in the reallocation
353         block.  Nullify allocatable components for newly (re)allocated
354         arrays.
355
356 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
357
358         PR fortran/54195
359         * resolve.c (resolve_typebound_procedures): Recurse through
360         resolve_symbol.
361
362 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
363
364         PR fortran/54107
365         PR fortran/54195
366         * gfortran.h (struct gfc_symbol): New field 'resolved'.
367         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
368         (resolve_symbol): Skip duplicate calls.  Don't check the current
369         namespace.
370
371 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
372
373         PR fortran/50627
374         PR fortran/56054
375         * decl.c (gfc_match_end):  Remove half-ready namespace
376         from parent if the end of a block is missing.
377         * parse.c (parse_module):  Do not put namespace into
378         gsymbol on error.
379
380 2013-01-30  Tobias Burnus  <burnus@net-b.de>
381
382         PR fortran/56138
383         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
384         results for functions without extra result variable.
385
386 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
387             Mikael Morin  <mikael@gcc.gnu.org>
388
389         PR fortran/54107
390         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
391         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
392         gfc_expr_replace_comp): Delete.
393         (gfc_sym_get_dummy_args): New prototype.
394         * dependency.c (gfc_check_fncall_dependency): Use
395         'gfc_sym_get_dummy_args'.
396         * expr.c (gfc_is_constant_expr): Ditto.
397         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
398         gfc_expr_replace_comp): Deleted.
399         * frontend-passes.c (doloop_code,do_function): Use
400         'gfc_sym_get_dummy_args'.
401         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
402         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
403         gfc_check_typebound_override): Ditto.
404         * module.c (MOD_VERSION): Bump module version.
405         (mio_component): Do not read/write 'formal' and 'formal_ns'.
406         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
407         copy formal args, but just keep a pointer to the interface.
408         (resolve_function,resolve_call,resolve_typebound_generic_call,
409         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
410         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
411         resolve_typebound_procedure,check_uop_procedure): Use
412         'gfc_sym_get_dummy_args'.
413         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
414         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
415         (gfc_sym_get_dummy_args): New function.
416         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
417         Use 'gfc_sym_get_dummy_args'.
418         * trans-decl.c (build_function_decl,create_function_arglist,
419         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
420         add_argument_checking): Ditto.
421         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
422         gfc_conv_statement_function): Ditto.
423         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
424         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
425
426 2013-01-28  Tobias Burnus  <burnus@net-b.de>
427             Mikael Morin  <mikael@gcc.gnu.org>
428
429         PR fortran/53537
430         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
431         interface block.
432         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
433         * decl.c (gfc_match_data_decl): Ditto.
434         (variable_decl): Remove undeclared type error.
435         (gfc_match_import): Use renamed instead of original name.
436
437 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
438
439         PR fortran/55984
440         PR fortran/56047
441         * gfortran.h : Add associate_var to symbol_attr.
442         * resolve.c (resolve_assoc_var): Set associate_var attribute.
443         If the target class_ok is set, set it for the associate
444         variable.
445         * check.c (allocatable_check): Associate variables should not
446         have the allocatable attribute even if their symbols do.
447         * class.c (gfc_build_class_symbol): Symbols with associate_var
448         set will always have a good class container.
449
450 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
451
452         PR fortran/56081
453         * resolve.c (resolve_select): Add argument 'select_type', reject
454         non-scalar expressions.
455         (resolve_select_type,resolve_code): Pass new argument to
456         'resolve_select'.
457
458 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
459
460         PR fortran/56052
461         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
462         and DECL_IGNORED_P on select_type_temporary and don't set
463         DECL_BY_REFERENCE.
464
465 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
466
467         PR fortran/55919
468         * scanner.c (add_path_to_list): Copy path to temporary and strip
469         trailing directory separators before calling stat().
470
471 2013-01-17  Richard Biener  <rguenther@suse.de>
472
473         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
474         dependent on sign of step, avoids repeated evaluation of
475         step sign test.  Avoid undefined overflow issues by using unsigned
476         arithmetic.
477
478 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
479
480         PR fortran/55983
481         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
482         asserting it.
483
484 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
485             Tobias Burnus  <burnus@net-b.de>
486
487         PR driver/55884
488         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
489         (fintrinsic-modules-path=): New.
490         * options.c (gfc_handle_option, gfc_get_option_string,
491         gfc_get_option_string): Handle the latter.
492
493 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
494
495         PR fortran/52865
496         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
497         and use value of countm1 before the decrement in the condition.
498
499 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
500
501         PR fortran/54286
502         * expr.c (gfc_check_pointer_assign): Check for presence of
503         's2' before using it.
504
505 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
506
507         PR fortran/55806
508         * frontend-passes.c (optimize_reduction):  New function,
509         including prototype.
510         (callback_reduction):  Likewise.
511         (gfc_run_passes):  Also run optimize_reduction.
512         (copy_walk_reduction_arg):  New function.
513         (dummy_code_callback):  New function.
514
515 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
516
517         PR fortran/55935
518         * trans-expr.c (gfc_conv_structure): Call
519         unshare_expr_without_location on the ctor elements.
520
521 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
522
523         PR fortran/54286
524         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
525         and rvalue interfaces are presented to gfc_compare_interfaces.
526         Simplify references to interface names by using the symbols
527         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
528         changed to overcome the asymmetry of this function. Do not
529         repeat the check for the presence of s1 and s2.
530
531 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
532
533         PR fortran/55072
534         * trans-array.c (gfc_conv_array_parameter): No packing was done for
535         full arrays of derived type.
536
537 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
538
539         PR fortran/55868
540         * class.c (get_unique_type_string): Change $tar to STAR and
541         replace sprintf by strcpy where there is no formatting.
542         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
543
544 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
545
546         PR fortran/47203
547         * module.c (check_for_ambiguous): Get the current program unit using
548         gfc_current_ns.
549
550 2013-01-09  Tobias Burnus  <burnus@net-b.de>
551
552         PR fortran/55758
553         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
554         in BIND(C) procedures with -std=f*.
555
556 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
557
558         PR fortran/55618
559         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
560         character function arguments to elemental procedures in
561         scalarization loops.
562
563 2013-01-07  Tobias Burnus  <burnus@net-b.de>
564
565         PR fortran/55763
566         * gfortran.h (gfc_check_assign_symbol): Update prototype.
567         * decl.c (add_init_expr_to_sym, do_parm): Update call.
568         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
569         improve error location; support components.
570         (gfc_check_pointer_assign): Handle component assignments.
571         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
572         (resolve_values): Update call.
573         (resolve_structure_cons): Avoid double diagnostic.
574
575 2013-01-07  Tobias Burnus  <burnus@net-b.de>
576             Thomas Koenig  <tkoenig@gcc.gnu.org>
577
578         PR fortran/55852
579         * expr.c (gfc_build_intrinsic_call): Avoid clashes
580         with user's procedures.
581         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
582         * simplify.c (gfc_simplify_size): Update call.
583         * class.c (finalization_scalarizer, finalization_get_offset,
584         finalizer_insert_packed_call, generate_finalization_wrapper):
585         Clean up by using gfc_build_intrinsic_call.
586
587 2013-01-07  Tobias Burnus  <burnus@net-b.de>
588
589         PR fortran/55763
590         * resolve.c (resolve_select_type): Reject intrinsic types for
591         a non-unlimited-polymorphic selector.
592
593 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
594
595         PR fortran/53876
596         PR fortran/54990
597         PR fortran/54992
598         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
599         to see if it is GFC_CLASS_TYPE_P.
600         * trans-expr.c (gfc_get_vptr_from_expr): The same.
601         (gfc_conv_class_to_class): If the types are not the same,
602         cast parmese->expr to the type of ctree.
603         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
604         CLASS components must be set.
605
606 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
607
608         PR fortran/42769
609         PR fortran/45836
610         PR fortran/45900
611         * module.c (read_module): Don't reuse local symtree if the associated
612         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
613         ambiguous.
614         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
615         lookup the symtree.
616
617 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
618             Mikael Morin  <mikael@gcc.gnu.org>
619
620         PR fortran/55827
621         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
622         e->symtree == NULL.
623         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
624
625 2013-01-05  Tobias Burnus  <burnus@net-b.de>
626
627         * class.c (finalize_component): Used passed offset expr.
628         (finalization_get_offset): New static function.
629         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
630         to handle noncontiguous arrays.
631
632 2013-01-04  Tobias Burnus  <burnus@net-b.de>
633
634         * trans.c (gfc_build_final_call): New function.
635         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
636         New function prototypes.
637         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
638         conv_scalar_to_descriptor, removed static attribute.
639         (gfc_conv_procedure_call): Honor renaming.
640
641 2013-01-04  Tobias Burnus  <burnus@net-b.de>
642
643         * intrinsic.c (add_functions): New internal intrinsic
644         function GFC_PREFIX ("stride").
645         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
646         * intrinsic.h (gfc_resolve_stride): New prototypes.
647         * iresolve.c (gfc_resolve_stride): New function.
648         * trans-intrinsic.c (conv_intrinsic_stride): New static
649         function.
650         (gfc_conv_intrinsic_function): Use it.
651
652 2013-01-04  Tobias Burnus  <burnus@net-b.de>
653
654         * class.c (gfc_find_intrinsic_vtab): Add _final
655         component.
656         * decl.c (gfc_match_null): Remove superfluous
657         variadic argument to gfc_match.
658
659 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
660
661         PR fortran/55172
662         * match.c (copy_ts_from_selector_to_associate): Remove call to
663         gfc_resolve_expr and replace it with explicit setting of the
664         array reference type.
665         * resolve.c (resolve_select_type): It is an error if the
666         selector is coindexed.
667
668 2013-01-04  Tobias Burnus  <burnus@net-b.de>
669
670         PR fortran/55763
671         * decl.c (gfc_match_null): Parse and reject MOLD.
672
673 2013-01-04  Tobias Burnus  <burnus@net-b.de>
674
675         PR fortran/55854
676         PR fortran/55763
677         * class.c (gfc_class_null_initializer): Fix finding the vtab.
678         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
679
680 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
681
682         PR fortran/55855
683         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
684         of rvalue. Correct hyphenation in error message.
685
686 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
687
688         * gfortranspec.c (lang_specific_driver): Update copyright notice
689         dates.
690 \f
691 Copyright (C) 2013 Free Software Foundation, Inc.
692
693 Copying and distribution of this file, with or without modification,
694 are permitted in any medium without royalty provided the copyright
695 notice and this notice are preserved.