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