1 2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
4 simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
6 2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
9 * frontend-passes.c (remove_trim,combine_array_constructor): Check for
12 2016-08-24 Paul Thomas <pault@gcc.gnu.org>
15 * resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
16 for deferred character length module procedures.
18 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
20 * decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
22 2016-08-23 Fritz Reese <fritzoreese@gmail.com>
24 * interface.c (compare_components): Fix typo in name check conditional.
26 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
27 Bud Davis <jmdavis@link.com>
30 * parse.c (next_free,next_fixed): Issue error for statement label
33 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
36 * interface.c (compare_parameter): Use better locus for error message.
38 2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
41 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
42 for unused variable if symbol is entry point.
44 2016-08-19 Joseph Myers <joseph@codesourcery.com>
47 * trans-types.h (float128_type_node): Rename to
48 gfc_float128_type_node.
49 (complex_float128_type_node): Rename to
50 gfc_complex_float128_type_node.
51 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
54 2016-08-19 Jakub Jelinek <jakub@redhat.com>
57 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
58 and restore omp state around the resolving.
61 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
62 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
63 BIND_EXPR with its own forced BLOCK.
65 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
67 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
68 init_random_seed in example.
69 (RANDOM_SEED): Remove warning to not set all seed values to 0.
71 2016-08-18 David Malcolm <dmalcolm@redhat.com>
73 * error.c (gfc_diagnostic_starter): Update for change to
74 diagnostic_show_locus.
76 2016-08-17 Jakub Jelinek <jakub@redhat.com>
79 * trans-array.c (trans_array_constructor): Load
80 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
83 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
85 * lang.opt, invoke.texi: New flag -finit-derived.
86 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
87 gfc_generate_initializer): New prototypes.
88 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
89 component_initializer, gfc_generate_initializer): New functions.
90 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
91 * decl.c (build_struct): Move common code to gfc_apply_init.
92 * resolve.c (can_generate_init): New function.
93 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
94 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
95 gfc_generate_initializer.
96 * trans-decl.c (gfc_generate_function_code): Use
97 gfc_generate_initializer.
99 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
101 * frontend-passes.c (create_var): Set ts.deferred for
102 deferred-length character variables.
103 * dump-parse-tree.c (show_typespec): Also dump
104 is_c_interop, is_iso_c and deferred flags.
106 2016-08-15 Jakub Jelinek <jakub@redhat.com>
109 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
110 for decl's character length before gfc_finish_var_decl on the
113 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
116 * openmp.c (resolve_omp_clauses): Adjust use_device clause
117 handling to only allow pointers and arrays.
119 2016-08-12 Marek Polacek <polacek@redhat.com>
122 * decl.c (match_attr_spec): Add FALLTHRU.
123 * primary.c (match_arg_list_function): Likewise.
124 * resolve.c (resolve_operator): Adjust fall through comment.
125 (fixup_charlen): Add FALLTHRU.
126 (resolve_allocate_expr): Adjust fall through comment.
127 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
128 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
131 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
133 * check.c (gfc_check_random_seed): Use new seed size in check.
134 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
135 (RANDOM_SEED): Likewise.
137 2016-08-08 Jakub Jelinek <jakub@redhat.com>
140 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
141 BLOCK DATA ns, it will be rejected later.
143 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
146 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
147 stick with the ref of the object to allocate.
149 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
152 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
153 copy of zero sized string and with it an ICE.
155 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
158 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
159 location information is correctly set.
160 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
161 current construct early.
163 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
165 * lang.opt: New option -fdec-intrinsic-ints.
166 * options.c (set_dec_flags): Enable with -fdec.
167 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
168 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
171 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
174 * target-memory.c (expr_to_char): Pass in locus and use it in error
176 (gfc_merge_initializers): Ditto.
177 * target-memory.h: Update prototype for gfc_merge_initializers ().
178 * trans-common.c (get_init_field): Use the correct locus.
180 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
183 * check.c (gfc_check_reshape): Check for constant expression.
185 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
188 * decl.c (build_struct): Ensure that pointers point to something.
190 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
193 * decl.c (gfc_set_constant_character_len): if expr is not
194 constant issue an error instead of an ICE.
196 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
199 * io.c (gfc_resolve_dt): Use correct locus.
200 * resolve.c (resolve_branch): Ditto.
202 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
205 * decl.c (char_len_param_value): Check return value of
206 gfc_reduce_init_expr().
208 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
210 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
211 message (was too small).
213 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
216 * decl.c (match_data_constant): On error, set 'result' to NULL.
218 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
221 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
224 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
227 * check.c(numeric_check): Prevent ICE. Issue error for invalid
228 subroutine as an actual argument when numeric argument is expected.
230 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
231 Thomas Koenig <tkoenig@gcc.gnu.org>
234 * frontend-passes.c (gfc_run_passes): Bail out if there are any
236 * error.c (gfc_internal_error): If there are any errors in the
237 buffer, exit with EXIT_FAILURE.
239 2016-07-28 Renlin Li <renlin.li@arm.com>
242 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
245 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
246 if identical is true and two array element references differ.
247 (gfc_dep_resovler): Move most of the code to dep_ref.
248 (dep_ref): New function.
249 * frontend-passes.c (realloc_string_callback): Name temporary
250 variable "realloc_string".
252 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
255 * class.c: Remove assert. Iterate over component only if non-null.
257 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
260 * check.c (is_c_interoperable): Simplify right expression.
262 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
265 * frontend-passes.c (combine_array_constructor): Don't
266 do anything if the expression is inside an array iterator.
268 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
270 * expr.c (gfc_find_stat_co): Fixed whitespaces.
271 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
272 src and dst description.
273 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
274 and corrected fnspec for caf functions.
275 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
276 (conv_caf_send): Dito.
278 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
281 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
282 if identical is true and two array element references differ.
283 (gfc_dep_resovler): Move most of the code to dep_ref.
284 (dep_ref): New function.
285 * frontend-passes.c (realloc_string_callback): Name temporary
286 variable "realloc_string".
288 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
291 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
294 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
295 Marco Restelli <mrestelli@gmail.com>
298 * symbol.c (select_type_insert_tmp): Recursively call self to take care
299 of nested select type.
301 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
303 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
306 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
309 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
310 when allocatable component is set to null() in initializer.
312 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
315 * parse.c (parse_contained): Use proper locus.
317 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
320 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
321 types replace the expression's _data ref with a _len ref.
323 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
326 * frontend-passes.c (create_var): Always allocate a charlen
327 for character variables.
329 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
332 * simplify (gfc_simplify_spread): Adjust locus.
334 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
336 * parse.c (matcha): Define.
337 (decode_oacc_directive): Add spec_only local var and set it. Use
338 matcha to parse acc directives except for routine and declare. Return
339 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
342 2016-07-08 Martin Liska <mliska@suse.cz>
344 * invoke.texi (Wundefined-do-loop): Enhance documentation.
346 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
349 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
351 2016-07-07 Martin Liska <mliska@suse.cz>
353 * lang.opt (Wundefined-do-loop): New option.
354 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
355 (gfc_trans_simple_do): Generate a c-style loop.
356 (gfc_trans_do): Fix GNU coding style.
357 * invoke.texi: Mention the new warning.
359 2016-07-07 Martin Liska <mliska@suse.cz>
361 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
362 loops with step bigger than +-1.
364 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
366 * array.c (gfc_match_array_ref): Add parsing support for
367 STAT= attribute in CAF reference.
368 * expr.c (gfc_find_stat_co): New function that returns
369 the STAT= assignment.
370 * gfortran.h (gfc_array_ref): New member.
371 * trans-decl.c (gfc_build_builtin_function_decls):
372 new attribute for caf_get and caf_send functions.
373 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
374 the stat attribute to external function.
375 (gfc_conv_intrinsic_caf_send): Ditto.
377 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
380 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
381 in allocate to parent block.
383 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
386 * decl.c (match_procedure_interface): Exit loop if procedure
387 interface refers to itself.
389 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
390 Steven G. Kargl <kargl@gcc.gnu.org>
393 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
394 SHIFT is less than or equal to SIZE.
396 2016-07-01 Jakub Jelinek <jakub@redhat.com>
399 * f95-lang.c (struct binding_level): Add reversed field.
400 (clear_binding_level): Adjust initializer.
401 (getdecls): If reversed is clear, set it and nreverse the names
402 chain before returning it.
403 (poplevel): Use getdecls.
404 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
405 Use nreverse to pushdecl decls in the declaration order.
408 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
409 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
411 2016-06-30 Jakub Jelinek <jakub@redhat.com>
414 * parse.c (matchs, matcho): Move right before decode_omp_directive.
415 If spec_only, only gfc_match the keyword and if successful, goto
417 (matchds, matchdo): Define.
418 (decode_omp_directive): Add spec_only local var and set it.
419 Use matchds or matchdo macros instead of matchs or matcho
420 for declare target, declare simd, declare reduction and threadprivate
421 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
422 directive could be matched.
423 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
424 gfc_current_locus from old_locus even if there is no label.
427 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
428 decls in to/from clauses.
430 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
433 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
436 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
438 * openmp.c (match_oacc_clause_gang): Rename to ...
439 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
441 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
442 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
443 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
444 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
445 oacc_expr_lists. Adjust the first and needs_space arguments to
446 gfc_match_omp_clauses.
448 2016-06-29 Richard Biener <rguenther@suse.de>
451 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
452 (gfc_get_alias_set): Remove.
454 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
457 * module.c (create_intrinsic_function): Check for NULL values and
458 return after giving error.
460 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
462 * trans-types.c (gfc_build_complex_type): Move setting complex
463 MODE to layout_type, instead of setting it ahead of time by the
466 2016-06-21 Tobias Burnus <burnus@net-b.de>
469 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
470 (check_data_variable): Strip-off caf_get before checking.
472 2016-06-20 Tobias Burnus <burnus@net-b.de>
475 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
476 RHS pointer functions.
478 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
480 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
481 instead of gfc_add_component_ref().
482 (gfc_get_len_component): Call gfc_add_len_component() instead of
483 gfc_add_component_ref().
484 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
485 gfc_add_data_component() instead of gfc_add_component_ref().
486 * trans.c (gfc_add_finalizer_call): Call
487 gfc_add_final_component() and gfc_add_size_component() instead
488 of gfc_add_component_ref.
490 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
492 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
494 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
496 * openmp.c (match_acc): New generic function to parse OpenACC
498 (gfc_match_oacc_parallel_loop): Use it.
499 (gfc_match_oacc_parallel): Likewise.
500 (gfc_match_oacc_kernels_loop): Likewise.
501 (gfc_match_oacc_kernels): Likewise.
502 (gfc_match_oacc_data): Likewise.
503 (gfc_match_oacc_host_data): Likewise.
504 (gfc_match_oacc_loop): Likewise.
505 (gfc_match_oacc_enter_data): Likewise.
506 (gfc_match_oacc_exit_data): Likewise.
508 2016-06-16 Martin Liska <mliska@suse.cz>
510 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
512 2016-06-16 Martin Liska <mliska@suse.cz>
514 * trans-array.c (gfc_array_allocate): Do not generate expect
516 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
517 predictor for malloc return value.
518 (gfc_allocate_allocatable): Use REALLOC predictor instead of
520 (gfc_deallocate_with_status): Likewise.
522 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
525 * frontend-passes.c (realloc_string_callback): Add a call to
526 gfc_dep_compare_expr.
528 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
531 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
533 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
536 * openmp.c (gfc_match_oacc_cache): Add comment.
538 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
541 * io.c (match_io): For READ, commit in pending symbols in the
542 current statement before trying to match an expression so that
543 if the match fails and we undo symbols we dont toss good symbols.
545 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
548 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
549 the address of the _data component to reference the arrays data
552 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
554 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
555 bool parameter, set reduction clause DECLs as addressable when true.
556 (gfc_trans_omp_clauses): Pass clauses->async to
557 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
559 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
562 * io.c (match_io): For READ, try to match a default character
563 expression. If found, set the dt format expression to this,
564 otherwise go back and try control list.
566 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
569 * decl.c (copy_prefix): Add checks that the module procedure
570 declaration prefixes are compliant with the interface. Invert
571 order of existing elemental and pure checks.
572 * resolve.c (resolve_fl_procedure): Invert order of elemental
575 2016-06-01 Jakub Jelinek <jakub@redhat.com>
577 * parse.c (case_decl): Move ST_OMP_* to ...
578 (case_omp_decl): ... here, new macro.
579 (verify_st_order): For case_omp_decl, complain about
580 p->state >= ORDER_EXEC, but don't change p->state otherwise.
582 2016-05-26 Jakub Jelinek <jakub@redhat.com>
584 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
587 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
590 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
591 current locus back to old_locus.
593 2016-05-20 Jakub Jelinek <jakub@redhat.com>
596 * frontend-passes.c (realloc_string_callback): Clear inserted_block
597 and changed_statement before calling create_var.
599 2016-05-15 Harald Anlauf <anlauf@gmx.de>
602 * interface.c (compare_parameter): Check for non-NULL pointer.
604 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
606 * gfortran.texi: Update example of DEC UNION extension.
608 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
611 * expr.c (gfc_default_initializer): Avoid extra component refs in
612 constructors for derived types and classes.
614 2016-05-11 Jakub Jelinek <jakub@redhat.com>
617 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
619 2016-05-09 Richard Biener <rguenther@suse.de>
622 * trans-decl.c: Include gimplify.h for unshare_expr.
623 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
626 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
629 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
630 (dt_lower_string): Likewise.
631 * gfortran.h: Make new gfc_dt_upper/lower_string global.
632 * class.c: Use gfc_dt_upper_string.
634 * symbol.c: Likewise.
635 * resolve.c (resolve_component): New function.
636 (resolve_fl_derived0): Move component loop code to resolve_component.
637 * parse.c (check_component): New function.
638 (parse_derived): Move loop code to check_component.
639 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
640 * libgfortran.h (bt): New basic type BT_UNION.
641 * gfortran.h (gfc_option): New option -fdec-structure.
642 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
643 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
645 (gfc_find_component): Change prototype.
646 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
647 gfc_match_structure_decl): New prototypes.
648 * parse.h (gfc_comp_struct): New macro.
649 * symbol.c (gfc_find_component): Search for components in nested unions
650 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
651 copy_vtab_proc_comps): Update calls to gfc_find_component.
652 * primary.c (gfc_convert_to_structure_constructor): Likewise.
653 * symbol.c (gfc_add_component): Likewise.
654 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
655 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
657 * expr.c (get_union_init, component_init): New functions.
658 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
659 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
660 * interface.c (compare_components, gfc_compare_union_types): Likewise.
661 * match.c (gfc_match_member_sep): Likewise.
662 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
663 * resolve.c (resolve_fl_struct): Likewise.
664 * symbol.c (find_union_component): Likewise.
665 * trans-types.c (gfc_get_union_type): Likewise.
666 * parse.c (parse_derived): Use new functions.
667 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
668 * expr.c (gfc_default_initializer): Likewise.
669 * gfortran.texi: Support for DEC structures, unions, and maps.
670 * gfortran.h (gfc_statement, sym_flavor): Likewise.
671 * check.c (gfc_check_kill_sub): Likewise.
672 * expr.c (gfc_copy_expr, simplify_const_ref,
673 gfc_has_default_initializer): Likewise.
674 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
675 match_pointer_init, build_struct, variable_decl,
676 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
677 gfc_match_end, gfc_match_derived_decl): Likewise.
678 * interface.c (check_interface0, check_interface1,
679 gfc_search_interface): Likewise.
680 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
681 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
682 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
683 gfc_get_module_backend_decl): Likewise.
684 * parse.h (gfc_compile_state): Likewise.
685 * parse.c (decode_specification_statement, decode_statement,
686 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
687 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
688 gfc_match_rvalue, match_variable): Likewise.
689 * resolve.c (find_arglists, resolve_structure_cons,
690 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
691 resolve_typebound_subroutine, resolve_allocate_expr,
692 nonscalar_typebound_assign, generate_component_assignments,
693 resolve_fl_variable_derived, check_defined_assignments,
694 resolve_component, resolve_symbol, resolve_equivalence_derived):
696 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
697 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
698 gfc_find_dt_in_generic): Likewise.
699 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
700 gfc_create_module_variable, check_constant_initializer): Likewise.
701 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
702 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
703 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
705 * trans-io.c (transfer_namelist_element, transfer_expr,
706 gfc_trans_transfer): Likewise.
707 * trans-stmt.c (gfc_trans_deallocate): Likewise.
708 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
709 gfc_get_derived_type): Likewise.
711 2016-05-05 Jakub Jelinek <jakub@redhat.com>
713 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
714 parsing is done in a big switch based on gfc_peek_ascii_char and
715 individual clauses under their first letters are sorted too.
717 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
719 * trans-types.c (gfc_build_complex_type):
721 2016-05-02 Richard Biener <rguenther@suse.de>
723 * trans-array.c (gfc_trans_create_temp_array): Properly
724 create a DECL_EXPR for the anonymous VLA array type.
726 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
729 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
730 the reduction clause in both parallel and loop directives.
732 2016-04-18 Michael Matz <matz@suse.de>
734 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
735 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
736 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
738 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
741 * intrinsic.texi: Correct the documentation of pseudorandom
744 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
747 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
750 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
753 * array.c (match_array_element_spec): Add check for non-integer.
754 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
756 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
759 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
760 future -Wparentheses warning.
762 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
765 * resolve.c (resolve_allocate_expr): Emit error message when no
766 array spec and no array valued source= expression is given in an
767 F2008 allocate() for an array to allocate.
769 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
772 * trans-array.c (gfc_array_allocate): When the array is a coarray,
773 do not nullyfing its allocatable components in array_allocate, because
774 the nullify missed the array ref and nullifies the wrong component.
777 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
780 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
781 constant zero tree, when the class to get the _len component from is
782 not unlimited polymorphic.
783 (gfc_copy_class_to_class): Use the new function.
784 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
786 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
788 * trans-decl.c (gfc_build_builtin_function_decls):
789 caf_stop_numeric and caf_stop_str definition.
790 * trans-stmt.c (gfc_trans_stop): invoke external functions
791 for stop and stop_str when coarrays are used.
792 * trans.h: extern for new functions.
794 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
797 * scanner.c (load_file): Update to use S_ISREG macro.
799 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
801 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
802 to OMP_MAP_DELETE. Adjust all users.
804 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
805 Jim MacArthur <jim.macarthur@codethink.co.uk>
808 * scanner.c (load_file): Check that included file is regular.
810 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
811 Harold Anlauf <anlauf@gmx.de>
814 * invoke.texi: Explain use of the 'no-' construct within the
816 * options.c (gfc_handle_runtime_check_option): Enable use of
817 'no-' prefix for the various options with -fcheck= to allow
818 negating previously enabled check options.
820 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
823 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
824 same way as the others, rather than fixing it to come last.
825 (gfc_match_function_decl, gfc_match_subroutine): After errors
826 in 'copy_prefix', emit them immediately in the case of module
827 procedures to prevent a later ICE.
830 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
831 declarations within the contains section of modules as well as
833 * resolve.c (resolve_fl_procedure): Likewise.
834 *trans-decl.c (build_function_decl): Change the gcc_assert to
835 allow all forms of module procedure declarations within module
838 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
842 * frontend-passes.c (realloc_string_callback): Don't set
845 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
847 * dump-parse-tree.c (show_code_node): Print association
848 list of a block if present. Handle EXEC_END_BLOCK.
850 2016-02-28 Harald Anlauf <anlauf@gmx.de>
851 Jerry DeLisle <jvdelisle@gcc.gnu.org>
854 * match.c (gfc_match_iterator): Add diagnostic for array variable
857 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
858 Steven G. Kargl <kargl@gcc.gnu.org>
861 * io.c (gfc_match_open): Check that open status is an expression
862 constant before comparing string to 'scratch' with NEWUNIT.
864 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
866 * trans.c (gfc_allocate_allocatable): size conversion
867 from byte to number of elements for event variables.
868 * trans-types.c (gfc_get_derived_type): event variables
869 represented as a pointer (like lock variable).
871 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
874 * scanner.c (add_path_to_list): If include path is not a directory,
877 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
880 * trans-array.c (gfc_array_allocate): Take the attributes from the
881 expression to allocate and not from the source=-expression.
883 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
886 * trans-decl.c (create_function_arglist): Deferred character
887 length functions, with and without declared results, address
888 the passed reference type as '.result' and the local string
889 length as '..result'.
890 (gfc_null_and_pass_deferred_len): Helper function to null and
891 return deferred string lengths, as needed.
892 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
893 code, add call for deferred arrays and reroute pointer function
894 results. Avoid using 'tmp' for anything other that a temporary
895 tree by introducing 'type_of_array' for the arrayspec type.
897 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
900 * frontend-passes.c (cfe-expr_0): Don't register functions
901 from within an ASSOCIATE statement.
903 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
906 * decl.c (build_sym): If the name has already been defined as a
907 type, it has a symtree with an upper case letter at the beginning.
908 If such a symtree exists, issue an error and exit. Don't do
909 this if there is no corresponding upper case letter.
911 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
915 * decl.c (build_sym): Reverted previous patch.
917 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
920 * decl.c (build_sym): If the name has already been defined as a
921 type, issue error and return false.
923 2016-02-12 David Malcolm <dmalcolm@redhat.com>
926 * error.c (gfc_diagnostic_start_span): New function.
927 (gfc_diagnostics_init): Initialize global_dc's start_span.
929 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
932 * gfortran.h: Added flag to gfc_association_list indicating that
933 the rank of an associate variable has been guessed only.
934 * parse.c (parse_associate): Set the guess flag mentioned above
935 when guessing the rank of an expression.
936 * resolve.c (resolve_assoc_var): When the rank has been guessed,
937 make sure, that the guess was correct else overwrite with the actual
939 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
940 class objects, take the span from the _data component.
942 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
945 * primary.c (match_actual_arg): If symbol has attribute flavor of
946 namelist, generate an error. (gfc_match_rvalue): Likewise return
948 * resolve.c (resolve_symbol): Scan arument list of procedures and
949 generate an error if a namelist is found.
951 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
954 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
955 the former to the latter and make it non-static. Update callers.
956 * gfortran.h (gfc_expr_is_variable): New declaration.
957 (struct gfc_ss_info): Add field needs_temporary.
958 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
959 Tighten the condition on aggregate expressions with a check
960 that the expression is a variable and doesn't need a temporary.
961 (gfc_conv_resolve_dependency): Add intermediary reference variable.
962 Set the needs_temporary field.
964 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
968 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
969 pointer is passed. Take it as is without trying to deref the
971 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
972 argument to source=-expression.
974 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
976 * lang.opt (fopenacc-dim=): New option.
978 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
981 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
982 subroutines, add a string length argument, when the actual
983 argument is an unlimited polymorphic class object.
985 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
988 * trans-expr.c (gfc_conv_procedure_call): Correct expression
989 for 'ulim_copy', which was missing a test for 'comp'.
991 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
994 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
995 when the END encountered does not match a BLOCK's end.
997 2016-01-27 Janus Weil <janus@gcc.gnu.org>
1000 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
1002 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
1005 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
1006 for allocatable components, whilst checking if the symbol is a
1007 derived or class entity..
1009 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
1012 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
1013 assignments from check on assignment of scalars to unassigned
1014 arrays and correct wrong code within the corresponding block.
1016 2016-01-26 David Malcolm <dmalcolm@redhat.com>
1019 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
1021 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1025 * interface.c (gfc_arglist_matches_symbol): Replace assert with
1026 a return false if not a procedure.
1027 * resolve.c (resolve_generic_f): Test if we are resolving an
1028 initialization expression and adjust error message accordingly.
1030 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1033 * frontend-passes.c (matmul_lhs_realloc): Add
1034 forgotten break statement.
1036 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
1039 * primary.c (gfc_variable_attr): revert revision r221955,
1040 call gfc_internal_error only if there is no error.
1042 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1045 * frontend-passes.c (enum matrix_case): Add case A2B2T for
1046 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1047 (inline_limit_check): Also add A2B2T.
1048 (matmul_lhs_realloc): Handle A2B2T.
1049 (check_conjg_variable): Rename to
1050 (check_conjg_transpose_variable): and also count TRANSPOSE.
1051 (inline_matmul_assign): Handle A2B2T.
1053 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1056 * error.c (gfc_error): Save the state of abort_on_error and set
1057 it to false for buffered errors to allow normal processing.
1058 Restore the state before leaving.
1060 2016-01-19 Martin Jambor <mjambor@suse.cz>
1062 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1063 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1064 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1066 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
1069 * resolve.c (check_uop_procedure): Prevent deferred length
1070 characters from being trapped by assumed length error.
1078 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1079 function as well as variable expressions.
1080 (gfc_array_init_size): Add 'expr' as an argument. Use this to
1081 correctly set the descriptor dtype for deferred characters.
1082 (gfc_array_allocate): Add 'expr' to the call to
1083 'gfc_array_init_size'.
1084 * trans.c (gfc_build_array_ref): Expand logic for setting span
1085 to include indirect references to character lengths.
1086 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1087 result char lengths that are PARM_DECLs are indirectly
1088 referenced both for directly passed and by reference.
1089 (create_function_arglist): If the length type is a pointer type
1090 then store the length as the 'passed_length' and make the char
1091 length an indirect reference to it.
1092 (gfc_trans_deferred_vars): If a character length has escaped
1093 being set as an indirect reference, return it via the 'passed
1095 * trans-expr.c (gfc_conv_procedure_call): The length of
1096 deferred character length results is set TREE_STATIC and set to
1098 (gfc_trans_assignment_1): Do not fix the rse string_length if
1099 it is a variable, a parameter or an indirect reference. Add the
1100 code to trap assignment of scalars to unallocated arrays.
1101 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1102 all references to it. Instead, replicate the code to obtain a
1103 explicitly defined string length and provide a value before
1104 array allocation so that the dtype is correctly set.
1105 trans-types.c (gfc_get_character_type): If the character length
1106 is a pointer, use the indirect reference.
1108 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1111 * frontend-passes.c (in_where): New variable.
1112 (inline_matmul_assign): Don't try this if we are within
1114 (gfc_code_walker): Keep track of in_where.
1116 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
1119 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1120 se->use_offset from condition for calculation of 'base'.
1122 2016-01-08 Jakub Jelinek <jakub@redhat.com>
1125 * trans.h (OMPWS_SCALARIZER_BODY): Define.
1126 (OMPWS_NOWAIT): Renumber.
1127 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1128 if OMPWS_SCALARIZER_BODY is not set already, and set also
1129 OMPWS_SCALARIZER_BODY until the final loop creation.
1130 * trans-expr.c (gfc_trans_assignment_1): Likewise.
1131 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1132 OMPWS_SCALARIZER_BODY.
1133 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1134 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1136 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1138 Update copyright years.
1140 * gfortranspec.c (lang_specific_driver): Update copyright notice
1142 * gfc-internals.texi: Bump @copying's copyright year.
1143 * gfortran.texi: Ditto.
1144 * intrinsic.texi: Ditto.
1145 * invoke.texi: Ditto.
1147 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
1150 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1151 is an array descriptor before using gfc_conv_descriptor_xxx.
1153 Copyright (C) 2016 Free Software Foundation, Inc.
1155 Copying and distribution of this file, with or without modification,
1156 are permitted in any medium without royalty provided the copyright
1157 notice and this notice are preserved.