1 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
3 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
5 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
7 * interface.c (compare_components): Fix typo in name check conditional.
9 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
10 Bud Davis <jmdavis@link.com>
13 * parse.c (next_free,next_fixed): Issue error for statement label
16 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
19 * interface.c (compare_parameter): Use better locus for error message.
21 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
24 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
25 for unused variable if symbol is entry point.
27 2016-08-19 Joseph Myers <joseph@codesourcery.com>
30 * trans-types.h (float128_type_node): Rename to
31 gfc_float128_type_node.
32 (complex_float128_type_node): Rename to
33 gfc_complex_float128_type_node.
34 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
37 2016-08-19 Jakub Jelinek <jakub@redhat.com>
40 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
41 and restore omp state around the resolving.
44 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
45 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
46 BIND_EXPR with its own forced BLOCK.
48 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
50 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
51 init_random_seed in example.
52 (RANDOM_SEED): Remove warning to not set all seed values to 0.
54 2016-08-18 David Malcolm <dmalcolm@redhat.com>
56 * error.c (gfc_diagnostic_starter): Update for change to
57 diagnostic_show_locus.
59 2016-08-17 Jakub Jelinek <jakub@redhat.com>
62 * trans-array.c (trans_array_constructor): Load
63 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
66 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
68 * lang.opt, invoke.texi: New flag -finit-derived.
69 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
70 gfc_generate_initializer): New prototypes.
71 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
72 component_initializer, gfc_generate_initializer): New functions.
73 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
74 * decl.c (build_struct): Move common code to gfc_apply_init.
75 * resolve.c (can_generate_init): New function.
76 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
77 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
78 gfc_generate_initializer.
79 * trans-decl.c (gfc_generate_function_code): Use
80 gfc_generate_initializer.
82 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
84 * frontend-passes.c (create_var): Set ts.deferred for
85 deferred-length character variables.
86 * dump-parse-tree.c (show_typespec): Also dump
87 is_c_interop, is_iso_c and deferred flags.
89 2016-08-15 Jakub Jelinek <jakub@redhat.com>
92 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
93 for decl's character length before gfc_finish_var_decl on the
96 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
99 * openmp.c (resolve_omp_clauses): Adjust use_device clause
100 handling to only allow pointers and arrays.
102 2016-08-12 Marek Polacek <polacek@redhat.com>
105 * decl.c (match_attr_spec): Add FALLTHRU.
106 * primary.c (match_arg_list_function): Likewise.
107 * resolve.c (resolve_operator): Adjust fall through comment.
108 (fixup_charlen): Add FALLTHRU.
109 (resolve_allocate_expr): Adjust fall through comment.
110 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
111 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
114 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
116 * check.c (gfc_check_random_seed): Use new seed size in check.
117 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
118 (RANDOM_SEED): Likewise.
120 2016-08-08 Jakub Jelinek <jakub@redhat.com>
123 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
124 BLOCK DATA ns, it will be rejected later.
126 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
129 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
130 stick with the ref of the object to allocate.
132 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
135 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
136 copy of zero sized string and with it an ICE.
138 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
141 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
142 location information is correctly set.
143 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
144 current construct early.
146 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
148 * lang.opt: New option -fdec-intrinsic-ints.
149 * options.c (set_dec_flags): Enable with -fdec.
150 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
151 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
154 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
157 * target-memory.c (expr_to_char): Pass in locus and use it in error
159 (gfc_merge_initializers): Ditto.
160 * target-memory.h: Update prototype for gfc_merge_initializers ().
161 * trans-common.c (get_init_field): Use the correct locus.
163 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
166 * check.c (gfc_check_reshape): Check for constant expression.
168 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
171 * decl.c (build_struct): Ensure that pointers point to something.
173 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
176 * decl.c (gfc_set_constant_character_len): if expr is not
177 constant issue an error instead of an ICE.
179 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
182 * io.c (gfc_resolve_dt): Use correct locus.
183 * resolve.c (resolve_branch): Ditto.
185 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
188 * decl.c (char_len_param_value): Check return value of
189 gfc_reduce_init_expr().
191 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
193 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
194 message (was too small).
196 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
199 * decl.c (match_data_constant): On error, set 'result' to NULL.
201 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
204 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
207 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
210 * check.c(numeric_check): Prevent ICE. Issue error for invalid
211 subroutine as an actual argument when numeric argument is expected.
213 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
214 Thomas Koenig <tkoenig@gcc.gnu.org>
217 * frontend-passes.c (gfc_run_passes): Bail out if there are any
219 * error.c (gfc_internal_error): If there are any errors in the
220 buffer, exit with EXIT_FAILURE.
222 2016-07-28 Renlin Li <renlin.li@arm.com>
225 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
228 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
229 if identical is true and two array element references differ.
230 (gfc_dep_resovler): Move most of the code to dep_ref.
231 (dep_ref): New function.
232 * frontend-passes.c (realloc_string_callback): Name temporary
233 variable "realloc_string".
235 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
238 * class.c: Remove assert. Iterate over component only if non-null.
240 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
243 * check.c (is_c_interoperable): Simplify right expression.
245 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
248 * frontend-passes.c (combine_array_constructor): Don't
249 do anything if the expression is inside an array iterator.
251 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
253 * expr.c (gfc_find_stat_co): Fixed whitespaces.
254 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
255 src and dst description.
256 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
257 and corrected fnspec for caf functions.
258 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
259 (conv_caf_send): Dito.
261 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
264 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
265 if identical is true and two array element references differ.
266 (gfc_dep_resovler): Move most of the code to dep_ref.
267 (dep_ref): New function.
268 * frontend-passes.c (realloc_string_callback): Name temporary
269 variable "realloc_string".
271 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
274 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
277 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
278 Marco Restelli <mrestelli@gmail.com>
281 * symbol.c (select_type_insert_tmp): Recursively call self to take care
282 of nested select type.
284 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
286 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
289 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
292 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
293 when allocatable component is set to null() in initializer.
295 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
298 * parse.c (parse_contained): Use proper locus.
300 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
303 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
304 types replace the expression's _data ref with a _len ref.
306 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
309 * frontend-passes.c (create_var): Always allocate a charlen
310 for character variables.
312 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
315 * simplify (gfc_simplify_spread): Adjust locus.
317 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
319 * parse.c (matcha): Define.
320 (decode_oacc_directive): Add spec_only local var and set it. Use
321 matcha to parse acc directives except for routine and declare. Return
322 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
325 2016-07-08 Martin Liska <mliska@suse.cz>
327 * invoke.texi (Wundefined-do-loop): Enhance documentation.
329 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
332 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
334 2016-07-07 Martin Liska <mliska@suse.cz>
336 * lang.opt (Wundefined-do-loop): New option.
337 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
338 (gfc_trans_simple_do): Generate a c-style loop.
339 (gfc_trans_do): Fix GNU coding style.
340 * invoke.texi: Mention the new warning.
342 2016-07-07 Martin Liska <mliska@suse.cz>
344 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
345 loops with step bigger than +-1.
347 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
349 * array.c (gfc_match_array_ref): Add parsing support for
350 STAT= attribute in CAF reference.
351 * expr.c (gfc_find_stat_co): New function that returns
352 the STAT= assignment.
353 * gfortran.h (gfc_array_ref): New member.
354 * trans-decl.c (gfc_build_builtin_function_decls):
355 new attribute for caf_get and caf_send functions.
356 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
357 the stat attribute to external function.
358 (gfc_conv_intrinsic_caf_send): Ditto.
360 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
363 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
364 in allocate to parent block.
366 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
369 * decl.c (match_procedure_interface): Exit loop if procedure
370 interface refers to itself.
372 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
373 Steven G. Kargl <kargl@gcc.gnu.org>
376 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
377 SHIFT is less than or equal to SIZE.
379 2016-07-01 Jakub Jelinek <jakub@redhat.com>
382 * f95-lang.c (struct binding_level): Add reversed field.
383 (clear_binding_level): Adjust initializer.
384 (getdecls): If reversed is clear, set it and nreverse the names
385 chain before returning it.
386 (poplevel): Use getdecls.
387 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
388 Use nreverse to pushdecl decls in the declaration order.
391 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
392 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
394 2016-06-30 Jakub Jelinek <jakub@redhat.com>
397 * parse.c (matchs, matcho): Move right before decode_omp_directive.
398 If spec_only, only gfc_match the keyword and if successful, goto
400 (matchds, matchdo): Define.
401 (decode_omp_directive): Add spec_only local var and set it.
402 Use matchds or matchdo macros instead of matchs or matcho
403 for declare target, declare simd, declare reduction and threadprivate
404 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
405 directive could be matched.
406 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
407 gfc_current_locus from old_locus even if there is no label.
410 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
411 decls in to/from clauses.
413 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
416 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
419 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
421 * openmp.c (match_oacc_clause_gang): Rename to ...
422 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
424 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
425 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
426 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
427 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
428 oacc_expr_lists. Adjust the first and needs_space arguments to
429 gfc_match_omp_clauses.
431 2016-06-29 Richard Biener <rguenther@suse.de>
434 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
435 (gfc_get_alias_set): Remove.
437 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
440 * module.c (create_intrinsic_function): Check for NULL values and
441 return after giving error.
443 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
445 * trans-types.c (gfc_build_complex_type): Move setting complex
446 MODE to layout_type, instead of setting it ahead of time by the
449 2016-06-21 Tobias Burnus <burnus@net-b.de>
452 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
453 (check_data_variable): Strip-off caf_get before checking.
455 2016-06-20 Tobias Burnus <burnus@net-b.de>
458 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
459 RHS pointer functions.
461 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
463 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
464 instead of gfc_add_component_ref().
465 (gfc_get_len_component): Call gfc_add_len_component() instead of
466 gfc_add_component_ref().
467 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
468 gfc_add_data_component() instead of gfc_add_component_ref().
469 * trans.c (gfc_add_finalizer_call): Call
470 gfc_add_final_component() and gfc_add_size_component() instead
471 of gfc_add_component_ref.
473 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
475 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
477 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
479 * openmp.c (match_acc): New generic function to parse OpenACC
481 (gfc_match_oacc_parallel_loop): Use it.
482 (gfc_match_oacc_parallel): Likewise.
483 (gfc_match_oacc_kernels_loop): Likewise.
484 (gfc_match_oacc_kernels): Likewise.
485 (gfc_match_oacc_data): Likewise.
486 (gfc_match_oacc_host_data): Likewise.
487 (gfc_match_oacc_loop): Likewise.
488 (gfc_match_oacc_enter_data): Likewise.
489 (gfc_match_oacc_exit_data): Likewise.
491 2016-06-16 Martin Liska <mliska@suse.cz>
493 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
495 2016-06-16 Martin Liska <mliska@suse.cz>
497 * trans-array.c (gfc_array_allocate): Do not generate expect
499 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
500 predictor for malloc return value.
501 (gfc_allocate_allocatable): Use REALLOC predictor instead of
503 (gfc_deallocate_with_status): Likewise.
505 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
508 * frontend-passes.c (realloc_string_callback): Add a call to
509 gfc_dep_compare_expr.
511 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
514 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
516 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
519 * openmp.c (gfc_match_oacc_cache): Add comment.
521 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
524 * io.c (match_io): For READ, commit in pending symbols in the
525 current statement before trying to match an expression so that
526 if the match fails and we undo symbols we dont toss good symbols.
528 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
531 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
532 the address of the _data component to reference the arrays data
535 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
537 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
538 bool parameter, set reduction clause DECLs as addressable when true.
539 (gfc_trans_omp_clauses): Pass clauses->async to
540 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
542 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
545 * io.c (match_io): For READ, try to match a default character
546 expression. If found, set the dt format expression to this,
547 otherwise go back and try control list.
549 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
552 * decl.c (copy_prefix): Add checks that the module procedure
553 declaration prefixes are compliant with the interface. Invert
554 order of existing elemental and pure checks.
555 * resolve.c (resolve_fl_procedure): Invert order of elemental
558 2016-06-01 Jakub Jelinek <jakub@redhat.com>
560 * parse.c (case_decl): Move ST_OMP_* to ...
561 (case_omp_decl): ... here, new macro.
562 (verify_st_order): For case_omp_decl, complain about
563 p->state >= ORDER_EXEC, but don't change p->state otherwise.
565 2016-05-26 Jakub Jelinek <jakub@redhat.com>
567 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
570 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
573 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
574 current locus back to old_locus.
576 2016-05-20 Jakub Jelinek <jakub@redhat.com>
579 * frontend-passes.c (realloc_string_callback): Clear inserted_block
580 and changed_statement before calling create_var.
582 2016-05-15 Harald Anlauf <anlauf@gmx.de>
585 * interface.c (compare_parameter): Check for non-NULL pointer.
587 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
589 * gfortran.texi: Update example of DEC UNION extension.
591 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
594 * expr.c (gfc_default_initializer): Avoid extra component refs in
595 constructors for derived types and classes.
597 2016-05-11 Jakub Jelinek <jakub@redhat.com>
600 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
602 2016-05-09 Richard Biener <rguenther@suse.de>
605 * trans-decl.c: Include gimplify.h for unshare_expr.
606 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
609 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
612 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
613 (dt_lower_string): Likewise.
614 * gfortran.h: Make new gfc_dt_upper/lower_string global.
615 * class.c: Use gfc_dt_upper_string.
617 * symbol.c: Likewise.
618 * resolve.c (resolve_component): New function.
619 (resolve_fl_derived0): Move component loop code to resolve_component.
620 * parse.c (check_component): New function.
621 (parse_derived): Move loop code to check_component.
622 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
623 * libgfortran.h (bt): New basic type BT_UNION.
624 * gfortran.h (gfc_option): New option -fdec-structure.
625 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
626 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
628 (gfc_find_component): Change prototype.
629 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
630 gfc_match_structure_decl): New prototypes.
631 * parse.h (gfc_comp_struct): New macro.
632 * symbol.c (gfc_find_component): Search for components in nested unions
633 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
634 copy_vtab_proc_comps): Update calls to gfc_find_component.
635 * primary.c (gfc_convert_to_structure_constructor): Likewise.
636 * symbol.c (gfc_add_component): Likewise.
637 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
638 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
640 * expr.c (get_union_init, component_init): New functions.
641 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
642 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
643 * interface.c (compare_components, gfc_compare_union_types): Likewise.
644 * match.c (gfc_match_member_sep): Likewise.
645 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
646 * resolve.c (resolve_fl_struct): Likewise.
647 * symbol.c (find_union_component): Likewise.
648 * trans-types.c (gfc_get_union_type): Likewise.
649 * parse.c (parse_derived): Use new functions.
650 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
651 * expr.c (gfc_default_initializer): Likewise.
652 * gfortran.texi: Support for DEC structures, unions, and maps.
653 * gfortran.h (gfc_statement, sym_flavor): Likewise.
654 * check.c (gfc_check_kill_sub): Likewise.
655 * expr.c (gfc_copy_expr, simplify_const_ref,
656 gfc_has_default_initializer): Likewise.
657 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
658 match_pointer_init, build_struct, variable_decl,
659 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
660 gfc_match_end, gfc_match_derived_decl): Likewise.
661 * interface.c (check_interface0, check_interface1,
662 gfc_search_interface): Likewise.
663 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
664 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
665 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
666 gfc_get_module_backend_decl): Likewise.
667 * parse.h (gfc_compile_state): Likewise.
668 * parse.c (decode_specification_statement, decode_statement,
669 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
670 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
671 gfc_match_rvalue, match_variable): Likewise.
672 * resolve.c (find_arglists, resolve_structure_cons,
673 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
674 resolve_typebound_subroutine, resolve_allocate_expr,
675 nonscalar_typebound_assign, generate_component_assignments,
676 resolve_fl_variable_derived, check_defined_assignments,
677 resolve_component, resolve_symbol, resolve_equivalence_derived):
679 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
680 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
681 gfc_find_dt_in_generic): Likewise.
682 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
683 gfc_create_module_variable, check_constant_initializer): Likewise.
684 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
685 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
686 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
688 * trans-io.c (transfer_namelist_element, transfer_expr,
689 gfc_trans_transfer): Likewise.
690 * trans-stmt.c (gfc_trans_deallocate): Likewise.
691 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
692 gfc_get_derived_type): Likewise.
694 2016-05-05 Jakub Jelinek <jakub@redhat.com>
696 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
697 parsing is done in a big switch based on gfc_peek_ascii_char and
698 individual clauses under their first letters are sorted too.
700 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
702 * trans-types.c (gfc_build_complex_type):
704 2016-05-02 Richard Biener <rguenther@suse.de>
706 * trans-array.c (gfc_trans_create_temp_array): Properly
707 create a DECL_EXPR for the anonymous VLA array type.
709 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
712 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
713 the reduction clause in both parallel and loop directives.
715 2016-04-18 Michael Matz <matz@suse.de>
717 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
718 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
719 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
721 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
724 * intrinsic.texi: Correct the documentation of pseudorandom
727 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
730 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
733 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
736 * array.c (match_array_element_spec): Add check for non-integer.
737 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
739 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
742 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
743 future -Wparentheses warning.
745 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
748 * resolve.c (resolve_allocate_expr): Emit error message when no
749 array spec and no array valued source= expression is given in an
750 F2008 allocate() for an array to allocate.
752 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
755 * trans-array.c (gfc_array_allocate): When the array is a coarray,
756 do not nullyfing its allocatable components in array_allocate, because
757 the nullify missed the array ref and nullifies the wrong component.
760 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
763 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
764 constant zero tree, when the class to get the _len component from is
765 not unlimited polymorphic.
766 (gfc_copy_class_to_class): Use the new function.
767 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
769 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
771 * trans-decl.c (gfc_build_builtin_function_decls):
772 caf_stop_numeric and caf_stop_str definition.
773 * trans-stmt.c (gfc_trans_stop): invoke external functions
774 for stop and stop_str when coarrays are used.
775 * trans.h: extern for new functions.
777 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
780 * scanner.c (load_file): Update to use S_ISREG macro.
782 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
784 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
785 to OMP_MAP_DELETE. Adjust all users.
787 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
788 Jim MacArthur <jim.macarthur@codethink.co.uk>
791 * scanner.c (load_file): Check that included file is regular.
793 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
794 Harold Anlauf <anlauf@gmx.de>
797 * invoke.texi: Explain use of the 'no-' construct within the
799 * options.c (gfc_handle_runtime_check_option): Enable use of
800 'no-' prefix for the various options with -fcheck= to allow
801 negating previously enabled check options.
803 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
806 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
807 same way as the others, rather than fixing it to come last.
808 (gfc_match_function_decl, gfc_match_subroutine): After errors
809 in 'copy_prefix', emit them immediately in the case of module
810 procedures to prevent a later ICE.
813 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
814 declarations within the contains section of modules as well as
816 * resolve.c (resolve_fl_procedure): Likewise.
817 *trans-decl.c (build_function_decl): Change the gcc_assert to
818 allow all forms of module procedure declarations within module
821 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
825 * frontend-passes.c (realloc_string_callback): Don't set
828 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
830 * dump-parse-tree.c (show_code_node): Print association
831 list of a block if present. Handle EXEC_END_BLOCK.
833 2016-02-28 Harald Anlauf <anlauf@gmx.de>
834 Jerry DeLisle <jvdelisle@gcc.gnu.org>
837 * match.c (gfc_match_iterator): Add diagnostic for array variable
840 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
841 Steven G. Kargl <kargl@gcc.gnu.org>
844 * io.c (gfc_match_open): Check that open status is an expression
845 constant before comparing string to 'scratch' with NEWUNIT.
847 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
849 * trans.c (gfc_allocate_allocatable): size conversion
850 from byte to number of elements for event variables.
851 * trans-types.c (gfc_get_derived_type): event variables
852 represented as a pointer (like lock variable).
854 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
857 * scanner.c (add_path_to_list): If include path is not a directory,
860 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
863 * trans-array.c (gfc_array_allocate): Take the attributes from the
864 expression to allocate and not from the source=-expression.
866 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
869 * trans-decl.c (create_function_arglist): Deferred character
870 length functions, with and without declared results, address
871 the passed reference type as '.result' and the local string
872 length as '..result'.
873 (gfc_null_and_pass_deferred_len): Helper function to null and
874 return deferred string lengths, as needed.
875 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
876 code, add call for deferred arrays and reroute pointer function
877 results. Avoid using 'tmp' for anything other that a temporary
878 tree by introducing 'type_of_array' for the arrayspec type.
880 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
883 * frontend-passes.c (cfe-expr_0): Don't register functions
884 from within an ASSOCIATE statement.
886 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
889 * decl.c (build_sym): If the name has already been defined as a
890 type, it has a symtree with an upper case letter at the beginning.
891 If such a symtree exists, issue an error and exit. Don't do
892 this if there is no corresponding upper case letter.
894 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
898 * decl.c (build_sym): Reverted previous patch.
900 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
903 * decl.c (build_sym): If the name has already been defined as a
904 type, issue error and return false.
906 2016-02-12 David Malcolm <dmalcolm@redhat.com>
909 * error.c (gfc_diagnostic_start_span): New function.
910 (gfc_diagnostics_init): Initialize global_dc's start_span.
912 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
915 * gfortran.h: Added flag to gfc_association_list indicating that
916 the rank of an associate variable has been guessed only.
917 * parse.c (parse_associate): Set the guess flag mentioned above
918 when guessing the rank of an expression.
919 * resolve.c (resolve_assoc_var): When the rank has been guessed,
920 make sure, that the guess was correct else overwrite with the actual
922 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
923 class objects, take the span from the _data component.
925 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
928 * primary.c (match_actual_arg): If symbol has attribute flavor of
929 namelist, generate an error. (gfc_match_rvalue): Likewise return
931 * resolve.c (resolve_symbol): Scan arument list of procedures and
932 generate an error if a namelist is found.
934 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
937 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
938 the former to the latter and make it non-static. Update callers.
939 * gfortran.h (gfc_expr_is_variable): New declaration.
940 (struct gfc_ss_info): Add field needs_temporary.
941 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
942 Tighten the condition on aggregate expressions with a check
943 that the expression is a variable and doesn't need a temporary.
944 (gfc_conv_resolve_dependency): Add intermediary reference variable.
945 Set the needs_temporary field.
947 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
951 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
952 pointer is passed. Take it as is without trying to deref the
954 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
955 argument to source=-expression.
957 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
959 * lang.opt (fopenacc-dim=): New option.
961 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
964 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
965 subroutines, add a string length argument, when the actual
966 argument is an unlimited polymorphic class object.
968 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
971 * trans-expr.c (gfc_conv_procedure_call): Correct expression
972 for 'ulim_copy', which was missing a test for 'comp'.
974 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
977 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
978 when the END encountered does not match a BLOCK's end.
980 2016-01-27 Janus Weil <janus@gcc.gnu.org>
983 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
985 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
988 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
989 for allocatable components, whilst checking if the symbol is a
990 derived or class entity..
992 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
995 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
996 assignments from check on assignment of scalars to unassigned
997 arrays and correct wrong code within the corresponding block.
999 2016-01-26 David Malcolm <dmalcolm@redhat.com>
1002 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
1004 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1008 * interface.c (gfc_arglist_matches_symbol): Replace assert with
1009 a return false if not a procedure.
1010 * resolve.c (resolve_generic_f): Test if we are resolving an
1011 initialization expression and adjust error message accordingly.
1013 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1016 * frontend-passes.c (matmul_lhs_realloc): Add
1017 forgotten break statement.
1019 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
1022 * primary.c (gfc_variable_attr): revert revision r221955,
1023 call gfc_internal_error only if there is no error.
1025 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1028 * frontend-passes.c (enum matrix_case): Add case A2B2T for
1029 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1030 (inline_limit_check): Also add A2B2T.
1031 (matmul_lhs_realloc): Handle A2B2T.
1032 (check_conjg_variable): Rename to
1033 (check_conjg_transpose_variable): and also count TRANSPOSE.
1034 (inline_matmul_assign): Handle A2B2T.
1036 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1039 * error.c (gfc_error): Save the state of abort_on_error and set
1040 it to false for buffered errors to allow normal processing.
1041 Restore the state before leaving.
1043 2016-01-19 Martin Jambor <mjambor@suse.cz>
1045 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1046 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1047 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1049 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
1052 * resolve.c (check_uop_procedure): Prevent deferred length
1053 characters from being trapped by assumed length error.
1061 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1062 function as well as variable expressions.
1063 (gfc_array_init_size): Add 'expr' as an argument. Use this to
1064 correctly set the descriptor dtype for deferred characters.
1065 (gfc_array_allocate): Add 'expr' to the call to
1066 'gfc_array_init_size'.
1067 * trans.c (gfc_build_array_ref): Expand logic for setting span
1068 to include indirect references to character lengths.
1069 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1070 result char lengths that are PARM_DECLs are indirectly
1071 referenced both for directly passed and by reference.
1072 (create_function_arglist): If the length type is a pointer type
1073 then store the length as the 'passed_length' and make the char
1074 length an indirect reference to it.
1075 (gfc_trans_deferred_vars): If a character length has escaped
1076 being set as an indirect reference, return it via the 'passed
1078 * trans-expr.c (gfc_conv_procedure_call): The length of
1079 deferred character length results is set TREE_STATIC and set to
1081 (gfc_trans_assignment_1): Do not fix the rse string_length if
1082 it is a variable, a parameter or an indirect reference. Add the
1083 code to trap assignment of scalars to unallocated arrays.
1084 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1085 all references to it. Instead, replicate the code to obtain a
1086 explicitly defined string length and provide a value before
1087 array allocation so that the dtype is correctly set.
1088 trans-types.c (gfc_get_character_type): If the character length
1089 is a pointer, use the indirect reference.
1091 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1094 * frontend-passes.c (in_where): New variable.
1095 (inline_matmul_assign): Don't try this if we are within
1097 (gfc_code_walker): Keep track of in_where.
1099 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
1102 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1103 se->use_offset from condition for calculation of 'base'.
1105 2016-01-08 Jakub Jelinek <jakub@redhat.com>
1108 * trans.h (OMPWS_SCALARIZER_BODY): Define.
1109 (OMPWS_NOWAIT): Renumber.
1110 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1111 if OMPWS_SCALARIZER_BODY is not set already, and set also
1112 OMPWS_SCALARIZER_BODY until the final loop creation.
1113 * trans-expr.c (gfc_trans_assignment_1): Likewise.
1114 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1115 OMPWS_SCALARIZER_BODY.
1116 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1117 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1119 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1121 Update copyright years.
1123 * gfortranspec.c (lang_specific_driver): Update copyright notice
1125 * gfc-internals.texi: Bump @copying's copyright year.
1126 * gfortran.texi: Ditto.
1127 * intrinsic.texi: Ditto.
1128 * invoke.texi: Ditto.
1130 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
1133 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1134 is an array descriptor before using gfc_conv_descriptor_xxx.
1136 Copyright (C) 2016 Free Software Foundation, Inc.
1138 Copying and distribution of this file, with or without modification,
1139 are permitted in any medium without royalty provided the copyright
1140 notice and this notice are preserved.