1 2013-05-22 Tobias Burnus <burnus@net-b.de>
3 * resolve.c (get_temp_from_expr): Change mangling to
6 2013-05-22 Tobias Burnus <burnus@net-b.de>
8 * resolve.c (get_temp_from_expr): Fix temp var mangling.
10 2013-05-22 Tobias Burnus <burnus@net-b.de>
13 * resolve.c (get_temp_from_expr): Commit created sym.
15 2013-05-22 Tobias Burnus <burnus@net-b.de>
18 * intrinsic.c (do_check): Move some checks to ...
19 (do_ts29113_check): ... this new function.
20 (check_specific, gfc_intrinsic_sub_interface): Call it.
22 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
24 * intrinsic.texi (RANDOM_SEED): Improve example.
26 2013-05-21 Tobias Burnus <burnus@net-b.de>
29 * intrinsic.c (do_check): Add constraint check for
30 NO_ARG_CHECK, assumed rank and assumed type.
31 * gfortran.texi (NO_ARG_CHECK): Minor wording change,
32 allow PRESENT intrinsic.
34 2013-05-20 Tobias Burnus <burnus@net-b.de>
38 * decl.c (add_global_entry): Add sym_name.
39 * parse.c (add_global_procedure): Ditto.
40 * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
42 (resolve_global_procedure): Handle gsym->ns pointing to a module.
43 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
45 2013-05-20 Tobias Burnus <burnus@net-b.de>
48 * decl.c (add_global_entry): Use nonbinding name
49 only for F2003 or if no binding label exists.
50 (gfc_match_entry): Update calls.
51 * parse.c (gfc_global_used): Improve error message.
52 (add_global_procedure): Use nonbinding name
53 only for F2003 or if no binding label exists.
54 (gfc_parse_file): Update call.
55 * resolve.c (resolve_global_procedure): Use binding
57 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
59 2013-05-20 Tobias Burnus <burnus@net-b.de>
62 * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
63 * match.c (gfc_match_common): Don't add commons to gsym.
64 * resolve.c (resolve_common_blocks): Add to gsym and
66 (resolve_bind_c_comms): Remove.
67 (resolve_types): Remove call to the latter.
68 * trans-common.c (gfc_common_ns): Remove static var.
69 (gfc_map_of_all_commons): Add static var.
70 (build_common_decl): Correctly handle binding label.
72 2013-05-16 Jason Merrill <jason@redhat.com>
74 * Make-lang.in (f951$(exeext)): Use link mutex.
76 2013-05-05 Tobias Burnus <burnus@net-b.de>
78 * resolve.c (conformable_arrays): Avoid segfault
79 when ar.start[i] == NULL.
81 2013-05-05 Tobias Burnus <burnus@net-b.de>
84 * decl.c (gfc_match_null): Permit use-associated
87 2013-05-04 Tobias Burnus <burnus@net-b.de>
89 * decl.c (gfc_verify_c_interop_param): Permit allocatable
90 and pointer with -std=f2008ts.
92 2013-05-02 Tobias Burnus <burnus@net-b.de>
95 * simplify.c (gfc_simplify_size): Renamed from
96 simplify_size; fix kind=8 handling.
97 (gfc_simplify_size): New function.
98 (gfc_simplify_shape): Add range check.
99 * resolve.c (resolve_function): Fix handling
102 2013-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
104 * frontend-passes.c (optimize_power): Fix typo
107 2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
110 * frontend-passes.c (optimize_power): Simplify
113 2013-04-28 Tobias Burnus <burnus@net-b.de>
116 * intrinsic.texi (RANK): Correct syntax description and
119 2013-04-28 Tobias Burnus <burnus@net-b.de>
122 * trans-types.c (gfc_get_element_type): Fix handling
123 of scalar coarrays of type character.
124 * intrinsic.texi (PACK): Add missing ")".
126 2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
129 * frontend-passes (optimize_power): New function.
130 (optimize_op): Use it.
132 2013-04-25 Janne Blomqvist <jb@gcc.gnu.org>
135 * Make-lang.in (f951): Link in ZLIB.
136 (CFLAGS-fortran/module.o): Add zlib include directory.
138 2013-04-22 Janus Weil <janus@gcc.gnu.org>
142 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
144 * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
145 of special treatment for EXPR_ARRAY.
146 * target-memory.h (gfc_element_size): New prototype.
147 * target-memory.c (size_array): Remove.
148 (gfc_element_size): New function.
149 (gfc_target_expr_size): Modified to always return the full size of the
152 2013-04-20 Tobias Burnus <burnus@net-b.de>
155 * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
158 2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
159 Mikael Morin <mikael@gcc.gnu.org>
162 * frontend-passes.c (copy_walk_reduction_arg): Change argument type
163 to gfc_constructor. If it has an iterator, wrap the copy of its
164 expression in an array constructor with that iterator. Don't special
165 case function expressions.
166 (callback_reduction): Update caller. Don't return early if there is
169 2013-04-18 Tobias Burnus <burnus@net-b.de>
171 * expr.c (find_array_element): Don't copy expr.
172 * data.c (create_character_initializer): Free expr.
173 * frontend-passes.c (combine_array_constructor): Ditto.
174 * match.c (match_typebound_call, gfc_match_select_type): Ditto.
175 * resolve.c (resolve_typebound_function): Free gfc_ref.
177 2013-04-18 Tobias Burnus <burnus@net-b.de>
180 * invoke.texi (NEAREST): S argument is not optional.
182 2013-04-17 Janus Weil <janus@gcc.gnu.org>
185 * interface.c (check_result_characteristics): Get result from interface
188 2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
191 * scanner.h: New file.
192 * Make-lang.in: Dependencies on scanner.h.
193 * scanner.c (gfc_directorylist): Move to scanner.h.
194 * module.c: Don't include md5.h, include scanner.h and zlib.h.
195 (MOD_VERSION): Add comment about backwards compatibility.
196 (module_fp): Change type to gzFile.
198 (gzopen_included_file_1): New function.
199 (gzopen_included_file): New function.
200 (gzopen_intrinsic_module): New function.
201 (write_char): Use gzputc.
202 (read_crc32_from_module_file): New function.
203 (read_md5_from_module_file): Remove.
204 (gfc_dump_module): Use gz* functions instead of stdio, check gzip
205 crc32 instead of md5.
206 (read_module_to_tmpbuf): Use gz* functions instead of stdio.
207 (gfc_use_module): Use gz* functions.
209 2013-04-16 Tobias Burnus <burnus@net-b.de>
212 * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
213 * gfortran.h (ext_attr_id_t): Ditto.
214 * gfortran.texi (GNU Fortran Compiler Directives):
216 * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
217 (compare_parameter): Ditto - and regard as unlimited polymorphic.
218 * resolve.c (resolve_symbol, resolve_variable): Add same constraint
219 checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
220 (gfc_explicit_interface_required): Require explicit interface
223 2013-04-16 Janus Weil <janus@gcc.gnu.org>
226 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
229 2013-04-16 Tobias Burnus <burnus@net-b.de>
232 * intrinsic.c (gfc_intrinsic_func_interface): Don't set
233 module name to "(intrinsic)" for intrinsics from intrinsic
236 2013-04-15 Tobias Burnus <burnus@net-b.de>
238 * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
240 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
243 * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
245 2013-04-15 Tobias Burnus <burnus@net-b.de>
247 * class.c (gfc_find_intrinsic_vtab): Removed unused var.
248 * dependency.c (check_data_pointer_types): Fix check.
249 * frontend-passes.c (check_data_pointer_types): Remove
250 superfluous statement.
251 * parse.c (decode_omp_directive): Add missing break.
252 * resolve.c (resolve_typebound_subroutine: Free variable.
253 * trans-decl.c (create_function_arglist): Correct condition.
255 2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
258 * match.c (gfc_match_select_type): Add syntax error. Move namespace
259 allocation and cleanup...
260 * parse.c (decode_statement): ... here.
262 2013-04-13 Janus Weil <janus@gcc.gnu.org>
265 * expr.c (gfc_simplify_expr): Branch is not unreachable.
267 2013-04-12 Janus Weil <janus@gcc.gnu.org>
270 * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
272 2013-04-12 Tobias Burnus <burnus@net-b.de>
275 * trans-array.c (duplicate_allocatable): Fix handling
278 2013-04-12 Janus Weil <janus@gcc.gnu.org>
281 * gfortran.h (gfc_explicit_interface_required): New prototype.
282 * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
283 required in a proc-ptr assignment.
284 * interface.c (check_result_characteristics): Extra check.
285 * resolve.c (gfc_explicit_interface_required): New function.
286 (resolve_global_procedure): Use new function
287 'gfc_explicit_interface_required'. Do a full interface check.
289 2013-04-12 Tobias Burnus <burnus@net-b.de>
292 * trans-decl.c (gfc_trans_deferred_vars): Restrict
293 static CLASS init to SAVE and -fno-automatic.
295 2013-04-12 Tobias Burnus <burnus@net-b.de>
298 * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
299 allocatable static BT_CLASS.
300 * trans-expr.c (gfc_class_set_static_fields): New function.
301 * trans.h (gfc_class_set_static_fields): New prototype.
303 2013-04-11 Janne Blomqvist <jb@gcc.gnu.org>
305 * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
306 * arith.c: Replace gfc_try with bool type.
317 * f95-lang.c: Likewise.
318 * interface.c: Likewise.
319 * intrinsic.c: Likewise.
320 * intrinsic.h: Likewise.
324 * module.c: Likewise.
325 * openmp.c: Likewise.
328 * primary.c: Likewise.
329 * resolve.c: Likewise.
330 * scanner.c: Likewise.
331 * simplify.c: Likewise.
332 * symbol.c: Likewise.
333 * trans-intrinsic.c: Likewise.
334 * trans-openmp.c: Likewise.
335 * trans-stmt.c: Likewise.
336 * trans-types.c: Likewise.
338 2013-04-09 Tobias Burnus <burnus@net-b.de>
340 * gfortran.texi (KIND Type Parameters,
341 Internal representation of LOGICAL variables): Add crossrefs.
342 (Intrinsic Types): Mention issues with _Bool interop.
343 (Naming and argument-passing conventions): New section.
345 2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
348 * frontend-passes.c (callback_reduction): Dont't do
349 any simplification if there is only a single element
350 which has an iterator.
352 2013-04-07 Tobias Burnus <burnus@net-b.de>
355 * iresolve.c (gfc_resolve_reshape): Set shape also
358 2013-04-04 Janus Weil <janus@gcc.gnu.org>
361 * match.c (gfc_match_return): Remove standard notification.
362 * primary.c (gfc_match_actual_arglist): Add standard notification.
364 2013-04-04 Tobias Burnus <burnus@net-b.de>
367 * gcc/fortran/check.c (is_c_interoperable,
368 gfc_check_c_loc): Correct c_loc array checking
369 for Fortran 2003 and Fortran 2008.
371 2013-04-03 Janus Weil <janus@gcc.gnu.org>
375 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
377 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
379 2013-04-01 Janus Weil <janus@gcc.gnu.org>
382 * symbol.c (gfc_set_default_type): Build class container for
385 2013-03-31 Tobias Burnus <burnus@net-b.de>
387 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
388 generate_finalization_wrapper): Avoid segfault with absent SIZE=
389 argment to TRANSFER and use correct result kind for SIZE.
390 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
392 * trans.c (gfc_build_final_call): Handle coarrays.
394 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
396 * trans-expr.c (build_memcmp_call): New function.
397 (gfc_build_compare_string): If the strings
398 compared have constant and equal lengths and
399 the strings are kind=1, or, for kind=4 strings,
400 the test is for (in)equality, use memcmp().
402 2013-03-29 Tobias Burnus <burnus@net-b.de>
405 * trans-decl.c (create_function_arglist): Pass hidden argument
406 for passed-by-value optional+value dummies.
407 * trans-expr.c (gfc_conv_expr_present,
408 gfc_conv_procedure_call): Handle those.
410 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
413 * gfortran.h (gfc_dep_difference): Add prototype.
414 * dependency.c (discard_nops): New function.
415 (gfc_dep_difference): New function.
416 (check_section_vs_section): Use gfc_dep_difference
417 to calculate the difference of starting indices.
418 * trans-expr.c (gfc_conv_substring): Use
419 gfc_dep_difference to calculate the length of
420 substrings where possible.
422 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
425 * frontend-passes.c (optimize_code): Keep track of
426 current code to make code insertion possible.
427 (combine_array_constructor): New function.
428 (optimize_op): Call it.
430 2013-03-27 Tobias Burnus <burnus@net-b.de>
434 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
435 gfc_check_storage_size): Update checks.
436 * intrinsic.texi (SIZEOF): Correct class.
437 * intrinsic.h (gfc_simplify_sizeof,
438 gfc_simplify_storage_size): New prototypes.
439 * intrinsic.c (add_functions): Use them.
440 * simplify.c (gfc_simplify_sizeof,
441 gfc_simplify_storage_size): New functions.
443 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
446 * module.c (module_locus): Use long for position.
447 (module_content): New variable.
448 (module_pos): Likewise.
449 (prev_character): Remove.
450 (bad_module): Free data instead of closing mod file.
451 (set_module_locus): Use module_pos.
452 (get_module_locus): Likewise.
453 (module_char): use buffer rather than stdio file.
454 (module_unget_char): Likewise.
455 (read_module_to_tmpbuf): New function.
456 (gfc_use_module): Call read_module_to_tmpbuf.
458 2013-03-26 Tobias Burnus <burnus@net-b.de>
461 * simplify.c (gfc_simplify_merge): Simplify more.
463 2013-03-25 Tobias Burnus <burnus@net-b.de>
483 * check.c (gfc_var_strlen): Properly handle 0-sized string.
484 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
485 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
486 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
488 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
490 (gfc_check_pointer_assign): Refine function result check.
491 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
492 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
494 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
496 (generate_isocbinding_symbol): Update prototype.
497 (get_iso_c_sym): Remove.
498 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
499 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
500 (gfc_intrinsic_sub_interface): Use it.
501 (add_functions, add_subroutines): Add missing C-binding intrinsics.
502 (gfc_intrinsic_func_interface): Add special case for c_loc.
503 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
504 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
505 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
506 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
507 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
508 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
510 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
512 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
513 * module.c (create_intrinsic_function): Support subroutines and
514 derived-type results.
515 (use_iso_fortran_env_module): Update calls.
516 (import_iso_c_binding_module): Ditto; update calls to
517 generate_isocbinding_symbol.
518 * resolve.c (find_arglists): Skip for intrinsic symbols.
519 (gfc_resolve_intrinsic): Find intrinsic subs via id.
520 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
521 set_name_and_label, gfc_iso_c_sub_interface): Remove.
522 (resolve_function, resolve_specific_s0): Remove calls to those.
523 (resolve_structure_cons): Fix handling.
524 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
526 (gen_cptr_param, gen_fptr_param, gen_shape_param,
527 build_formal_args, get_iso_c_sym): Remove.
528 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
529 (generate_isocbinding_symbol): Support hidden symbols and
530 using c_ptr/c_funptr symtrees for nullptr defs.
531 * target-memory.c (gfc_target_encode_expr): Fix handling
533 * trans-expr.c (conv_isocbinding_procedure): Remove.
534 (gfc_conv_procedure_call): Remove call to it.
535 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
537 * trans-intrinsic.c (conv_isocbinding_function,
538 conv_isocbinding_subroutine): New.
539 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
541 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
542 * trans-types.c (gfc_typenode_for_spec,
543 gfc_get_derived_type): Ditto.
544 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
546 2013-03-18 Tobias Burnus <burnus@net-b.de>
548 * gfortran.h (gfc_option_t): Remove flag_whole_file.
549 * invoke.texi (-fno-whole-file): Remove.
550 * lang.opt (fwhole-file): Change to Ignore.
551 * options.c (gfc_init_options, gfc_post_options,
552 gfc_handle_option): Remove !flag_whole_file handling
553 * parse.c (resolve_all_program_units, translate_all_program_units,
554 gfc_parse_file): Ditto.
555 * resolve.c (resolve_global_procedure): Ditto.
556 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
557 gfc_create_module_variable): Ditto.
558 * trans-types.c (gfc_get_derived_type): Ditto.
560 2013-03-15 Tobias Burnus <burnus@net-b.de>
563 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
564 if they are not simply contiguous.
566 2013-03-11 Tobias Burnus <burnus@net-b.de>
568 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
569 to convert them into derived types.
571 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
574 * expr.c (gfc_default_initializer): Check that a class declared
575 type has any components.
576 * resolve.c (resolve_fl_derived0): On failing the test for C437
577 set the type to BT_UNKNOWN to prevent repeat error messages.
579 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
582 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
584 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
587 * array.c (gfc_match_array_constructor): Set a checkpoint before
588 matching a typespec. Drop it on success, restore it otherwise.
590 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
593 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
594 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
595 gfc_restore_last_undo_checkpoint): New prototypes.
596 * symbol.c (default_undo_chgset_var): Update initialization.
597 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
598 free_undo_change_set_data, pop_undo_change_set,
599 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
601 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
602 field's previous value is not overwritten. Clear gfc_new field.
603 (restore_old_symbol): Restore previous old_symbol field.
604 (gfc_restore_last_undo_checkpoint): New function, using body renamed
605 from gfc_undo_symbols. Restore the previous change set as current one.
606 (gfc_undo_symbols): New body.
607 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
608 Call enforce_single_undo_checkpoint.
609 (gfc_symbol_done_2): Ditto. Free change set data.
611 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
613 * symbol.c (restore_old_symbol): Fix thinko.
615 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
617 * symbol.c (gfc_undo_symbols): Move code...
618 (restore_old_symbol): ... here as a new function.
620 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
622 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
623 * gfortran.h: Include vec.h.
624 (gfc_undo_change_set): New struct.
625 * symbol.c (tentative_tbp): Remove struct.
626 (changed_syms, tentative_tbp_list): Remove variables.
627 (default_undo_chgset_var, latest_undo_chgset): New variables.
628 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
629 gfc_commit_symbols, gfc_commit_symbol,
630 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
631 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
633 2013-03-01 Tobias Burnus <burnus@net-b.de>
636 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
637 * symbol.c (free_components): Free proc-pointer components.
639 2013-03-01 Tobias Burnus <burnus@net-b.de>
641 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
642 * trans-io.c (build_dt): Ditto.
644 2013-02-24 Joseph Myers <joseph@codesourcery.com>
646 * resolve.c (generate_component_assignments): Don't use UTF-8
647 ligature in diagnostic.
649 2013-02-21 Janus Weil <janus@gcc.gnu.org>
652 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
653 components with allocatable result.
655 2013-02-21 Tobias Burnus <burnus@net-b.de>
658 * gfortran.texi (Part II: Language Reference, Extensions,
659 Non-Fortran Main Program): Sort @menu to match actual section order.
660 * intrinsic.texi (Intrinsic Procedures): Ditto.
661 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
663 2013-02-15 Tobias Burnus <burnus@net-b.de>
664 Mikael Morin <mikael@gcc.gnu.org>
667 * simplify.c (gfc_simplify_matmul): Fix result shape
670 2013-02-15 Tobias Burnus <burnus@net-b.de>
673 * resolve.c (apply_default_init_local): Don't create an
674 initializer for a result variable.
676 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
679 * gfortran.h (gfc_add_include_path): Add boolean argument
681 * scanner.c (gfc_add_include_path): Pass along warn argument
683 * options.c (gfc_post_options): Add true warn argument to
684 gfc_add_include_path.
685 (gfc_handle_module_path_options): Likewise.
686 (gfc_handle_option): Also gfc_add_include_path for intrinsic
687 modules, without warning.
689 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
690 Tobias Burnus <burnus@net-b.de>
693 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
694 results for functions without extra result variable.
697 2013-01-30 Tobias Burnus <burnus@net-b.de>
700 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
701 results for functions without extra result variable.
703 2013-02-12 Janus Weil <janus@gcc.gnu.org>
706 * resolve.c (resolve_call): Do not check deferred procedures for
709 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
712 * check.c (array_check): It is an error if a procedure is
715 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
718 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
719 to error_mark_node on entry. Detect recursive types. Build a variadic
720 procedure type if the type is recursive. Restore the initial
723 2013-02-07 Tobias Burnus <burnus@net-b.de>
726 * gfortran.texi (Standards): Mention TS29113.
727 (Varying Length Character): Mention deferred-length
729 (Fortran 2003 Status): Add unlimited polymorphic.
730 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
731 (C Interop): Update the section about TS29113.
733 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
736 * trans-array.c (trans_array_constructor): Remove condition
737 'dynamic' = true if the loop ubound is a VAR_DECL.
739 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
743 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
744 the lhs descriptor before it is modified for reallocation. Use
745 it to deallocate allocatable components in the reallocation
746 block. Nullify allocatable components for newly (re)allocated
749 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
752 * resolve.c (resolve_typebound_procedures): Recurse through
755 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
759 * gfortran.h (struct gfc_symbol): New field 'resolved'.
760 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
761 (resolve_symbol): Skip duplicate calls. Don't check the current
764 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
768 * decl.c (gfc_match_end): Remove half-ready namespace
769 from parent if the end of a block is missing.
770 * parse.c (parse_module): Do not put namespace into
773 2013-01-30 Tobias Burnus <burnus@net-b.de>
776 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
777 results for functions without extra result variable.
779 2013-01-29 Janus Weil <janus@gcc.gnu.org>
780 Mikael Morin <mikael@gcc.gnu.org>
783 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
784 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
785 gfc_expr_replace_comp): Delete.
786 (gfc_sym_get_dummy_args): New prototype.
787 * dependency.c (gfc_check_fncall_dependency): Use
788 'gfc_sym_get_dummy_args'.
789 * expr.c (gfc_is_constant_expr): Ditto.
790 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
791 gfc_expr_replace_comp): Deleted.
792 * frontend-passes.c (doloop_code,do_function): Use
793 'gfc_sym_get_dummy_args'.
794 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
795 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
796 gfc_check_typebound_override): Ditto.
797 * module.c (MOD_VERSION): Bump module version.
798 (mio_component): Do not read/write 'formal' and 'formal_ns'.
799 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
800 copy formal args, but just keep a pointer to the interface.
801 (resolve_function,resolve_call,resolve_typebound_generic_call,
802 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
803 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
804 resolve_typebound_procedure,check_uop_procedure): Use
805 'gfc_sym_get_dummy_args'.
806 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
807 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
808 (gfc_sym_get_dummy_args): New function.
809 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
810 Use 'gfc_sym_get_dummy_args'.
811 * trans-decl.c (build_function_decl,create_function_arglist,
812 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
813 add_argument_checking): Ditto.
814 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
815 gfc_conv_statement_function): Ditto.
816 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
817 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
819 2013-01-28 Tobias Burnus <burnus@net-b.de>
820 Mikael Morin <mikael@gcc.gnu.org>
823 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
825 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
826 * decl.c (gfc_match_data_decl): Ditto.
827 (variable_decl): Remove undeclared type error.
828 (gfc_match_import): Use renamed instead of original name.
830 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
834 * gfortran.h : Add associate_var to symbol_attr.
835 * resolve.c (resolve_assoc_var): Set associate_var attribute.
836 If the target class_ok is set, set it for the associate
838 * check.c (allocatable_check): Associate variables should not
839 have the allocatable attribute even if their symbols do.
840 * class.c (gfc_build_class_symbol): Symbols with associate_var
841 set will always have a good class container.
843 2013-01-23 Janus Weil <janus@gcc.gnu.org>
846 * resolve.c (resolve_select): Add argument 'select_type', reject
847 non-scalar expressions.
848 (resolve_select_type,resolve_code): Pass new argument to
851 2013-01-23 Jakub Jelinek <jakub@redhat.com>
854 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
855 and DECL_IGNORED_P on select_type_temporary and don't set
858 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
861 * scanner.c (add_path_to_list): Copy path to temporary and strip
862 trailing directory separators before calling stat().
864 2013-01-17 Richard Biener <rguenther@suse.de>
866 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
867 dependent on sign of step, avoids repeated evaluation of
868 step sign test. Avoid undefined overflow issues by using unsigned
871 2013-01-16 Janus Weil <janus@gcc.gnu.org>
874 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
877 2013-01-16 Jakub Jelinek <jakub@redhat.com>
878 Tobias Burnus <burnus@net-b.de>
881 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
882 (fintrinsic-modules-path=): New.
883 * options.c (gfc_handle_option, gfc_get_option_string,
884 gfc_get_option_string): Handle the latter.
886 2013-01-16 Jakub Jelinek <jakub@redhat.com>
889 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
890 and use value of countm1 before the decrement in the condition.
892 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
895 * expr.c (gfc_check_pointer_assign): Check for presence of
896 's2' before using it.
898 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
901 * frontend-passes.c (optimize_reduction): New function,
903 (callback_reduction): Likewise.
904 (gfc_run_passes): Also run optimize_reduction.
905 (copy_walk_reduction_arg): New function.
906 (dummy_code_callback): New function.
908 2013-01-13 Jakub Jelinek <jakub@redhat.com>
911 * trans-expr.c (gfc_conv_structure): Call
912 unshare_expr_without_location on the ctor elements.
914 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
917 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
918 and rvalue interfaces are presented to gfc_compare_interfaces.
919 Simplify references to interface names by using the symbols
920 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
921 changed to overcome the asymmetry of this function. Do not
922 repeat the check for the presence of s1 and s2.
924 2013-01-12 Janus Weil <janus@gcc.gnu.org>
927 * trans-array.c (gfc_conv_array_parameter): No packing was done for
928 full arrays of derived type.
930 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
933 * class.c (get_unique_type_string): Change $tar to STAR and
934 replace sprintf by strcpy where there is no formatting.
935 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
937 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
940 * module.c (check_for_ambiguous): Get the current program unit using
943 2013-01-09 Tobias Burnus <burnus@net-b.de>
946 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
947 in BIND(C) procedures with -std=f*.
949 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
952 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
953 character function arguments to elemental procedures in
956 2013-01-07 Tobias Burnus <burnus@net-b.de>
959 * gfortran.h (gfc_check_assign_symbol): Update prototype.
960 * decl.c (add_init_expr_to_sym, do_parm): Update call.
961 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
962 improve error location; support components.
963 (gfc_check_pointer_assign): Handle component assignments.
964 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
965 (resolve_values): Update call.
966 (resolve_structure_cons): Avoid double diagnostic.
968 2013-01-07 Tobias Burnus <burnus@net-b.de>
969 Thomas Koenig <tkoenig@gcc.gnu.org>
972 * expr.c (gfc_build_intrinsic_call): Avoid clashes
973 with user's procedures.
974 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
975 * simplify.c (gfc_simplify_size): Update call.
976 * class.c (finalization_scalarizer, finalization_get_offset,
977 finalizer_insert_packed_call, generate_finalization_wrapper):
978 Clean up by using gfc_build_intrinsic_call.
980 2013-01-07 Tobias Burnus <burnus@net-b.de>
983 * resolve.c (resolve_select_type): Reject intrinsic types for
984 a non-unlimited-polymorphic selector.
986 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
991 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
992 to see if it is GFC_CLASS_TYPE_P.
993 * trans-expr.c (gfc_get_vptr_from_expr): The same.
994 (gfc_conv_class_to_class): If the types are not the same,
995 cast parmese->expr to the type of ctree.
996 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
997 CLASS components must be set.
999 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
1004 * module.c (read_module): Don't reuse local symtree if the associated
1005 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
1007 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1010 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
1011 Mikael Morin <mikael@gcc.gnu.org>
1014 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1016 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1018 2013-01-05 Tobias Burnus <burnus@net-b.de>
1020 * class.c (finalize_component): Used passed offset expr.
1021 (finalization_get_offset): New static function.
1022 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1023 to handle noncontiguous arrays.
1025 2013-01-04 Tobias Burnus <burnus@net-b.de>
1027 * trans.c (gfc_build_final_call): New function.
1028 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1029 New function prototypes.
1030 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1031 conv_scalar_to_descriptor, removed static attribute.
1032 (gfc_conv_procedure_call): Honor renaming.
1034 2013-01-04 Tobias Burnus <burnus@net-b.de>
1036 * intrinsic.c (add_functions): New internal intrinsic
1037 function GFC_PREFIX ("stride").
1038 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1039 * intrinsic.h (gfc_resolve_stride): New prototypes.
1040 * iresolve.c (gfc_resolve_stride): New function.
1041 * trans-intrinsic.c (conv_intrinsic_stride): New static
1043 (gfc_conv_intrinsic_function): Use it.
1045 2013-01-04 Tobias Burnus <burnus@net-b.de>
1047 * class.c (gfc_find_intrinsic_vtab): Add _final
1049 * decl.c (gfc_match_null): Remove superfluous
1050 variadic argument to gfc_match.
1052 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
1055 * match.c (copy_ts_from_selector_to_associate): Remove call to
1056 gfc_resolve_expr and replace it with explicit setting of the
1057 array reference type.
1058 * resolve.c (resolve_select_type): It is an error if the
1059 selector is coindexed.
1061 2013-01-04 Tobias Burnus <burnus@net-b.de>
1064 * decl.c (gfc_match_null): Parse and reject MOLD.
1066 2013-01-04 Tobias Burnus <burnus@net-b.de>
1070 * class.c (gfc_class_null_initializer): Fix finding the vtab.
1071 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1073 2013-01-03 Janus Weil <janus@gcc.gnu.org>
1076 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1077 of rvalue. Correct hyphenation in error message.
1079 2013-01-03 Jakub Jelinek <jakub@redhat.com>
1081 * gfortranspec.c (lang_specific_driver): Update copyright notice
1084 Copyright (C) 2013 Free Software Foundation, Inc.
1086 Copying and distribution of this file, with or without modification,
1087 are permitted in any medium without royalty provided the copyright
1088 notice and this notice are preserved.