1 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4 * trans-types.h (float128_type_node): Rename to
5 gfc_float128_type_node.
6 (complex_float128_type_node): Rename to
7 gfc_complex_float128_type_node.
8 * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
11 2016-08-19 Jakub Jelinek <jakub@redhat.com>
14 * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
15 and restore omp state around the resolving.
18 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
19 gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
20 BIND_EXPR with its own forced BLOCK.
22 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
24 * intrinsics.texi (RANDOM_NUMBER): Remove reference to
25 init_random_seed in example.
26 (RANDOM_SEED): Remove warning to not set all seed values to 0.
28 2016-08-18 David Malcolm <dmalcolm@redhat.com>
30 * error.c (gfc_diagnostic_starter): Update for change to
31 diagnostic_show_locus.
33 2016-08-17 Jakub Jelinek <jakub@redhat.com>
36 * trans-array.c (trans_array_constructor): Load
37 expr->ts.u.cl->length_from_typespec only if expr->ts.type is
40 2016-08-15 Fritz Reese <fritzoreese@gmail.com>
42 * lang.opt, invoke.texi: New flag -finit-derived.
43 * gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
44 gfc_generate_initializer): New prototypes.
45 * expr.c (gfc_build_default_init_expr, gfc_apply_init,
46 component_initializer, gfc_generate_initializer): New functions.
47 * expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
48 * decl.c (build_struct): Move common code to gfc_apply_init.
49 * resolve.c (can_generate_init): New function.
50 * resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
51 * resolve.c (apply_default_init, resolve_fl_variable_derived): Use
52 gfc_generate_initializer.
53 * trans-decl.c (gfc_generate_function_code): Use
54 gfc_generate_initializer.
56 2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
58 * frontend-passes.c (create_var): Set ts.deferred for
59 deferred-length character variables.
60 * dump-parse-tree.c (show_typespec): Also dump
61 is_c_interop, is_iso_c and deferred flags.
63 2016-08-15 Jakub Jelinek <jakub@redhat.com>
66 * trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
67 for decl's character length before gfc_finish_var_decl on the
70 2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
73 * openmp.c (resolve_omp_clauses): Adjust use_device clause
74 handling to only allow pointers and arrays.
76 2016-08-12 Marek Polacek <polacek@redhat.com>
79 * decl.c (match_attr_spec): Add FALLTHRU.
80 * primary.c (match_arg_list_function): Likewise.
81 * resolve.c (resolve_operator): Adjust fall through comment.
82 (fixup_charlen): Add FALLTHRU.
83 (resolve_allocate_expr): Adjust fall through comment.
84 * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
85 * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
88 2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
90 * check.c (gfc_check_random_seed): Use new seed size in check.
91 * intrinsic.texi (RANDOM_NUMBER): Updated documentation.
92 (RANDOM_SEED): Likewise.
94 2016-08-08 Jakub Jelinek <jakub@redhat.com>
97 * openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
98 BLOCK DATA ns, it will be rejected later.
100 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
103 * trans-array.c (gfc_array_allocate): When SOURCE= is a function
104 stick with the ref of the object to allocate.
106 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
109 * trans-stmt.c (gfc_trans_allocate): Prevent generating code for
110 copy of zero sized string and with it an ICE.
112 2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
115 * trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
116 location information is correctly set.
117 * trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
118 current construct early.
120 2016-08-03 Fritz Reese <fritzoreese@gmail.com>
122 * lang.opt: New option -fdec-intrinsic-ints.
123 * options.c (set_dec_flags): Enable with -fdec.
124 * gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
125 * intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
128 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
131 * target-memory.c (expr_to_char): Pass in locus and use it in error
133 (gfc_merge_initializers): Ditto.
134 * target-memory.h: Update prototype for gfc_merge_initializers ().
135 * trans-common.c (get_init_field): Use the correct locus.
137 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
140 * check.c (gfc_check_reshape): Check for constant expression.
142 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
145 * decl.c (build_struct): Ensure that pointers point to something.
147 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
150 * decl.c (gfc_set_constant_character_len): if expr is not
151 constant issue an error instead of an ICE.
153 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
156 * io.c (gfc_resolve_dt): Use correct locus.
157 * resolve.c (resolve_branch): Ditto.
159 2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
162 * decl.c (char_len_param_value): Check return value of
163 gfc_reduce_init_expr().
165 2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
167 * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
168 message (was too small).
170 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
173 * decl.c (match_data_constant): On error, set 'result' to NULL.
175 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
178 * resolve.c(gfc_resolve_iterator): Failure of type conversion need
181 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
184 * check.c(numeric_check): Prevent ICE. Issue error for invalid
185 subroutine as an actual argument when numeric argument is expected.
187 2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
188 Thomas Koenig <tkoenig@gcc.gnu.org>
191 * frontend-passes.c (gfc_run_passes): Bail out if there are any
193 * error.c (gfc_internal_error): If there are any errors in the
194 buffer, exit with EXIT_FAILURE.
196 2016-07-28 Renlin Li <renlin.li@arm.com>
199 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
202 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
203 if identical is true and two array element references differ.
204 (gfc_dep_resovler): Move most of the code to dep_ref.
205 (dep_ref): New function.
206 * frontend-passes.c (realloc_string_callback): Name temporary
207 variable "realloc_string".
209 2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
212 * class.c: Remove assert. Iterate over component only if non-null.
214 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
217 * check.c (is_c_interoperable): Simplify right expression.
219 2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
222 * frontend-passes.c (combine_array_constructor): Don't
223 do anything if the expression is inside an array iterator.
225 2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
227 * expr.c (gfc_find_stat_co): Fixed whitespaces.
228 * gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
229 src and dst description.
230 * trans-decl.c (gfc_build_builtin_function_decls): Fixed style
231 and corrected fnspec for caf functions.
232 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
233 (conv_caf_send): Dito.
235 2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
238 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case
239 if identical is true and two array element references differ.
240 (gfc_dep_resovler): Move most of the code to dep_ref.
241 (dep_ref): New function.
242 * frontend-passes.c (realloc_string_callback): Name temporary
243 variable "realloc_string".
245 2016-07-17 Fritz Reese <fritzoreese@gmail.com>
248 * trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
251 2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
252 Marco Restelli <mrestelli@gmail.com>
255 * symbol.c (select_type_insert_tmp): Recursively call self to take care
256 of nested select type.
258 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
260 * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
263 2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
266 * trans-expr.c (gfc_trans_subcomponent_assign): Special casing
267 when allocatable component is set to null() in initializer.
269 2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
272 * parse.c (parse_contained): Use proper locus.
274 2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
277 * simplify.c (gfc_simplify_len): Only for unlimited polymorphic
278 types replace the expression's _data ref with a _len ref.
280 2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
283 * frontend-passes.c (create_var): Always allocate a charlen
284 for character variables.
286 2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
289 * simplify (gfc_simplify_spread): Adjust locus.
291 2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
293 * parse.c (matcha): Define.
294 (decode_oacc_directive): Add spec_only local var and set it. Use
295 matcha to parse acc directives except for routine and declare. Return
296 ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
299 2016-07-08 Martin Liska <mliska@suse.cz>
301 * invoke.texi (Wundefined-do-loop): Enhance documentation.
303 2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
306 * trans-expr.c (gfc_trans_structure_assign): Remove assert.
308 2016-07-07 Martin Liska <mliska@suse.cz>
310 * lang.opt (Wundefined-do-loop): New option.
311 * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
312 (gfc_trans_simple_do): Generate a c-style loop.
313 (gfc_trans_do): Fix GNU coding style.
314 * invoke.texi: Mention the new warning.
316 2016-07-07 Martin Liska <mliska@suse.cz>
318 * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
319 loops with step bigger than +-1.
321 2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
323 * array.c (gfc_match_array_ref): Add parsing support for
324 STAT= attribute in CAF reference.
325 * expr.c (gfc_find_stat_co): New function that returns
326 the STAT= assignment.
327 * gfortran.h (gfc_array_ref): New member.
328 * trans-decl.c (gfc_build_builtin_function_decls):
329 new attribute for caf_get and caf_send functions.
330 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
331 the stat attribute to external function.
332 (gfc_conv_intrinsic_caf_send): Ditto.
334 2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
337 * trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
338 in allocate to parent block.
340 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
343 * decl.c (match_procedure_interface): Exit loop if procedure
344 interface refers to itself.
346 2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
347 Steven G. Kargl <kargl@gcc.gnu.org>
350 * simplify.c (gfc_simplify_ishftc): Check that absolute value of
351 SHIFT is less than or equal to SIZE.
353 2016-07-01 Jakub Jelinek <jakub@redhat.com>
356 * f95-lang.c (struct binding_level): Add reversed field.
357 (clear_binding_level): Adjust initializer.
358 (getdecls): If reversed is clear, set it and nreverse the names
359 chain before returning it.
360 (poplevel): Use getdecls.
361 * trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
362 Use nreverse to pushdecl decls in the declaration order.
365 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
366 for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
368 2016-06-30 Jakub Jelinek <jakub@redhat.com>
371 * parse.c (matchs, matcho): Move right before decode_omp_directive.
372 If spec_only, only gfc_match the keyword and if successful, goto
374 (matchds, matchdo): Define.
375 (decode_omp_directive): Add spec_only local var and set it.
376 Use matchds or matchdo macros instead of matchs or matcho
377 for declare target, declare simd, declare reduction and threadprivate
378 directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
379 directive could be matched.
380 (next_statement): For ST_GET_FCN_CHARACTERISTICS restore
381 gfc_current_locus from old_locus even if there is no label.
384 * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
385 decls in to/from clauses.
387 2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
390 * scanner.c (gfc_next_char_literal): Only decrement nextc if it
393 2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
395 * openmp.c (match_oacc_clause_gang): Rename to ...
396 (match_oacc_clause_gwv): this. Add support for OpenACC worker and
398 (gfc_match_omp_clauses): Use match_oacc_clause_gwv for
399 OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
400 invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
401 (gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
402 oacc_expr_lists. Adjust the first and needs_space arguments to
403 gfc_match_omp_clauses.
405 2016-06-29 Richard Biener <rguenther@suse.de>
408 * f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
409 (gfc_get_alias_set): Remove.
411 2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
414 * module.c (create_intrinsic_function): Check for NULL values and
415 return after giving error.
417 2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
419 * trans-types.c (gfc_build_complex_type): Move setting complex
420 MODE to layout_type, instead of setting it ahead of time by the
423 2016-06-21 Tobias Burnus <burnus@net-b.de>
426 * resolve.c (resolve_function): Don't resolve caf_get/caf_send.
427 (check_data_variable): Strip-off caf_get before checking.
429 2016-06-20 Tobias Burnus <burnus@net-b.de>
432 * trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
433 RHS pointer functions.
435 2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
437 * class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
438 instead of gfc_add_component_ref().
439 (gfc_get_len_component): Call gfc_add_len_component() instead of
440 gfc_add_component_ref().
441 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
442 gfc_add_data_component() instead of gfc_add_component_ref().
443 * trans.c (gfc_add_finalizer_call): Call
444 gfc_add_final_component() and gfc_add_size_component() instead
445 of gfc_add_component_ref.
447 2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
449 * trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
451 2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
453 * openmp.c (match_acc): New generic function to parse OpenACC
455 (gfc_match_oacc_parallel_loop): Use it.
456 (gfc_match_oacc_parallel): Likewise.
457 (gfc_match_oacc_kernels_loop): Likewise.
458 (gfc_match_oacc_kernels): Likewise.
459 (gfc_match_oacc_data): Likewise.
460 (gfc_match_oacc_host_data): Likewise.
461 (gfc_match_oacc_loop): Likewise.
462 (gfc_match_oacc_enter_data): Likewise.
463 (gfc_match_oacc_exit_data): Likewise.
465 2016-06-16 Martin Liska <mliska@suse.cz>
467 * trans-stmt.c (gfc_trans_simple_do): Predict the edge.
469 2016-06-16 Martin Liska <mliska@suse.cz>
471 * trans-array.c (gfc_array_allocate): Do not generate expect
473 * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
474 predictor for malloc return value.
475 (gfc_allocate_allocatable): Use REALLOC predictor instead of
477 (gfc_deallocate_with_status): Likewise.
479 2016-06-13 Paul Thomas <pault@gcc.gnu.org>
482 * frontend-passes.c (realloc_string_callback): Add a call to
483 gfc_dep_compare_expr.
485 2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
488 * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
490 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
493 * openmp.c (gfc_match_oacc_cache): Add comment.
495 2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
498 * io.c (match_io): For READ, commit in pending symbols in the
499 current statement before trying to match an expression so that
500 if the match fails and we undo symbols we dont toss good symbols.
502 2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
505 * trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
506 the address of the _data component to reference the arrays data
509 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
511 * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
512 bool parameter, set reduction clause DECLs as addressable when true.
513 (gfc_trans_omp_clauses): Pass clauses->async to
514 gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
516 2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
519 * io.c (match_io): For READ, try to match a default character
520 expression. If found, set the dt format expression to this,
521 otherwise go back and try control list.
523 2016-06-01 Paul Thomas <pault@gcc.gnu.org>
526 * decl.c (copy_prefix): Add checks that the module procedure
527 declaration prefixes are compliant with the interface. Invert
528 order of existing elemental and pure checks.
529 * resolve.c (resolve_fl_procedure): Invert order of elemental
532 2016-06-01 Jakub Jelinek <jakub@redhat.com>
534 * parse.c (case_decl): Move ST_OMP_* to ...
535 (case_omp_decl): ... here, new macro.
536 (verify_st_order): For case_omp_decl, complain about
537 p->state >= ORDER_EXEC, but don't change p->state otherwise.
539 2016-05-26 Jakub Jelinek <jakub@redhat.com>
541 * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
544 2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
547 * scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
548 current locus back to old_locus.
550 2016-05-20 Jakub Jelinek <jakub@redhat.com>
553 * frontend-passes.c (realloc_string_callback): Clear inserted_block
554 and changed_statement before calling create_var.
556 2016-05-15 Harald Anlauf <anlauf@gmx.de>
559 * interface.c (compare_parameter): Check for non-NULL pointer.
561 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
563 * gfortran.texi: Update example of DEC UNION extension.
565 2016-05-14 Fritz Reese <fritzoreese@gmail.com>
568 * expr.c (gfc_default_initializer): Avoid extra component refs in
569 constructors for derived types and classes.
571 2016-05-11 Jakub Jelinek <jakub@redhat.com>
574 * frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
576 2016-05-09 Richard Biener <rguenther@suse.de>
579 * trans-decl.c: Include gimplify.h for unshare_expr.
580 (gfc_trans_vla_one_sizepos): Unshare exprs before inserting
583 2016-05-07 Fritz Reese <fritzoreese@gmail.com>
586 * module.c (dt_upper_string): Rename to gfc_dt_upper_string
587 (dt_lower_string): Likewise.
588 * gfortran.h: Make new gfc_dt_upper/lower_string global.
589 * class.c: Use gfc_dt_upper_string.
591 * symbol.c: Likewise.
592 * resolve.c (resolve_component): New function.
593 (resolve_fl_derived0): Move component loop code to resolve_component.
594 * parse.c (check_component): New function.
595 (parse_derived): Move loop code to check_component.
596 * lang.opt, invoke.texi, options.c : New option -fdec-structure.
597 * libgfortran.h (bt): New basic type BT_UNION.
598 * gfortran.h (gfc_option): New option -fdec-structure.
599 (gfc_get_union_type, gfc_compare_union_types): New prototypes.
600 (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
602 (gfc_find_component): Change prototype.
603 * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
604 gfc_match_structure_decl): New prototypes.
605 * parse.h (gfc_comp_struct): New macro.
606 * symbol.c (gfc_find_component): Search for components in nested unions
607 * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
608 copy_vtab_proc_comps): Update calls to gfc_find_component.
609 * primary.c (gfc_convert_to_structure_constructor): Likewise.
610 * symbol.c (gfc_add_component): Likewise.
611 * resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
612 resolve_typebound_procedure, resolve_component, resolve_fl_derived):
614 * expr.c (get_union_init, component_init): New functions.
615 * decl.c (match_clist_expr, match_record_decl, get_struct_decl,
616 gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
617 * interface.c (compare_components, gfc_compare_union_types): Likewise.
618 * match.c (gfc_match_member_sep): Likewise.
619 * parse.c (check_component, parse_union, parse_struct_map): Likewise.
620 * resolve.c (resolve_fl_struct): Likewise.
621 * symbol.c (find_union_component): Likewise.
622 * trans-types.c (gfc_get_union_type): Likewise.
623 * parse.c (parse_derived): Use new functions.
624 * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
625 * expr.c (gfc_default_initializer): Likewise.
626 * gfortran.texi: Support for DEC structures, unions, and maps.
627 * gfortran.h (gfc_statement, sym_flavor): Likewise.
628 * check.c (gfc_check_kill_sub): Likewise.
629 * expr.c (gfc_copy_expr, simplify_const_ref,
630 gfc_has_default_initializer): Likewise.
631 * decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
632 match_pointer_init, build_struct, variable_decl,
633 gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
634 gfc_match_end, gfc_match_derived_decl): Likewise.
635 * interface.c (check_interface0, check_interface1,
636 gfc_search_interface): Likewise.
637 * misc.c (gfc_basic_typename, gfc_typename): Likewise.
638 * module.c (add_true_name, build_tnt, bt_types, mio_typespec,
639 fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
640 gfc_get_module_backend_decl): Likewise.
641 * parse.h (gfc_compile_state): Likewise.
642 * parse.c (decode_specification_statement, decode_statement,
643 gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
644 * primary.c (gfc_match_varspec, gfc_match_structure_constructor,
645 gfc_match_rvalue, match_variable): Likewise.
646 * resolve.c (find_arglists, resolve_structure_cons,
647 is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
648 resolve_typebound_subroutine, resolve_allocate_expr,
649 nonscalar_typebound_assign, generate_component_assignments,
650 resolve_fl_variable_derived, check_defined_assignments,
651 resolve_component, resolve_symbol, resolve_equivalence_derived):
653 * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
654 gfc_restore_last_undo_checkpoint, gfc_type_compatible,
655 gfc_find_dt_in_generic): Likewise.
656 * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
657 gfc_create_module_variable, check_constant_initializer): Likewise.
658 * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
659 gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
660 gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
662 * trans-io.c (transfer_namelist_element, transfer_expr,
663 gfc_trans_transfer): Likewise.
664 * trans-stmt.c (gfc_trans_deallocate): Likewise.
665 * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
666 gfc_get_derived_type): Likewise.
668 2016-05-05 Jakub Jelinek <jakub@redhat.com>
670 * openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
671 parsing is done in a big switch based on gfc_peek_ascii_char and
672 individual clauses under their first letters are sorted too.
674 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
676 * trans-types.c (gfc_build_complex_type):
678 2016-05-02 Richard Biener <rguenther@suse.de>
680 * trans-array.c (gfc_trans_create_temp_array): Properly
681 create a DECL_EXPR for the anonymous VLA array type.
683 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
686 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
687 the reduction clause in both parallel and loop directives.
689 2016-04-18 Michael Matz <matz@suse.de>
691 * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
692 * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
693 * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
695 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
698 * intrinsic.texi: Correct the documentation of pseudorandom
701 2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
704 * gfortran.texi: Document OPEN( ... NAME=) as not implemented
707 2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
710 * array.c (match_array_element_spec): Add check for non-integer.
711 * simplify.c (gfc_simplify_reshape): If source shape is NULL return.
713 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
716 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
717 future -Wparentheses warning.
719 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
722 * resolve.c (resolve_allocate_expr): Emit error message when no
723 array spec and no array valued source= expression is given in an
724 F2008 allocate() for an array to allocate.
726 2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
729 * trans-array.c (gfc_array_allocate): When the array is a coarray,
730 do not nullyfing its allocatable components in array_allocate, because
731 the nullify missed the array ref and nullifies the wrong component.
734 2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
737 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
738 constant zero tree, when the class to get the _len component from is
739 not unlimited polymorphic.
740 (gfc_copy_class_to_class): Use the new function.
741 * trans.h: Added interface of new function gfc_class_len_or_zero_get.
743 2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
745 * trans-decl.c (gfc_build_builtin_function_decls):
746 caf_stop_numeric and caf_stop_str definition.
747 * trans-stmt.c (gfc_trans_stop): invoke external functions
748 for stop and stop_str when coarrays are used.
749 * trans.h: extern for new functions.
751 2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
754 * scanner.c (load_file): Update to use S_ISREG macro.
756 2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
758 * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
759 to OMP_MAP_DELETE. Adjust all users.
761 2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
762 Jim MacArthur <jim.macarthur@codethink.co.uk>
765 * scanner.c (load_file): Check that included file is regular.
767 2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
768 Harold Anlauf <anlauf@gmx.de>
771 * invoke.texi: Explain use of the 'no-' construct within the
773 * options.c (gfc_handle_runtime_check_option): Enable use of
774 'no-' prefix for the various options with -fcheck= to allow
775 negating previously enabled check options.
777 2016-03-12 Paul Thomas <pault@gcc.gnu.org>
780 * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
781 same way as the others, rather than fixing it to come last.
782 (gfc_match_function_decl, gfc_match_subroutine): After errors
783 in 'copy_prefix', emit them immediately in the case of module
784 procedures to prevent a later ICE.
787 * decl.c (gfc_match_submod_proc): Permit 'module procedure'
788 declarations within the contains section of modules as well as
790 * resolve.c (resolve_fl_procedure): Likewise.
791 *trans-decl.c (build_function_decl): Change the gcc_assert to
792 allow all forms of module procedure declarations within module
795 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
799 * frontend-passes.c (realloc_string_callback): Don't set
802 2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
804 * dump-parse-tree.c (show_code_node): Print association
805 list of a block if present. Handle EXEC_END_BLOCK.
807 2016-02-28 Harald Anlauf <anlauf@gmx.de>
808 Jerry DeLisle <jvdelisle@gcc.gnu.org>
811 * match.c (gfc_match_iterator): Add diagnostic for array variable
814 2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
815 Steven G. Kargl <kargl@gcc.gnu.org>
818 * io.c (gfc_match_open): Check that open status is an expression
819 constant before comparing string to 'scratch' with NEWUNIT.
821 2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
823 * trans.c (gfc_allocate_allocatable): size conversion
824 from byte to number of elements for event variables.
825 * trans-types.c (gfc_get_derived_type): event variables
826 represented as a pointer (like lock variable).
828 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
831 * scanner.c (add_path_to_list): If include path is not a directory,
834 2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
837 * trans-array.c (gfc_array_allocate): Take the attributes from the
838 expression to allocate and not from the source=-expression.
840 2016-02-20 Paul Thomas <pault@gcc.gnu.org>
843 * trans-decl.c (create_function_arglist): Deferred character
844 length functions, with and without declared results, address
845 the passed reference type as '.result' and the local string
846 length as '..result'.
847 (gfc_null_and_pass_deferred_len): Helper function to null and
848 return deferred string lengths, as needed.
849 (gfc_trans_deferred_vars): Call it, thereby reducing repeated
850 code, add call for deferred arrays and reroute pointer function
851 results. Avoid using 'tmp' for anything other that a temporary
852 tree by introducing 'type_of_array' for the arrayspec type.
854 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
857 * frontend-passes.c (cfe-expr_0): Don't register functions
858 from within an ASSOCIATE statement.
860 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
863 * decl.c (build_sym): If the name has already been defined as a
864 type, it has a symtree with an upper case letter at the beginning.
865 If such a symtree exists, issue an error and exit. Don't do
866 this if there is no corresponding upper case letter.
868 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
872 * decl.c (build_sym): Reverted previous patch.
874 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
877 * decl.c (build_sym): If the name has already been defined as a
878 type, issue error and return false.
880 2016-02-12 David Malcolm <dmalcolm@redhat.com>
883 * error.c (gfc_diagnostic_start_span): New function.
884 (gfc_diagnostics_init): Initialize global_dc's start_span.
886 2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
889 * gfortran.h: Added flag to gfc_association_list indicating that
890 the rank of an associate variable has been guessed only.
891 * parse.c (parse_associate): Set the guess flag mentioned above
892 when guessing the rank of an expression.
893 * resolve.c (resolve_assoc_var): When the rank has been guessed,
894 make sure, that the guess was correct else overwrite with the actual
896 * trans-stmt.c (trans_associate_var): For subref_array_pointers in
897 class objects, take the span from the _data component.
899 2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
902 * primary.c (match_actual_arg): If symbol has attribute flavor of
903 namelist, generate an error. (gfc_match_rvalue): Likewise return
905 * resolve.c (resolve_symbol): Scan arument list of procedures and
906 generate an error if a namelist is found.
908 2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
911 * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
912 the former to the latter and make it non-static. Update callers.
913 * gfortran.h (gfc_expr_is_variable): New declaration.
914 (struct gfc_ss_info): Add field needs_temporary.
915 * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
916 Tighten the condition on aggregate expressions with a check
917 that the expression is a variable and doesn't need a temporary.
918 (gfc_conv_resolve_dependency): Add intermediary reference variable.
919 Set the needs_temporary field.
921 2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
925 * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
926 pointer is passed. Take it as is without trying to deref the
928 * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
929 argument to source=-expression.
931 2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
933 * lang.opt (fopenacc-dim=): New option.
935 2016-01-31 Paul Thomas <pault@gcc.gnu.org>
938 * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
939 subroutines, add a string length argument, when the actual
940 argument is an unlimited polymorphic class object.
942 2016-01-30 Paul Thomas <pault@gcc.gnu.org>
945 * trans-expr.c (gfc_conv_procedure_call): Correct expression
946 for 'ulim_copy', which was missing a test for 'comp'.
948 2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
951 * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
952 when the END encountered does not match a BLOCK's end.
954 2016-01-27 Janus Weil <janus@gcc.gnu.org>
957 * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
959 2016-01-27 Paul Thomas <pault@gcc.gnu.org>
962 * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
963 for allocatable components, whilst checking if the symbol is a
964 derived or class entity..
966 2016-01-26 Paul Thomas <pault@gcc.gnu.org>
969 * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
970 assignments from check on assignment of scalars to unassigned
971 arrays and correct wrong code within the corresponding block.
973 2016-01-26 David Malcolm <dmalcolm@redhat.com>
976 * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
978 2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
982 * interface.c (gfc_arglist_matches_symbol): Replace assert with
983 a return false if not a procedure.
984 * resolve.c (resolve_generic_f): Test if we are resolving an
985 initialization expression and adjust error message accordingly.
987 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
990 * frontend-passes.c (matmul_lhs_realloc): Add
991 forgotten break statement.
993 2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
996 * primary.c (gfc_variable_attr): revert revision r221955,
997 call gfc_internal_error only if there is no error.
999 2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1002 * frontend-passes.c (enum matrix_case): Add case A2B2T for
1003 MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
1004 (inline_limit_check): Also add A2B2T.
1005 (matmul_lhs_realloc): Handle A2B2T.
1006 (check_conjg_variable): Rename to
1007 (check_conjg_transpose_variable): and also count TRANSPOSE.
1008 (inline_matmul_assign): Handle A2B2T.
1010 2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1013 * error.c (gfc_error): Save the state of abort_on_error and set
1014 it to false for buffered errors to allow normal processing.
1015 Restore the state before leaving.
1017 2016-01-19 Martin Jambor <mjambor@suse.cz>
1019 * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
1020 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
1021 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
1023 2016-01-15 Paul Thomas <pault@gcc.gnu.org>
1026 * resolve.c (check_uop_procedure): Prevent deferred length
1027 characters from being trapped by assumed length error.
1035 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
1036 function as well as variable expressions.
1037 (gfc_array_init_size): Add 'expr' as an argument. Use this to
1038 correctly set the descriptor dtype for deferred characters.
1039 (gfc_array_allocate): Add 'expr' to the call to
1040 'gfc_array_init_size'.
1041 * trans.c (gfc_build_array_ref): Expand logic for setting span
1042 to include indirect references to character lengths.
1043 * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
1044 result char lengths that are PARM_DECLs are indirectly
1045 referenced both for directly passed and by reference.
1046 (create_function_arglist): If the length type is a pointer type
1047 then store the length as the 'passed_length' and make the char
1048 length an indirect reference to it.
1049 (gfc_trans_deferred_vars): If a character length has escaped
1050 being set as an indirect reference, return it via the 'passed
1052 * trans-expr.c (gfc_conv_procedure_call): The length of
1053 deferred character length results is set TREE_STATIC and set to
1055 (gfc_trans_assignment_1): Do not fix the rse string_length if
1056 it is a variable, a parameter or an indirect reference. Add the
1057 code to trap assignment of scalars to unallocated arrays.
1058 * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
1059 all references to it. Instead, replicate the code to obtain a
1060 explicitly defined string length and provide a value before
1061 array allocation so that the dtype is correctly set.
1062 trans-types.c (gfc_get_character_type): If the character length
1063 is a pointer, use the indirect reference.
1065 2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1068 * frontend-passes.c (in_where): New variable.
1069 (inline_matmul_assign): Don't try this if we are within
1071 (gfc_code_walker): Keep track of in_where.
1073 2016-01-10 Paul Thomas <pault@gcc.gnu.org>
1076 * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
1077 se->use_offset from condition for calculation of 'base'.
1079 2016-01-08 Jakub Jelinek <jakub@redhat.com>
1082 * trans.h (OMPWS_SCALARIZER_BODY): Define.
1083 (OMPWS_NOWAIT): Renumber.
1084 * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
1085 if OMPWS_SCALARIZER_BODY is not set already, and set also
1086 OMPWS_SCALARIZER_BODY until the final loop creation.
1087 * trans-expr.c (gfc_trans_assignment_1): Likewise.
1088 * trans-openmp.c (gfc_trans_omp_workshare): Also clear
1089 OMPWS_SCALARIZER_BODY.
1090 * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
1091 OMP_FOR if OMPWS_SCALARIZER_BODY is set.
1093 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1095 Update copyright years.
1097 * gfortranspec.c (lang_specific_driver): Update copyright notice
1099 * gfc-internals.texi: Bump @copying's copyright year.
1100 * gfortran.texi: Ditto.
1101 * intrinsic.texi: Ditto.
1102 * invoke.texi: Ditto.
1104 2016-01-01 Paul Thomas <pault@gcc.gnu.org>
1107 * trans-array.c (evaluate_bound): If deferred, test that 'desc'
1108 is an array descriptor before using gfc_conv_descriptor_xxx.
1110 Copyright (C) 2016 Free Software Foundation, Inc.
1112 Copying and distribution of this file, with or without modification,
1113 are permitted in any medium without royalty provided the copyright
1114 notice and this notice are preserved.