1 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
4 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
6 2018-12-09 Fritz Reese <fritzoreese@gmail.com>
9 * resolve.c (resolve_operator): Do not call resolve_function.
10 Break like other cases.
12 2018-12-09 Cesar Philippidis <cesar@codesourcery.com>
14 * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the
15 location of combined acc loops.
17 2018-12-09 Thomas Schwinge <thomas@codesourcery.com>
19 * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC
23 * openmp.c (resolve_oacc_loop_blocks): Remove "Clause SEQ
24 conflicts with INDEPENDENT" diagnostic.
26 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
29 * resolve.c (check_data_variable): Named constant cannot be a
32 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
35 * decl.c (var_element): Inquiry parameters cannit be data objects.
37 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
40 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
41 Check for a NULL pointer.
43 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
46 * class.c (insert_component_ref): Check for NULL pointer and
47 previous error message issued.
48 * parse.c (parse_associate): Check for NULL pointer.
49 * resolve.c (resolve_assoc_var): Check for NULL pointer.
51 2018-12-07 Jakub Jelinek <jakub@redhat.com>
54 * trans-openmp.c (gfc_omp_clause_default_ctor,
55 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
56 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
57 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
60 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
61 Mark Eggleston <mark.eggleston@codethink.co.uk>
64 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
65 (set_dec_flags): Set/unset DEC and std flags according to value.
66 (post_dec_flags, set_init_local_zero): New functions.
67 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
68 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
70 <case OPT_finit_local_zero>: Use set_init_local_zero.
71 <case OPT_fdec>: Pass value to set_dec_flags.
72 <case OPT_fdec_structure>: Remove.
74 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
76 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
79 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
82 2018-11-27 Martin Liska <mliska@suse.cz>
84 * decl.c (gfc_match_gcc_builtin): New function.
85 * gfortran.h (struct vect_builtin_tuple): New.
86 (gfc_adjust_builtins): Likewise.
87 * lang-specs.h (TARGET_F951_OPTIONS): New.
88 (F951_OPTIONS): Use it.
89 * lang.opt: Add new option -fpre-include.
90 * match.h (gfc_match_gcc_builtin): Declare new function.
91 * parse.c (decode_gcc_attribute): Handle builtin.
92 (parse_progunit): Call gfc_adjust_builtins.
93 * scanner.c (gfc_new_file): Load pre-included header file
95 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
96 (gfc_adjust_builtins): Likewise.
98 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
101 * resolve.c (resolve_variable): Check for associate names with
104 2018-11-23 Jakub Jelinek <jakub@redhat.com>
106 * lang.opt (fpad-source): New option.
107 * scanner.c (load_line): Don't pad fixed form lines if
109 * invoke.texi (-fno-pad-source): Document.
111 2018-11-21 Jakub Jelinek <jakub@redhat.com>
113 * invoke.texi (-fdec-include): Document.
115 2018-11-21 Jakub Jelinek <jakub@redhat.com>
116 Mark Eggleston <mark.eggleston@codethink.com>
118 * lang.opt (fdec-include): New option.
119 * options.c (set_dec_flags): Set also flag_dec_include.
120 * scanner.c (include_line): Change return type from bool to int.
121 In fixed form allow spaces in between include keyword letters.
122 For -fdec-include, allow in fixed form 0 in column 6. With
123 -fdec-include return -1 if the parsed line is not full include
124 statement and it could be successfully completed on continuation
126 (include_stmt): New function.
127 (load_file): Adjust include_line caller. If it returns -1, keep
128 trying include_stmt until it stops returning -1 whenever adding
129 further line of input.
131 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
134 * frontend-passes.c (combine_array_constructor): Do not do
135 anything if in a WHERE statement.
137 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
140 * expr.c (gfc_check_assign): Reject assigning to an external
142 (gfc_check_pointer_assign): Add suppress_type_test
143 argument. Insert line after if. A non-proc pointer can not point
144 to a constant. Only check types if suppress_type_test is false.
145 * gfortran.h (gfc_check_pointer_assign): Add optional
146 suppress_type_test argument.
147 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
148 and give it the extra argument.
149 (resolve_fl_procedure): Set error on value for a function with
152 2018-11-15 David Malcolm <dmalcolm@redhat.com>
155 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
157 2018-11-13 David Malcolm <dmalcolm@redhat.com>
159 * cpp.c: Replace "source_location" with "location_t".
160 * gfortran.h: Likewise.
162 2018-11-08 Jakub Jelinek <jakub@redhat.com>
164 * trans-openmp.c (gfc_trans_omp_clauses): Use
165 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
166 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
167 rather than OMP_ATOMIC_SEQ_CST.
168 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
169 make_node instead of build1_loc.
170 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
171 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
172 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
173 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
174 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
175 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
176 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
178 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
181 * decl.c (verify_bind_c_sym): Remove unnecessary space
184 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
187 * frontend-passes.c (constant_string_length): If there is a
188 substring with a length which cannot be reduced to a constant,
191 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
194 * dependency.c (are_identical_variables): Return false if the
195 inquiry refs are not the same.
196 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
197 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
198 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
199 (gfc_copy_ref): Copy the inquiry ref types.
200 (find_inquiry_ref): New function.
201 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
202 to simplify_ref_chain.
203 (gfc_simplify_expr): Use the new arg in call to
205 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
207 (gfc_traverse_expr): Return true for inquiry ref.
208 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
209 * gfortran.h : Add enums and union member in gfc_ref to
210 implement inquiry refs.
211 * intrinsic.c : Fix white nois.
212 * match.c (gfc_match_assignment): A constant lavlue is an
214 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
216 (mio_ref): Handle inquiry refs.
217 * primary.c (is_inquiry_ref): New function.
218 (gfc_match_varspec): Handle inquiry refs calling new function.
219 (gfc_variable_attr): Detect inquiry ref for disambiguation
221 (caf_variable_attr): Treat inquiry and substring refs in the
223 * resolve.c (find_array_spec): ditto.
224 (gfc_resolve_substring_charlen): If there is neither a charlen
225 ref not an inquiry ref, return.
226 (resolve_ref): Handle inqiry refs as appropriate.
227 (resolve_allocate_expr): Entities with an inquiry ref cannot be
229 * simplify.c (simplify_bound, simplify_cobound): Punt on
231 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
233 *trans-expr.c (conv_inquiry): New function.
234 (gfc_conv_variable): Retain the last typespec to pass to
235 conv_inquiry on detecting an inquiry ref.
237 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
240 * decl.c (verify_bind_c_sym): Improve error message.
242 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
245 * gfortran.texi (File format of unformatted sequential files):
246 Replace random comma with period.
247 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
249 (MAXLOC): Add refrence to FINDLOC.
252 2018-10-31 Nathan Sidwell <nathan@acm.org>
254 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
256 2018-10-31 Martin Liska <mliska@suse.cz>
258 * trans-decl.c (struct module_hasher): Call htab_hash_string
259 for s->name and not for s.
261 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
264 * simplify.c (simplify_min_max): Do not convert the type of the
267 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
270 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
271 (gfc_check_f): Add f6fl field.
272 (gfc_simplify_f): Add f6 field.
273 (gfc_resolve_f): Likewise.
274 (gfc_type_letter): Add optional logical_equas_int flag.
275 * check.c (intrinsic_type_check): New function.
276 (gfc_check_findloc): New function.
277 * intrinsics.c (gfc_type_letter): If logical_equals_int is
278 set, act accordingly.
279 (add_sym_5ml): Reformat comment.
280 (add_sym_6fl): New function.
281 (add_functions): Add findloc.
282 (check_arglist): Add sixth argument, handle it.
283 (resolve_intrinsic): Likewise.
284 (check_specific): Handle findloc.
285 * intrinsic.h (gfc_check_findloc): Add prototype.
286 (gfc_simplify_findloc): Likewise.
287 (gfc_resolve_findloc): Likewise.
288 (MAX_INTRINSIC_ARGS): Adjust.
289 * iresolve.c (gfc_resolve_findloc): New function.
290 * simplify.c (gfc_simplify_minmaxloc): Make static.
291 (simplify_findloc_to_scalar): New function.
292 (simplify_findloc_nodim): New function.
293 (simplify_findloc_to_array): New function.
294 (gfc_simplify_findloc): New function.
295 (gfc_conv_intrinsic_findloc): New function.
296 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
297 (gfc_is_intrinsic_libcall): Likewise.
299 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
302 * frontend-passes.c (check_locus_code): Add information that
303 warning about missing location information points to an
304 inconsisten internal state.
305 (check_locus_expr): Likewise.
307 2018-10-25 Jakub Jelinek <jakub@redhat.com>
310 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
311 nonmonotonic modifiers regardless of if they have been parsed
312 already or if the opposite one has. Fix up check whether
313 comma after modifier should be parsed.
314 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
316 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
319 * frontend-passes.c (get_len_call): New function to generate a
320 call to intrinsic LEN.
321 (create_var): Use this to make length expressions for variable
323 Clean up some white space issues.
325 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
328 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
329 length for array valued deferred length lhs.
331 2018-10-18 Tobias Burnus <burnus@net-b.de>
334 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
337 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
340 * trans-stmt.c (trans_associate_var): All strings that return
341 as pointer types can be assigned directly to the associate
342 name so remove 'attr' and the condition that uses it.
344 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
347 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
348 initialization with NULL() of a deferred length pointer.
350 2018-10-17 Tobias Burnus <burnus@net-b.de>
353 * resolve.c (resolve_select_type): Use correct variable.
355 2018-10-17 David Malcolm <dmalcolm@redhat.com>
357 * Make-lang.in (selftest-fortran): New.
359 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
366 * resolve.c (resolve_variable): Fix up expressions with array
367 associate names, where the parser did not detect that this is
368 array and there was no array part_ref in the expression.
370 2018-10-16 Tobias Burnus <burnus@net-b.de>
373 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
374 Rename argument e3_is_array_constr to e3_has_nodescriptor
376 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
377 to 1 for nonalloc/nonpointer func results/vars besides
380 2018-10-16 Tobias Burnus <burnus@net-b.de>
383 * trans-stmt.c (form_team, change_team, sync_team):
384 Don't ignore argse.pre/argse.post.
386 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
387 Tobias Burnus <burnus@gcc.gnu.org>
390 * resolve.c (resolve_assoc_var): Add missing array spec for
391 class associate names.
392 (resolve_select_type): Handle case where last typed component
393 of the selector has a different type to the expression.
394 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
395 call to gfc_expr_to_initialize with call to gfc_copy_expr.
396 (gfc_conv_class_to_class): Guard assignment to 'len' field
397 against case where zero constant is supplied.
399 2018-10-12 Tobias Burnus <burnus@net-b.de>
402 * expr.c (gfc_simplify_expr): Avoid simplifying
403 the 'array' argument to lbound/ubound/lcobound/
406 2018-10-12 Tobias Burnus <burnus@net-b.de>
409 * decl.c (get_proc_name): Return with error before
412 2018-10-11 Tobias Burnus <burnus@net-b.de>
415 2018-10-09 Tobias Burnus <burnus@net-b.de>
418 * resolve.c (resolve_ref): Reject nonscalar
419 substring references.
421 2018-10-09 David Malcolm <dmalcolm@redhat.com>
423 * cpp.c (gfc_cpp_init_0): Update for renamings.
424 (cb_cpp_error): Rename to...
425 (cb_cpp_diagnostic): ...this, converting level and reason to
428 2018-10-09 Tobias Burnus <burnus@net-b.de>
431 * resolve.c (resolve_ref): Reject nonscalar
432 substring references.
434 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
437 * trans-array.c (gfc_get_array_span): Deal with deferred char
438 array components having a TYPE_MAX_VALUE of zero.
439 (gfc_array_init_size): Use the hidden string length component
440 to build the descriptor dtype.
441 (gfc_array_allocate): Remove the erroneous replacement of the
442 charlen backend decl with a temporary.
443 (gfc_conv_expr_descriptor): Use the ss_info string length in
444 the case of deferred character components.
445 (gfc_alloc_allocatable_for_assignment): Actually compare the
446 string lengths for deferred characters. Make sure that kind > 1
447 is handled correctly. Set the span field of the descriptor.
448 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
452 * trans-array.c (gfc_array_allocate): Set the span field for
453 variable length character arrays.
455 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
457 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
458 contiguous pointer from non-contiguous target" to a warning.
460 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
463 * trans-stmt.c (trans_associate_var): Character associate names
464 with variable string length do not have to be deferred length
465 for the string length to be set, if variable.
467 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
470 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
471 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
472 (gfc_arith_concat): If the types of op1 and op2 are not
473 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
475 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
478 * resolve.c (resolve_fl_procedure): Include class functions in
479 the test that elemental function results be scalar.
481 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
484 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
485 by one. Set extents one past the array boundaries to zero to avoid
486 warning with instrumented compiler.
487 (gfc_simplify_eoshift): Likewise, only for ss_ex.
489 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
492 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
493 character length pointer initializer has the right type to fix
494 problem with deferred_character_24.f90 on big endian.
496 2018-10-03 Jeff Law <law@redhat.comg>
498 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
500 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
503 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
504 flag in the call to gfc_check_dependency.
506 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
509 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
510 introduced by r264358, which prevented components of associate
511 names from being reallocated on assignment.
513 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
517 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
518 deferred type and the info->descriptor is present, use the
520 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
521 it as 'decl' rather than the symbol backend_decl.
522 (gfc_array_allocate): If the se string_length is a component
523 reference, fix it and use it for the expression string length
524 if the latter is not a variable type. If it is a variable do
525 an assignment. Make use of component ref string lengths to set
526 the descriptor 'span'.
527 (gfc_conv_expr_descriptor): For pointer assignment, do not set
528 the span field if gfc_get_array_span returns zero.
529 * trans.c (get_array_span): If the upper bound a character type
530 is zero, use the descriptor span if available.
532 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
535 * trans-decl.c (gfc_get_symbol_decl): A deferred character
536 length pointer that is initialized needs the string length to
537 be initialized as well.
539 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
542 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
543 fix the rse stringlength.
545 2018-09-25 Martin Liska <mliska@suse.cz>
548 * decl.c (add_hidden_procptr_result): Simplify condition
549 as we are in branch witch 'case1 || case2'.
551 2018-09-25 Martin Liska <mliska@suse.cz>
553 * trans.c (remove_suffix): Remove
556 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
559 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
560 for variables in an associate statement.
562 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
563 Cesar Philippidis <cesar@codesourcery.com>
565 * openmp.c (resolve_oacc_loop_blocks):
567 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
570 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
571 for variables having the dimension attribute.
573 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
575 * trans-expr.c (gfc_caf_get_image_index): Do array index
576 calculations in gfc_array_index_type.
577 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
578 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
579 (gfc_trans_event_post_wait): Likewise.
581 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
584 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
585 clobber on INTENT(OUT) for saved variables.
587 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
590 * trans.h (gfc_conv_expr_reference): Add optional argument
591 add_clobber to prototype.
592 (gfc_conv_procedure_call): Set add_clobber argument to
593 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
594 non-pointer, non-allocatable, non-dummy variables whose type
595 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
596 the procedure is not elemental.
597 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
598 statement before call if add_clobber is set.
600 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
603 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
604 the charlen backend_decl before using the VAR_P macro.
606 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
609 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
610 rhs has a charlen expression, convert that and use it.
611 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
612 assignment of deferred character array vars to a realocatable
613 lhs should not be added to the exterior block since vector
614 indices, for example, generate temporaries indexed within the
617 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
620 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
621 components if must_finalize is set for expr3.
623 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
624 Kwok Cheung Yeung <kcy@codesourcery.com>
626 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
627 argument of a call to _gfortran_caf_register is of size_type_node.
628 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
629 index to a size_type_node type.
630 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
632 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
634 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
636 2018-09-20 Janus Weil <janus@gcc.gnu.org>
638 * gfortran.h (gfc_str_startswith): New macro.
639 * decl.c (variable_decl, gfc_match_end): Use it.
640 * iresolve.c (is_trig_resolved): Ditto.
641 * module.c (load_omp_udrs, read_module): Ditto.
642 * options.c (gfc_handle_runtime_check_option): Ditto.
643 * primary.c (match_arg_list_function): Ditto.
644 * trans-decl.c (gfc_get_symbol_decl): Ditto.
645 * trans-expr.c (gfc_conv_procedure_call): Ditto.
646 * interface.c (dtio_op): Replace strncmp by strcmp.
647 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
648 * trans-expr.c (conv_arglist_function): Ditto.
649 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
650 STARTS_WITH by gfc_str_startswith.
652 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
654 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
655 and reorder the switch cases to match the enum in gfortran.h.
657 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
660 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
661 assignment of deferred character intrinsic elemental function
662 results to a realocatable lhs must not be added to the exterior
663 block if they are array valued but must go to the loop body.
665 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
668 * gfortran.h (gfc_expr): Add external_blas flag.
669 * frontend-passes.c (matrix_case): Add case A2TB2T.
670 (optimize_namespace): Handle flag_external_blas by
671 calling call_external_blas.
672 (get_array_inq_function): Add argument okind. If
673 it is nonzero, use it as the kind of argument
675 (inline_limit_check): Remove m_case argument, add
676 limit argument instead. Remove assert about m_case.
677 Set the limit for inlining from the limit argument.
678 (matmul_lhs_realloc): Handle case A2TB2T.
679 (inline_matmul_assign): Handle inline limit for other cases with
680 two rank-two matrices. Remove no-op calls to inline_limit_check.
681 (call_external_blas): New function.
682 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
683 argument to external BLAS if external_blas is already set.
685 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
688 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
689 assignment of deferred character elemental function results to
690 a realocatable lhs must not be added to the exterior block but
691 must go to the loop body.
693 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
696 * trans-array.c (gfc_get_array_span): Try to get the element
697 length of incomplete types. Return NULL_TREE otherwise.
698 (gfc_conv_expr_descriptor): Only set the 'span' field if the
699 above does not return NULL_TREE. Set 'span' field if possible
700 for all new descriptors.
702 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
705 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
706 characters with a variable length expression for deferred init.
707 (gfc_trans_deferred_vars): Perform the assignment for these
708 symbols by calling gfc_conv_string_length.
710 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
713 * resolve.c (resolve_assoc_var): If the target expression is a
714 deferred charlen dummy and the associate name shares the
715 charlen, generate a new one. Make sure that new charlens are in
716 the namespace list so that they get cleaned up.
717 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
719 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
720 length dummy and result arrays on the deferred initialization
721 list so that the variable length arrays can be correctly dealt
723 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
724 NULL rather than ICEing..
726 2018-09-16 Janus Weil <janus@gcc.gnu.org>
730 * match.c (gfc_match_assignment): For a polymorphic assignment,
731 make sure that the vtab for the rhs type is generated.
733 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
736 * frontend-passes.c (B_ERROR): New macro for matmul bounds
737 checking error messages.
739 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
742 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
744 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
745 from overlength string initializers.
747 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
750 * trans-expr.c (gfc_trans_class_init_assign): Access to
751 to array elements of the dynamic type requires that the array
752 reference be added to the class expression and not the _data
753 component, unlike scalar expressions.
755 2018-09-11 Janus Weil <janus@gcc.gnu.org>
758 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
759 attribute, then it was declared in another module, so there should be
760 no error that it has not been declared.
762 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
765 * expr.c (is_subref_array): Add the check of dimensionality for
766 class, dummy, pointer arrays.
768 2018-09-11 Janus Weil <janus@gcc.gnu.org>
771 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
772 with non-polymorphic objects.
774 2018-09-10 Janus Weil <janus@gcc.gnu.org>
777 * decl.c (match_binding_attributes): Use correct default accessibility
778 for procedure pointer components.
780 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
782 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
783 'P' is zero and issue an error if it is.
785 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
789 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
790 info->descriptor but pass it directly to gfc_build_array_ref.
791 (gfc_conv_array_ref): Likewise for se->expr.
792 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
793 obtain the span field directly from it.
795 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
798 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
799 scalar results being passed to a derived type formal argument
800 are finalized if possible. Otherwise, rely on existing code for
801 deallocation. Make the deallocation of allocatable result
802 components conditional on finalization not taking place. Make
803 the freeing of data components after finalization conditional
804 on the data being NULL.
805 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
806 condition to return NULL_TREE.
807 (gfc_trans_assignment_1): If the assignment is class to class
808 and the rhs expression must be finalized but the assignment
809 is not marked as a polymorphic assignment, use the vptr copy
810 function instead of gfc_trans_scalar_assign.
813 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
814 block to the pre block if the expression is to be finalized.
815 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
816 finalized, load the post block into a finalization block and
817 add it right at the end of the allocation block.
819 2018-08-27 David Malcolm <dmalcolm@redhat.com>
822 * error.c (gfc_format_decoder): Update for conversion of
823 show_caret_p to a tri-state.
825 2018-08-25 Janus Weil <janus@gcc.gnu.org>
828 * resolve.c (resolve_transfer): Correctly determine typespec for
829 generic function calls, in order to throw a proper error.
831 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
834 * frontend-passes.c (var_in_expr_callback): New function.
835 (var_in_expr): New function.
836 (traverse_io_block): Use var_in_expr instead of
837 gfc_check_dependency for checking if the variable depends on the
840 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
842 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
843 HONOR_SIGNED_ZEROS checks.
845 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
848 * resolve.c (resolve_typebound_call): If the TBP is not marked
849 as a subroutine, check the specific symbol.
851 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
853 * gfortran.texi: Mention that asynchronous I/O does
854 not work on systems which lack condition variables, such
857 2018-08-22 Janus Weil <janus@gcc.gnu.org>
860 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
863 2018-08-22 Andrew Benson <abensonca@gmail.com>
865 * module.c (load_generic_interfaces): Move call to find_symbol()
866 so that only occurs if actually needed.
868 2018-08-22 Janus Weil <janus@gcc.gnu.org>
871 * decl.c (gfc_match_data_decl): Allow allocatable components of
872 indirectly recursive type.
873 * resolve.c (resolve_component): Remove two errors messages ...
874 (resolve_fl_derived): ... and replace them by a new one.
876 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
878 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
879 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
880 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
883 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
884 Thomas Koenig <tkoenig@gcc.gnu.org>
887 * gfortran.texi: Add description of asynchronous I/O.
888 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
890 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
891 st_wait_async and change argument spec from ".X" to ".w".
892 (gfc_trans_wait): Pass ID argument via reference.
894 2018-08-16 Nathan Sidwell <nathan@acm.org>
896 * cpp.c (dump_macro): Use cpp_user_macro_p.
898 2018-08-14 Janus Weil <janus@gcc.gnu.org>
901 * interface.c (compare_type): Remove a CLASS/TYPE check.
902 (compare_type_characteristics): New function that behaves like the old
904 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
905 Call 'compare_type_characteristics' instead of 'compare_type'.
907 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
910 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
911 elements are returned as references to the data element. Get
912 the class expression by stripping back the references. Use this
913 for the element size.
915 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
918 * resolve.c (resolve_fl_variable_derived): Check if the derived
919 type is use associated before checking for the host association
922 2018-08-10 Janus Weil <janus@gcc.gnu.org>
925 * invoke.texi (frontend-optimize): Mention short-circuiting.
926 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
927 * resolve.c (resolve_operator): Warn about short-circuiting only with
929 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
930 with -ffrontend-optimize. Without that flag, make sure that both
931 operands are evaluated.
933 2018-08-08 Nathan Sidwell <nathan@acm.org>
935 * cpp.c (cb_file_change): Use linemap_included_from.
937 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
939 * trans-stmt.h: Remove stale reference to trans-openacc.c.
941 2018-08-04 Janus Weil <janus@gcc.gnu.org>
944 * interface.c (gfc_compare_interfaces): Apply additional
945 distinguishability criteria of F08 to operator interfaces.
947 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
949 Revert 'AsyncI/O patch committed'
950 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
951 Thomas Koenig <tkoenig@gcc.gnu.org>
954 * gfortran.texi: Add description of asynchronous I/O.
955 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
957 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
958 st_wait_async and change argument spec from ".X" to ".w".
959 (gfc_trans_wait): Pass ID argument via reference.
961 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
962 Thomas Koenig <tkoenig@gcc.gnu.org>
965 * gfortran.texi: Add description of asynchronous I/O.
966 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
968 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
969 st_wait_async and change argument spec from ".X" to ".w".
970 (gfc_trans_wait): Pass ID argument via reference.
972 2018-07-20 Martin Sebor <msebor@redhat.com>
975 * gfortran.h (gfc_handle_option): Change function argument
977 * options.c (gfc_handle_option): Same.
979 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
981 * gfortran.h (gfc_symbol): Add pointer to next derived type.
982 (gfc_dt_list, gfc_get_dt_list): Remove.
983 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
984 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
985 simple nullification of gfc_derived_types.
986 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
988 (add_dt_to_dt_list): Change derived type linked list insertion to
989 utilize dt_next pointers in gfc_symbol.
990 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
991 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
992 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
993 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
994 * trans-types.c (gfc_get_derived_type): Change derived type linked
995 list search to utilize dt_next pointers in gfc_symbol.
997 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
999 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
1000 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
1002 2018-07-18 Janus Weil <janus@gcc.gnu.org>
1003 Thomas Koenig <tkoenig@gcc.gnu.org>
1006 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
1007 * frontend-passes.c (do_warn_function_elimination): Do not warn for
1009 * gfortran.h: Add prototypes for gfc_pure_function and
1010 gfc_implicit_pure_function.
1011 * gfortran.texi: Add chapter on evaluation of logical expressions.
1012 * invoke.texi: Mention that -Wfunction-elimination is implied
1014 * lang.opt: Make -Wextra imply -Wfunction-elimination.
1015 * resolve.c (pure_function): Rename to gfc_pure_function.
1016 (gfc_implicit_pure_function): New function.
1017 (check_pure_function): Use it here.
1018 (impure_function_callback): New function.
1019 (resolve_operator): Call it via gfc_expr_walker.
1021 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1024 * decl.c (match_old_style_init): Initialize locus of variable expr when
1025 creating a data variable.
1026 (match_clist_expr): Verify array is explicit shape/size before
1027 attempting to allocate constant array constructor.
1029 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1032 * module.c (mio_component): Set component->loc when loading from module.
1034 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1037 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1039 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1040 on linear clauses. Initialize n->where to gfc_current_locus.
1042 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
1045 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
1046 in F2008 and not F2003.
1047 (resolve_function): Ditto in error message. Also, exclude
1048 deferred character length results from the error.
1050 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
1054 * expr.c (class_allocatable, class_pointer, comp_allocatable,
1055 comp_pointer): New helpers.
1056 (component_initializer): Generate EXPR_NULL for allocatable or pointer
1057 components. Do not generate initializers for components within BT_CLASS.
1058 Do not assign to comp->initializer.
1059 (gfc_generate_initializer): Use new helpers; move code to generate
1060 EXPR_NULL for class allocatable components into component_initializer().
1062 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1065 * trans-decl.c (gfc_process_block_locals): Delete assert and set
1066 saved_local_decls = NULL_TREE.
1068 2018-07-02 Richard Biener <rguenther@suse.de>
1071 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
1072 for the distinct type copy.
1074 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1078 * trans-array.c (structure_alloc_comps): Do not explicitly copy
1079 procedure pointer components.
1081 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1084 * expr.c : Add a prototype for scalarize_intrinsic_call.
1085 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
1086 intrinsic function calls.
1087 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
1088 the expression or any of the actual argument expressions are
1089 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
1090 Only simplify the scalarized expressions if there are no errors
1092 (gfc_check_init_expr): Set 'init_flag' true in the call to
1093 scalarize_intrinsic_call.
1095 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
1098 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
1100 2018-06-28 Martin Liska <mliska@suse.cz>
1102 * gfortranspec.c: Include opt-suggestions.h.
1104 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
1109 * expr.c (component_initializer): Assign init expr to c->initializer.
1110 (generate_isocbinding_initializer): New.
1111 (gfc_generate_initializer): Call generate_isocbinding_initializer to
1112 generate initializers for c_ptr and c_funptr with -finit-derived.
1114 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1117 * interface.c (check_dtio_interface1): Delete assert.
1119 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
1120 Rainer Orth <ro@gcc.gnu.org>
1123 * resolve.c (resolve_contained_fntype): Check for the charlen
1124 before testing the length.
1126 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1129 * resolve.c (resolve_contained_fntype): Change standard ref.
1130 from F95 to F2003: C418. Correct a spelling error in a comment.
1131 It is an error for an abstract interface to have an assumed
1132 character length result.
1133 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
1136 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1139 * resolve.c (resolve_ordinary_assign): Force the creation of a
1140 vtable for assignment of non-polymorphic expressions to an
1141 unlimited polymorphic object.
1142 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1143 size of the rhs type for such assignments. Set the dtype, _len
1144 and vptrs appropriately.
1145 * trans-expr.c (gfc_trans_assignment): Force the use of the
1146 _copy function for these assignments.
1148 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1149 Thomas Schwinge <thomas@codesourcery.com>
1150 Cesar Philippidis <cesar@codesourcery.com>
1152 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
1154 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
1155 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1156 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
1157 create, deviceptr, present_of_*. Add support for finalize and
1159 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
1160 (OACC_KERNELS_CLAUSES): Likewise.
1161 (OACC_DATA_CLAUSES): Likewise.
1162 (OACC_DECLARE_CLAUSES): Likewise.
1163 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
1164 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
1165 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
1166 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
1167 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
1170 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1172 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
1174 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1176 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
1177 (nonlocal_dummy_decls): Likewise.
1178 (gfc_nonlocal_dummy_array_decl): Likewise.
1179 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
1180 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
1181 reusing the result of a recursive call.
1182 (gfc_generate_function_code): Do not create, insert and destroy
1183 nonlocal_dummy_decls.
1185 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1188 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
1189 pointer dereference.
1191 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1194 * parse.c (decode_oacc_directive): Set gfc_matching_function
1196 (decode_omp_directive): Likewise.
1198 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1201 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1203 2018-06-12 David Malcolm <dmalcolm@redhat.com>
1206 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
1207 levenshtein_distance to get_edit_distance.
1209 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1212 * expr.c (gfc_check_assign): Select non-NULL locus.
1214 2018-06-11 Janus Weil <janus@gcc.gnu.org>
1217 * interface.c (compare_ptr_alloc): New function.
1218 (generic_correspondence): Call it.
1220 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1222 * gfortran.h (gfc_expr): Add no_bounds_check field.
1223 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
1224 on function and function argument.
1225 (inline_matmul_assign): Set no_bounds_check on zero expression
1226 and on lhs of zero expression.
1227 Also handle A1B2 case if realloc on assigment is active.
1228 * trans-array.c (gfc_conv_array_ref): Don't do range checking
1229 if expr has no_bounds_check set.
1230 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
1232 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
1233 on lss and lss if the corresponding expressions have it set.
1235 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
1238 * trans-const.c: Remove include "diagnostic-core.h".
1239 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
1241 2018-06-10 Janus Weil <janus@gcc.gnu.org>
1244 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
1245 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
1246 and remove a TODO note.
1247 * gfortran.h: Add a comment to sym_intent.
1249 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1252 * resolve.c (resolve_operator): Provide better error message for
1253 derived type entity used in an binary intrinsic numeric operator.
1255 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1260 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
1261 reduce a charlen to a constant.
1263 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1266 * data.c (gfc_assign_data_value): Re-arrange code to allow for
1267 an error for double initialization of CHARACTER entities.
1269 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1272 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1274 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1277 * trans.h (gfc_ss): Add field no_bounds_check.
1278 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1279 ss->no_bounds_check is set, do not use runtime checks.
1280 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1281 for reallocatable lhs.
1283 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1286 * array.c (match_array_cons_element): NULL() cannot be in an
1289 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1292 * data.c (create_character_initializer): Return early if type is
1293 incompatible with CHARACTER.
1295 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1298 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1299 'P' is zero and issue an error if it is.
1301 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1304 * frontend-passes.c (is_fe_temp): Add prototype.
1305 (realloc_string_callback): Early return for frontend-generated
1308 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
1312 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
1313 subroutine data clause arguments.
1315 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
1318 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
1321 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
1324 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
1326 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
1329 * check.c (gfc_check_random_init): New function. Check arguments of
1331 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
1332 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
1334 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
1335 * intrinsic.h: Add prototypes for gfc_check_random_init and
1336 gfc_resolve_random_init
1337 * intrinsic.texi: Document new intrinsic subprogram.
1338 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
1339 * trans-decl.c: Declare gfor_fndecl_random_init
1340 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
1341 Translate call to RANDOM_INIT.
1342 (gfc_conv_intrinsic_subroutine): Call it.
1343 * trans.h: Declare gfor_fndecl_random_init
1345 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
1347 * decl.c (match_data_constant): Fortran 2018 allows pointer
1348 initialization in a data statement.
1350 2018-05-25 Janus Weil <janus@gcc.gnu.org>
1353 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
1354 an obsolescent feature in Fortran 2018.
1355 (gfc_match_equivalence): Ditto.
1356 * resolve.c (resolve_common_blocks): Ditto.
1357 (gfc_resolve_forall): Ditto.
1358 * symbol.c (gfc_define_st_label): Ditto.
1360 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1363 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1364 pointer dereference.
1366 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1369 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1371 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1374 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1376 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1379 * resolve.c (resolve_sync): Resolve expression before checking for
1382 2018-05-22 Janus Weil <janus@gcc.gnu.org>
1385 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
1387 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
1388 * options.c (set_default_std_flags): Ditto.
1389 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
1390 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
1392 * check.c (gfc_check_atomic, gfc_check_event_query,
1393 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
1394 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
1395 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
1396 * intrinsic.c (add_functions, add_subroutines,
1397 gfc_check_intrinsic_standard): Ditto.
1398 * iso-c-binding.def: Ditto.
1399 * iso-fortran-env.def: Ditto.
1400 * match.c (gfc_match_event_post, gfc_match_event_wait,
1401 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
1402 gfc_match_end_team, gfc_match_sync_team): Ditto.
1403 * gfortran.texi: Remove mention of -std=f2008ts.
1404 Move TSs into F2018 section.
1405 * invoke.texi: Update documentation of -std=f2008ts.
1407 2018-05-21 Janus Weil <janus@gcc.gnu.org>
1410 * libgfortran.h: New macros GFC_STD_OPT_*.
1411 * error.c (notify_std_msg): New function.
1412 (gfc_notify_std): Adjust such that it can handle combinations of
1413 GFC_STD_* flags in the 'std' argument, not just a single one.
1414 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
1416 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
1417 * options.c (set_default_std_flags): Warn for F2018 deleted features
1419 (gfc_handle_option): F2018 deleted features are allowed in earlier
1421 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
1422 nonblock do constructs in Fortran 2018.
1424 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1427 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1428 test for self refs to the function result in the character len
1429 expression. If a self reference is found, emit an error and
1431 (resolve_fntype): Use the function symbol in the calls to the
1434 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1437 * trans-array.c (gfc_get_array_span): Renamed from
1439 (gfc_conv_expr_descriptor): Change references to above.
1440 * trans-array.h : Add prototype for 'gfc_get_array_span'.
1441 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
1443 * trans-stmt.c (trans_associate_var): If the associate name is
1444 a subref array pointer, use gfc_get_array_span for the span.
1446 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1449 * match.c (gfc_match_type_spec): Go through the array ref and
1450 decrement 'rank' for every dimension that is an element.
1452 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
1457 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1458 charlen backend_decl of the rhs expr to ss->info->string_length
1459 so that the value in the current scope is used.
1461 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1464 * gfortran.texi: Clarify documentation for Cray pointer and
1465 assumed-sized array.
1467 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
1470 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1471 of 'size'. If the element type is a pointer use the size of the
1472 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1473 case, set the size to zero.
1475 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1477 * gfortran.h: Remove prototype.
1478 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
1480 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
1483 * expr.c (check_inquiry): Avoid NULL pointer dereference.
1485 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1488 * check.c (gfc_check_rank): Check that the argument is a data object.
1490 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1493 * array.c (gfc_resolve_character_array_constructor): Substrings
1494 with upper bound smaller than lower bound are zero length strings.
1496 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1499 * data.c (gfc_assign_data_value): Check that a data object does
1500 not also have default initialization.
1502 2018-05-10 Marek Polacek <polacek@redhat.com>
1505 * options.c (gfc_post_options): Set main_input_filename.
1507 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1510 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1512 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
1516 * resolve.c (get_temp_from_expr): The temporary must not have
1517 dummy or intent attributes.
1519 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1522 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1523 implemented. Use gfc_logical_4_kind for BACK.
1524 * simplify.c (min_max_choose): Add optional argument back_val.
1526 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1527 back_val to min_max_choose.
1528 (simplify_minmaxloc_to_nodim): Likewise.
1529 (simplify_minmaxloc_to_array): Likewise.
1530 (gfc_simplify_minmaxloc): Add argument back, handle it.
1531 Pass back_val to specific simplification functions.
1532 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1533 pass it on to gfc_simplify_minmaxloc.
1534 (gfc_simplify_maxloc): Likewise.
1535 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1536 comment. If BACK is true, use greater or equal (or lesser or
1537 equal) insteal of greater (or lesser). Mark the condition of
1538 having found a value which exceeds the limit as unlikely.
1540 2018-05-07 Jeff Law <law@redhat.comg>
1542 * scanner.c (preprocessor_line): Call linemap_add after a line
1543 directive that changes the current filename.
1545 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
1548 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1549 introduced by r259385.
1550 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1551 same variables in coarray assignments.
1553 2018-05-02 Tom de Vries <tom@codesourcery.com>
1556 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1558 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1561 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1563 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
1567 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1568 during dependency computation. They define no data dependency.
1569 * trans-array.c (conv_array_index_offset): The stride can not be set
1571 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1572 for caf_get's result and copying to the array with vectorial
1575 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1578 * frontend-passes.c (traverse_io_block): Check for start, end or
1579 stride being defined by an outer implied DO loop.
1581 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1585 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1586 for annotation and remove dependence on -ftree-parallelize-loops.
1588 2018-04-10 Jakub Jelinek <jakub@redhat.com>
1591 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1592 (resolve_oacc_nested_loops): Likewise. Formatting fix.
1594 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1597 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1598 parallell processing of DO CONCURRENT -ftree-parallelize-loops
1601 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1604 * resolve.c (resolve_variable): Simplify cases where access to a
1605 parameter array results in a single constant.
1607 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1610 * decl.c (variable_decl): If upper or lower bounds simplify
1611 to a constant, use that.
1613 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
1616 * simplify.c (gfc_convert_constant): Handle case of array
1617 constructors within an array that has no iterator and improve
1618 the conciseness of this section of code.
1620 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1623 * array.c (gfc_resolve_character_array_constructor): Early
1624 exit for zero-size arrays.
1625 * simplify.c (simplify_transformation_to_array): Exit early
1626 if the result size is zero.
1627 (simplify_minmaxloc_to_array): Likewise.
1629 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
1632 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1634 (gfc_free_namespace): Restore assert (revert r258839).
1636 2018-03-28 Jakub Jelinek <jakub@redhat.com>
1638 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1639 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1640 (IOPARM_dt_dec_ext): ... this.
1641 * trans-io.c (build_dt): Adjust for default_exp renaming to
1642 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1643 * io.c (match_io): Likewise.
1645 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1648 * frontend-passes.c (gfc_run_passes): Do not run front-end
1649 optimizations if a previous error occurred.
1651 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1652 Harald Anlauf <anlauf@gmx.de>
1655 * primary.c (gfc_convert_to_structure_constructor): Check
1656 conformance of argument types in structure constructor.
1658 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1661 * io.c: Include constructor.h.
1662 (resolve_tag_format): For a constant character array, concatenate
1663 into a single character expression.
1665 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1666 Dominique d'Humieres <dominiq@gcc.gnu.org>
1669 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1670 scalar derived type with -std=f2003 and -std=f2008.
1672 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1673 Dominique d'Humieres <dominiq@gcc.gnu.org>
1676 * symbol.c (gfc_free_namespace): Delete the assert and only if
1677 refs count is equals zero, free the namespace. Otherwise,
1678 something is halfway and other errors will resound.
1680 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1683 * expr.c (find_substring_ref): Change types of start, end
1684 and length variables to gfc_charlen_t. Set length to zero
1685 for empty substring.
1687 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1690 * decl.c (check_function_name): Improved error message
1691 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1693 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1696 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1697 body, then it must appear on the contained subroutine or function.
1698 While here, fix nearby mis-indented code.
1700 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1701 Harald Anlauf <anlauf@gmx.de>
1704 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1706 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1709 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1710 gfc_charlen_type_node when calling procedure.
1712 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1715 * interface.c (symbol_rank): Remove bogus null pointer check that
1716 crept in when translating a ternary operator into an if-else
1719 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1722 * simplify.c (gfc_convert_constant): Correctly handle iterators
1723 for type conversion.
1725 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1728 * decl.c (get_proc_name): Check for a subroutine re-defined in
1729 the contain portion of a subroutine. Change language of existing
1730 error message to better describe the issue. While here fix whitespace
1733 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1736 * decl.c (get_proc_name): Catch clash between a procedure statement
1737 and a contained subprogram
1739 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1742 * decl.c (merge_array_spec): Correct the error condition.
1744 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1747 * decl.c (get_proc_name): Check for clash of entry name with
1750 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1753 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1754 dimensions, and issue error message if limit is exceeded.
1756 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1758 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1759 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1760 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1761 * intrinsic.texi: Update documentation.
1762 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1763 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1764 gfor_fndecl_kill and gfor_fndecl_kill_sub
1765 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1767 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1768 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1769 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1771 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
1774 * trans-array.c (structure_alloc_comps): Make sure that the
1775 vptr is copied and that the unlimited polymorphic _len is used
1776 to compute the size to be allocated.
1777 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1778 unlimited polymorphic _len for the offset to the element.
1779 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1780 * trans.h : Add the boolean 'unlimited' to the prototype.
1782 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1785 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1787 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1789 * check.c (gfc_check_kill): Check pid and sig are scalar.
1790 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1791 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1792 keywords for KILL. Remove redundant *back="back" in favor of the
1793 original *bck="back".
1794 (add_subroutines): Sort keyword list. Add pid and sig keywords
1796 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1797 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1799 (gfc_resolve_rename_sub): Add comment.
1801 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1804 * simplify.c (simplify_transformation): Return default result for
1805 empty array argument.
1806 (gfc_simplify_all): Remove special-case handling for zerosize.
1807 (gfc_simplify_any): Likewise.
1808 (gfc_simplify_count): Likewise.
1809 (gfc_simplify_iall): Likewise.
1810 (gfc_simplify_iany): Likewise.
1811 (gfc_simplify_iparity): Likewise.
1812 (gfc_simplify_minval): Likewise.
1813 (gfc_simplify_maxval): Likewise.
1814 (gfc_simplify_norm2): Likewise.
1815 (gfc_simplify_product): Likewise.
1816 (gfc_simplify_sum): Likewise.
1818 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1821 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1822 the expression up the chain instead of a NULL pointer.
1824 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1828 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1830 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1834 * expr.c (simplify_parameter_variable): If p is a size zero array
1835 and not an ARRAY_EXPR insert an empty array constructor and
1837 * gfortran.h: Add prototype for gfc_is_size_zero_array.
1838 * simplify.c (is_size_zero_array): Make non-static and rename into
1839 (gfc_is_size_zero_array): Check for parameter arrays of zero
1840 size by comparing shape and absence of constructor.
1841 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1843 (gfc_simplify_count): Likewise.
1844 (gfc_simplify_iall): Likewise.
1845 (gfc_simplify_iany): Likewise.
1846 (gfc_simplify_iparity): Likewise.
1847 (gfc_simplify_minval): Likewise.
1848 (gfc_simplify_maxval): Likewise.
1849 (gfc_simplify_product): Likewise.
1850 (gfc_simplify_sum): Likewise.
1852 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1855 * primary.c (match_sym_complex_part): Give the matcher for an implied
1856 do-loop a chance to run.
1858 2018-03-03 Harald Anlauf <anlauf@gmx.de>
1861 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1862 dereference NULL pointer.
1864 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1867 * simplify.c (is_size_zero_array): New function to check for size
1869 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1870 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1871 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1872 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1873 requirements from F2018.
1875 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1878 * simplify.c (gfc_simplify_transfer): Resolve mold.
1880 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
1883 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1886 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1889 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1890 components are caf tokens.
1891 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1894 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1897 * class.c (class_array_ref_detected): Remove the condition that
1898 there be no reference after the array reference.
1899 (find_intrinsic_vtab): Remove excess whitespace.
1900 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1901 as 'base and call build_class_array_ref earlier.
1903 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
1906 * trans-stmt.c (trans_associate_var): Make sure that the se
1907 expression is a pointer type before converting it to the symbol
1910 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1913 * decl.c (variable_decl): Check that an explicit-shape-array with
1914 nonconstant bounds is allowed.
1916 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
1919 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1920 has a pre block, add it to the expression pre block.
1922 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1925 * gfortran.h (gfc_integer_4_kind): Define.
1926 * resolve.c (resolve_select_type): Make sure that the
1927 kind of c->high is gfc_integer_4_kind.
1929 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1932 * decl.c (gfc_match_data): Check for invalid substring in
1935 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1937 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1939 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1942 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1944 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1947 * interface.c (compare_actual_formal): Issue error if keyword is
1948 used in a statement function.
1950 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1953 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1954 negative unit values for kind=8 units to the kind=4 negative limit.
1956 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1959 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1960 accessing its components.
1962 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1965 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1966 before accessing its components.
1968 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1971 * trans-const.c : Clean up some whitespace issues.
1972 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1973 derived type has a kind value of zero, set it to the default
1976 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1979 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1980 argument to stop and error stop decls.
1981 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1984 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1988 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1989 gfc_int8_type node to pause_numeric, size_type_node to
1991 * trans-stmt.c (gfc_trans_pause): Likewise.
1993 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1995 * gfortran.texi: Update Coarray API description.
1996 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1997 character lengths, int for exit codes.
1998 (generate_coarray_sym_init): Use size_t for character length.
1999 * trans-intrinsic.c (conv_co_collective): Likewise.
2000 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
2001 (gfc_trans_event_post_wait): Likewise.
2002 (gfc_trans_sync): Likewise.
2003 (gfc_trans_stop): Use size_t for character lengths, int for exit
2006 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
2010 * primary.c (gfc_convert_to_structure_constructor):
2011 For a constant string constructor, make sure the length
2014 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
2018 * resolve.c (resolve_assoc_var): Rearrange the logic for the
2019 determination of the character length of associate names. If
2020 the associate name is missing a length expression or the length
2021 expression is not a constant and the target is not a variable,
2022 make the associate name allocatable and deferred length.
2023 * trans-decl.c (gfc_get_symbol_decl): Null the character length
2024 backend_decl for deferred length associate names that are not
2025 variables. Set 'length' to gfc_index_zero_node for character
2026 associate names, whose character length is a PARM_DECL.
2028 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2031 * frontend-passes.c (traverse_io_block): Remove workaround for
2034 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
2036 * gfortran.texi: Document additional src/dst_type. Fix some typos.
2037 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2038 argument of _caf_*_by_ref () with * e { get, send, sendget }.
2039 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2040 data referenced when generating a call to caf_get_by_ref ().
2041 (conv_caf_send): Same but for caf_send_by_ref () and
2042 caf_sendget_by_ref ().
2044 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2047 * io.c (check_format): Allow FMT_COLON.
2049 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
2052 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2053 the typenode in the case of deferred length characters.
2055 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2058 * frontend-passes (scalarized_expr): If the expression
2059 is an assumed size array, leave in the last reference
2060 and pass AR_SECTION instead of AR_FULL to gfc_resolve
2061 in order to avoid an error.
2063 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
2066 * resolve.c (resolve_assoc_var): If a non-constant target expr.
2067 has no string length expression, make the associate variable
2068 into a deferred length, allocatable symbol.
2069 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2071 * trans-stmt.c (trans_associate_var): Null and free scalar
2072 associate names that are allocatable. After assignment, remove
2073 the allocatable attribute to prevent reallocation.
2075 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2078 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2079 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2081 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
2084 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2086 2018-02-15 Janus Weil <janus@gcc.gnu.org>
2089 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
2092 2018-02-14 Janus Weil <janus@gcc.gnu.org>
2095 * match.c (gfc_match_select_type): Fix check for selector in
2096 SELECT TYPE statement.
2098 2018-02-13 Janus Weil <janus@gcc.gnu.org>
2101 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
2103 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
2104 Janne Blomqvist <jb@gcc.gnu.org>
2106 * module.c (dump_module): Use lbasename to ensure that module
2107 files are reproducible.
2109 2018-02-12 Janus Weil <janus@gcc.gnu.org>
2112 * resolve.c (resolve_component): Fix checks of passed argument in
2113 procedure-pointer components.
2115 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2118 * resolve.c (resolve_formal_arglist): Update error message.
2120 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2122 * gfortran.texi: Fix typos in documentation of caf_register ().
2123 * trans-array.c (structure_alloc_comps): Only register a component of
2124 a derived typed corray, not of an ultimate component coarray.
2126 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
2130 * interface.c (compare_actual_formal): Add in_statement_function
2131 bool parameter. Skip check of INTENT attribute for statement
2132 functions. Arguments to a statement function cannot be optional,
2133 issue error for missing argument.
2134 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2135 in_statement_function.
2137 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
2140 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2141 flag. If the is a vector subscript or the expression is not a
2142 variable, make the descriptor one-based.
2144 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
2148 * trans-array.c (gfc_array_init_size): Revert the change made
2149 in revision 257356 setting the dtype.
2150 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2151 Call gfc_get_dtype_rank_type every time.
2154 * trans-array.c (gfc_conv_expr_descriptor): If the source array
2155 is a descriptor type, use its offset, removing the condition
2156 that is be a class expression.
2158 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2161 * match.c (gfc_match_deallocate): Check for NULL pointer.
2163 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2166 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2167 (gfc_conv_intrinsic_function): Call it.
2169 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2172 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2173 try to resolve it. While here return early if possible.
2175 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
2178 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2179 'length' if the symbol charlen backend_decl is an indirect ref.
2181 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
2185 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2186 use gfc_get_dtype_rank_type.
2188 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2192 * resolve.c (resolve_assoc_var): Generate an error if
2193 target length unknown.
2195 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2198 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
2199 to runtime, print a warning message.
2201 2018-01-31 Jakub Jelinek <jakub@redhat.com>
2204 * openmp.c (gfc_match_omp_clauses): If all the linear
2205 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2206 nor set *head = NULL. Formatting fixes.
2208 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
2211 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2212 an address expression passed to an assumed rank dummy, convert
2213 to an indirect reference.
2215 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2217 * dump-parse-tree.c (write_proc): Use sym_name (which may
2218 be sym->binding_label) instead of sym->name.
2220 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2222 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2225 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2228 * trans-expr.c (fill_with_spaces): Use memset instead of
2230 (gfc_trans_string_copy): Improve opportunity to use builtins with
2233 2018-01-30 Jakub Jelinek <jakub@redhat.com>
2236 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2237 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2239 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2242 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
2245 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2248 * frontend-passes (matmul_to_var_expr): Return early if
2249 in association list.
2250 (inline_matmul_assign): Likewise.
2252 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2255 * resolve.c (resolve_component): Ensure BIND(C) character
2256 components have length one.
2257 (resolve_symbol): Likewise for variables.
2259 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2262 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
2265 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
2266 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2267 Soren Rasmussen <s.c.rasmussen@gmail.com>
2269 Partial support for Fortran 2018 teams features.
2271 * array.c (gfc_match_array_ref): add team attribute in coarray
2273 * check.c (gfc_check_get_team, gfc_check_team_number): add new
2274 functions for get_team and team_number.
2275 * dump-parse-tree.c (show_code_node): add new statements: form team,
2276 change team, end team, and sync team.
2277 * expr.c (gfc_find_team_co): add new function.
2278 * gfortran.h: add new statements.
2279 * intrinsic.c (add_functions): add get_team and team_number functions.
2280 * intrinsic.h: add get_team and team_number prototypes for check,
2281 simplify, and resolve.
2282 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2284 * iso-fortran-env.def: add the team_type derived type.
2285 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2286 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2287 add change team, end team, form team, sync team match and functions.
2288 * match.h: add new prototypes for change team, end team, form team,
2290 * parse.c (decode_statement): add cases for change team, end team,
2291 form team, and sync team.
2292 * resolve.c: add cases for exec form team, change team, end team, and
2294 * simplify.c (gfc_simplify_get_team): add new function for get team.
2295 * st.c (gfc_free_statement): add cases exec for change team, end team,
2296 form team, sync team.
2297 * trans-decl.c (gfor_fndecl_caf_form_team)
2298 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2299 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2300 (gfor_fndecl_caf_team_number): add functions and definitions.
2301 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2302 new function and team_type argument support.
2303 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2304 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2305 * trans-stmt.h: add new prototypes.
2306 * trans-types.c (gfc_get_derived_type): check condition for team_type.
2307 * trans.c (trans_code): new exec cases for form team, change team, end
2308 team, and sync team.
2309 * trans.h: add new prototypes.
2311 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
2314 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
2315 or .false. The summation does the correct type conversion.
2316 (gfc_simplify_dot_product): Special case zero-sized arrays.
2318 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
2321 * array.c (gfc_match_array_ref): If standard earlier than F2008
2322 it is an error if the reference dimension is greater than 7.
2323 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2324 dtype masks and shifts accordingly.
2325 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2326 type node to check the field.
2327 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
2328 (duplicate_allocatable_coarray): Access the rank field of the
2329 dtype descriptor rather than the dtype itself.
2330 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
2331 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2333 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2334 get_scalar_to_descriptor_type if the actual expression is a
2336 (gfc_trans_structure_assign): Assign the rank directly to the
2338 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2339 to default integer kind.
2340 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
2341 'elem_len' field of the dtype.
2342 * trans-io.c (gfc_build_io_library_fndecls): Replace
2343 gfc_int4_type_node with dtype_type_node where necessary.
2344 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
2346 * trans-types.c : Provide 'get_dtype_type_node' to acces the
2347 dtype_type_node and, if necessary, build it.
2348 The maximum size of an array element is now determined by the
2349 maximum value of size_t.
2350 Update the description of the array descriptor, including the
2351 type def for the dtype_type.
2352 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
2353 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2354 (gfc_get_array_descriptor_base): Change the type of the dtype
2355 field to dtype_type_node.
2356 (gfc_get_array_descr_info): Get the offset to the rank field of
2358 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2359 * trans.h : Define the indices of the dtype fields.
2361 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2364 * decl.c (gfc_match_derived_decl): If eos not matched, recover
2365 and emit error about garbage after declaration.
2367 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2370 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2373 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
2377 * arith.c (gfc_arith_concat): Use size_t for string length.
2378 (gfc_compare_string): Likewise.
2379 (gfc_compare_with_Cstring): Likewise.
2380 * array.c (gfc_resolve_character_array_constructor): Use
2381 HOST_WIDE_INT, gfc_mpz_get_hwi.
2382 * check.c (gfc_check_fe_runtime_error): Use size_t.
2383 * data.c (create_character_initializer): Use HOST_WIDE_INT,
2385 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2386 (add_init_expr_to_sym): Use HOST_WIDE_INT.
2387 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2389 (gfc_apply_init): Likewise.
2390 * match.h (gfc_set_constant_character_len): Update prototype.
2391 * primary.c (match_string_constant): Use size_t.
2392 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2394 * simplify.c (init_result_expr): Likewise.
2395 (gfc_simplify_len_trim): Use size_t.
2396 * target-memory.c (gfc_encode_character): Use size_t.
2397 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2398 (interpret_array): Use size_t.
2399 (gfc_interpret_character): Likewise.
2400 * target-memory.h (gfc_encode_character): Update prototype.
2401 (gfc_interpret_character): Likewise.
2402 (gfc_target_interpret_expr): Likewise.
2403 * trans-const.c (gfc_build_string_const): Use size_t for length
2405 (gfc_build_wide_string_const): Likewise.
2406 * trans-const.h (gfc_build_string_const): Likewise.
2407 (gfc_build_wide_string_const): Likewise.
2409 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2412 * simplify.c (gfc_simplify_matmul): Set return type correctly.
2414 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2417 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2419 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2422 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2424 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2427 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2429 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
2432 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2433 from symbol marked unlimited polymorphic.
2434 * resolve.c (resolve_structure_cons): Likewise.
2435 * misc.c (gfc_typename): Don't dereference derived->components
2438 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2441 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2442 (gfc_logical_4_kind): New macro
2443 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2444 (gfc_simplify_maxloc): Likewise.
2445 (gfc_resolve_maxloc): Likewise.
2446 (gfc_resolve_minloc): Likewise.
2447 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
2448 argument; also raise error if it is used (for now). Add it
2449 if it isn't present.
2450 * intrinsic.c (add_sym_4ml): Rename to
2451 (add_sym_5ml), adjust for extra argument.
2452 (add_functions): Add "back" constant. Adjust maxloc and minloc
2454 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2455 not of gfc_logical_4_kind, convert.
2456 (gfc_resolve_minloc): Likewise.
2457 * simplify.c (gfc_simplify_minloc): Add back argument.
2458 (gfc_simplify_maxloc): Likewise.
2459 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2460 argument to %VAL to ensure passing by value.
2461 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2462 also for library calls.
2464 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2467 * resolve.c (resolve_transfer): Delete code looking for 'DT'
2468 format specifiers in format strings. Set formatted to true if a
2469 format string or format label is present.
2470 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2473 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2476 * dump-parse-tree.c (get_c_type_name): Remove extra line.
2477 Change for loop to use declaration in for loop. Handle BT_LOGICAL
2479 (write_decl): Add where argument. Fix indentation. Replace
2480 assert with error message. Add typename to warning
2482 (write_type): Adjust locus to call of write_decl.
2483 (write_variable): Likewise.
2484 (write_proc): Likewise. Replace assert with error message.
2486 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
2489 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2490 the rhs expression is neither an elemental nor a conversion
2494 * trans-array.c (is_pointer_array): Remove unconditional return
2495 of false for -fopenmp.
2497 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2501 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
2504 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2507 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
2509 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2512 * resolve.c (resolve_charlen): Check the type of cl->length
2515 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2518 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2520 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2523 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2524 LHS type when assigning.
2526 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2529 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2531 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2533 * match.c (gfc_match_allocate): Check for NULL pointer.
2535 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2537 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2539 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
2542 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2543 an initializer, convert the kind parameters and add to the
2544 component if the instance.
2545 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2546 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2547 for parameterized arrays. Clean up typos in comments. Convert
2548 parameterized array initializers and copy into the array.
2549 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2550 parameterized types.
2551 *trans-stmt.c (trans_associate_var): Deallocate associate vars
2552 as necessary, when they are PDT function results for example.
2555 * trans-array.c (structure_alloc_comps): Only compare len parms
2556 when they are declared explicitly.
2558 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
2561 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2564 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
2568 * array.c (got_charlen): Use gfc_charlen_int_kind.
2569 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2571 (find_intrinsic_vtab): Likewise.
2572 * decl.c (match_char_length): Use gfc_charlen_int_kind.
2573 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2574 (gfc_match_implicit): Use gfc_charlen_int_kind.
2575 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2576 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2577 * expr.c (gfc_get_character_expr): Length parameter of type
2579 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2580 (gfc_extract_hwi): New function.
2581 (simplify_const_ref): Make string_len of type gfc_charlen_t.
2582 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2583 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2584 * gfortran.h (gfc_mpz_get_hwi): New prototype.
2585 (gfc_mpz_set_hwi): Likewise.
2586 (gfc_charlen_t): New typedef.
2587 (gfc_expr): Use gfc_charlen_t for character lengths.
2588 (gfc_size_kind): New extern variable.
2589 (gfc_extract_hwi): New prototype.
2590 (gfc_get_character_expr): Use gfc_charlen_t for character length.
2591 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2592 * gfortran.texi: Update description of hidden string length argument.
2593 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2594 (gfc_resolve_char_achar): Likewise.
2595 (gfc_resolve_repeat): Pass string length directly without
2596 temporary, use gfc_charlen_int_kind.
2597 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2598 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2599 * misc.c (gfc_mpz_get_hwi): New function.
2600 (gfc_mpz_set_hwi): New function.
2601 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2602 (parse_integer): Don't complain about large integers.
2603 (write_atom): Use HOST_WIDE_INT for integers.
2604 (mio_integer): Handle integer type mismatch.
2605 (mio_hwi): New function.
2606 (mio_intrinsic_op): Use HOST_WIDE_INT.
2607 (mio_array_ref): Likewise.
2608 (mio_expr): Likewise.
2609 * primary.c (match_substring): Use gfc_charlen_int_kind.
2610 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2611 (resolve_character_operator): Likewise.
2612 (resolve_assoc_var): Likewise.
2613 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2614 (resolve_charlen): Use mpz_sgn to determine sign.
2615 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2617 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2618 * target-memory.c (size_character): Length argument of type
2620 (gfc_encode_character): Likewise.
2621 (gfc_interpret_character): Use gfc_charlen_t.
2622 * target-memory.h (gfc_encode_character): Modify prototype.
2623 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2624 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2625 (trans_array_constructor): Use existing type.
2626 (get_array_charlen): Likewise.
2627 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2628 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2629 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2630 (add_argument_checking): Likewise.
2631 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2632 gfc_charlen_type_node.
2633 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2634 4, fold_convert to correct type.
2635 (gfc_conv_class_to_class): Build const of type size_type_node for
2637 (gfc_copy_class_to_class): Likewise.
2638 (gfc_conv_string_length): Use same type in expression.
2639 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2640 (gfc_conv_string_tmp): Make sure len is of the right type.
2641 (gfc_conv_concat_op): Use same type in expression.
2642 (gfc_conv_procedure_call): Likewise.
2643 (fill_with_spaces): Comment out memset() block due to spurious
2644 -Wstringop-overflow warnings.
2645 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2646 (alloc_scalar_allocatable_for_subcomponent_assignment):
2647 fold_convert to right type.
2648 (gfc_trans_subcomponent_assign): Likewise.
2649 (trans_class_vptr_len_assignment): Build const of correct type.
2650 (gfc_trans_pointer_assignment): Likewise.
2651 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2653 (trans_class_assignment): Build const of correct type.
2654 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2655 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2656 * trans-io.c (gfc_build_io_library_fndecls): Use
2657 gfc_charlen_type_node for character lengths.
2658 (set_string): Convert to right type in assignment.
2659 * trans-stmt.c (gfc_trans_label_assign): Build const of
2660 gfc_charlen_type_node.
2661 (trans_associate_var): Likewise.
2662 (gfc_trans_character_select): Likewise.
2663 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2664 (gfc_trans_deallocate): Don't typecast strlen result.
2665 * trans-types.c (gfc_size_kind): New variable.
2666 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2667 from size_type_node.
2668 * trans-types.h: Fix comment.
2670 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2674 * check.c (gfc_check_eoshift): Check for string length and
2675 for conformance of boundary.
2676 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2677 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2678 * simplify.c (gfc_simplify_eoshift): New function.
2680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2681 Alan Hayward <alan.hayward@arm.com>
2682 David Sherwood <david.sherwood@arm.com>
2684 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2687 Alan Hayward <alan.hayward@arm.com>
2688 David Sherwood <david.sherwood@arm.com>
2690 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2692 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2695 * check.c (gfc_check_eoshift): Error for missing boundary if array
2696 is not one of the standard types.
2698 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2700 Update copyright years.
2702 * gfortranspec.c (lang_specific_driver): Update copyright notice
2704 * gfc-internals.texi: Bump @copying's copyright year.
2705 * gfortran.texi: Ditto.
2706 * intrinsic.texi: Ditto.
2707 * invoke.texi: Ditto.
2709 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2712 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2713 gfc_simplify_minloc to maxloc and minloc, respectively.
2714 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2715 and gfc_simplify_maxloc.
2716 * simplify.c (min_max_chose): Adjust prototype. Modify function
2717 to have a return value which indicates if the extremum was found.
2718 (is_constant_array_expr): Fix typo in comment.
2719 (simplify_minmaxloc_to_scalar): New function.
2720 (simplify_minmaxloc_nodim): New function.
2721 (new_array): New function.
2722 (simplify_minmaxloc_to_array): New function.
2723 (gfc_simplify_minmaxloc): New function.
2724 (simplify_minloc): New function.
2725 (simplify_maxloc): New function.
2727 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2731 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2734 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
2737 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2738 allocatable and pointer scalars, when -fcoarray selected.
2739 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2740 field as well as the backend_decl.
2741 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2742 derived types that are not vtypes. Components with caf_token
2743 attribute are pvoid types. For a component requiring it, find
2744 the caf_token field and have the component token field point to
2748 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2749 field to the descriptor even when codimen not set.
2751 Copyright (C) 2018 Free Software Foundation, Inc.
2753 Copying and distribution of this file, with or without modification,
2754 are permitted in any medium without royalty provided the copyright
2755 notice and this notice are preserved.
2758 * decl.c (var_element): Inquiry parameters cannit be data objects.
2760 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2763 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
2764 Check for a NULL pointer.
2766 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2769 * class.c (insert_component_ref): Check for NULL pointer and
2770 previous error message issued.
2771 * parse.c (parse_associate): Check for NULL pointer.
2772 * resolve.c (resolve_assoc_var): Check for NULL pointer.
2774 2018-12-07 Jakub Jelinek <jakub@redhat.com>
2777 * trans-openmp.c (gfc_omp_clause_default_ctor,
2778 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2779 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
2780 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
2783 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
2784 Mark Eggleston <mark.eggleston@codethink.co.uk>
2787 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
2788 (set_dec_flags): Set/unset DEC and std flags according to value.
2789 (post_dec_flags, set_init_local_zero): New functions.
2790 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
2791 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
2793 <case OPT_finit_local_zero>: Use set_init_local_zero.
2794 <case OPT_fdec>: Pass value to set_dec_flags.
2795 <case OPT_fdec_structure>: Remove.
2797 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
2799 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
2802 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
2805 2018-11-27 Martin Liska <mliska@suse.cz>
2807 * decl.c (gfc_match_gcc_builtin): New function.
2808 * gfortran.h (struct vect_builtin_tuple): New.
2809 (gfc_adjust_builtins): Likewise.
2810 * lang-specs.h (TARGET_F951_OPTIONS): New.
2811 (F951_OPTIONS): Use it.
2812 * lang.opt: Add new option -fpre-include.
2813 * match.h (gfc_match_gcc_builtin): Declare new function.
2814 * parse.c (decode_gcc_attribute): Handle builtin.
2815 (parse_progunit): Call gfc_adjust_builtins.
2816 * scanner.c (gfc_new_file): Load pre-included header file
2818 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
2819 (gfc_adjust_builtins): Likewise.
2821 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
2824 * resolve.c (resolve_variable): Check for associate names with
2827 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2829 * lang.opt (fpad-source): New option.
2830 * scanner.c (load_line): Don't pad fixed form lines if
2832 * invoke.texi (-fno-pad-source): Document.
2834 2018-11-21 Jakub Jelinek <jakub@redhat.com>
2836 * invoke.texi (-fdec-include): Document.
2838 2018-11-21 Jakub Jelinek <jakub@redhat.com>
2839 Mark Eggleston <mark.eggleston@codethink.com>
2841 * lang.opt (fdec-include): New option.
2842 * options.c (set_dec_flags): Set also flag_dec_include.
2843 * scanner.c (include_line): Change return type from bool to int.
2844 In fixed form allow spaces in between include keyword letters.
2845 For -fdec-include, allow in fixed form 0 in column 6. With
2846 -fdec-include return -1 if the parsed line is not full include
2847 statement and it could be successfully completed on continuation
2849 (include_stmt): New function.
2850 (load_file): Adjust include_line caller. If it returns -1, keep
2851 trying include_stmt until it stops returning -1 whenever adding
2852 further line of input.
2854 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2857 * frontend-passes.c (combine_array_constructor): Do not do
2858 anything if in a WHERE statement.
2860 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2863 * expr.c (gfc_check_assign): Reject assigning to an external
2865 (gfc_check_pointer_assign): Add suppress_type_test
2866 argument. Insert line after if. A non-proc pointer can not point
2867 to a constant. Only check types if suppress_type_test is false.
2868 * gfortran.h (gfc_check_pointer_assign): Add optional
2869 suppress_type_test argument.
2870 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
2871 and give it the extra argument.
2872 (resolve_fl_procedure): Set error on value for a function with
2875 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2878 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
2880 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2882 * cpp.c: Replace "source_location" with "location_t".
2883 * gfortran.h: Likewise.
2885 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2887 * trans-openmp.c (gfc_trans_omp_clauses): Use
2888 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
2889 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
2890 rather than OMP_ATOMIC_SEQ_CST.
2891 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
2892 make_node instead of build1_loc.
2893 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2894 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2895 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2896 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2897 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2898 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2899 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
2901 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2904 * decl.c (verify_bind_c_sym): Remove unnecessary space
2907 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2910 * frontend-passes.c (constant_string_length): If there is a
2911 substring with a length which cannot be reduced to a constant,
2914 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
2917 * dependency.c (are_identical_variables): Return false if the
2918 inquiry refs are not the same.
2919 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
2920 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
2921 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
2922 (gfc_copy_ref): Copy the inquiry ref types.
2923 (find_inquiry_ref): New function.
2924 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
2925 to simplify_ref_chain.
2926 (gfc_simplify_expr): Use the new arg in call to
2928 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
2930 (gfc_traverse_expr): Return true for inquiry ref.
2931 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
2932 * gfortran.h : Add enums and union member in gfc_ref to
2933 implement inquiry refs.
2934 * intrinsic.c : Fix white nois.
2935 * match.c (gfc_match_assignment): A constant lavlue is an
2937 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
2939 (mio_ref): Handle inquiry refs.
2940 * primary.c (is_inquiry_ref): New function.
2941 (gfc_match_varspec): Handle inquiry refs calling new function.
2942 (gfc_variable_attr): Detect inquiry ref for disambiguation
2944 (caf_variable_attr): Treat inquiry and substring refs in the
2946 * resolve.c (find_array_spec): ditto.
2947 (gfc_resolve_substring_charlen): If there is neither a charlen
2948 ref not an inquiry ref, return.
2949 (resolve_ref): Handle inqiry refs as appropriate.
2950 (resolve_allocate_expr): Entities with an inquiry ref cannot be
2952 * simplify.c (simplify_bound, simplify_cobound): Punt on
2954 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
2956 *trans-expr.c (conv_inquiry): New function.
2957 (gfc_conv_variable): Retain the last typespec to pass to
2958 conv_inquiry on detecting an inquiry ref.
2960 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2963 * decl.c (verify_bind_c_sym): Improve error message.
2965 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2968 * gfortran.texi (File format of unformatted sequential files):
2969 Replace random comma with period.
2970 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
2971 (FINDLOC): Document.
2972 (MAXLOC): Add refrence to FINDLOC.
2975 2018-10-31 Nathan Sidwell <nathan@acm.org>
2977 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
2979 2018-10-31 Martin Liska <mliska@suse.cz>
2981 * trans-decl.c (struct module_hasher): Call htab_hash_string
2982 for s->name and not for s.
2984 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2987 * simplify.c (simplify_min_max): Do not convert the type of the
2990 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2993 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
2994 (gfc_check_f): Add f6fl field.
2995 (gfc_simplify_f): Add f6 field.
2996 (gfc_resolve_f): Likewise.
2997 (gfc_type_letter): Add optional logical_equas_int flag.
2998 * check.c (intrinsic_type_check): New function.
2999 (gfc_check_findloc): New function.
3000 * intrinsics.c (gfc_type_letter): If logical_equals_int is
3001 set, act accordingly.
3002 (add_sym_5ml): Reformat comment.
3003 (add_sym_6fl): New function.
3004 (add_functions): Add findloc.
3005 (check_arglist): Add sixth argument, handle it.
3006 (resolve_intrinsic): Likewise.
3007 (check_specific): Handle findloc.
3008 * intrinsic.h (gfc_check_findloc): Add prototype.
3009 (gfc_simplify_findloc): Likewise.
3010 (gfc_resolve_findloc): Likewise.
3011 (MAX_INTRINSIC_ARGS): Adjust.
3012 * iresolve.c (gfc_resolve_findloc): New function.
3013 * simplify.c (gfc_simplify_minmaxloc): Make static.
3014 (simplify_findloc_to_scalar): New function.
3015 (simplify_findloc_nodim): New function.
3016 (simplify_findloc_to_array): New function.
3017 (gfc_simplify_findloc): New function.
3018 (gfc_conv_intrinsic_findloc): New function.
3019 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
3020 (gfc_is_intrinsic_libcall): Likewise.
3022 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3025 * frontend-passes.c (check_locus_code): Add information that
3026 warning about missing location information points to an
3027 inconsisten internal state.
3028 (check_locus_expr): Likewise.
3030 2018-10-25 Jakub Jelinek <jakub@redhat.com>
3033 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
3034 nonmonotonic modifiers regardless of if they have been parsed
3035 already or if the opposite one has. Fix up check whether
3036 comma after modifier should be parsed.
3037 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
3039 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
3042 * frontend-passes.c (get_len_call): New function to generate a
3043 call to intrinsic LEN.
3044 (create_var): Use this to make length expressions for variable
3046 Clean up some white space issues.
3048 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
3051 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
3052 length for array valued deferred length lhs.
3054 2018-10-18 Tobias Burnus <burnus@net-b.de>
3057 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
3060 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3063 * trans-stmt.c (trans_associate_var): All strings that return
3064 as pointer types can be assigned directly to the associate
3065 name so remove 'attr' and the condition that uses it.
3067 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3070 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
3071 initialization with NULL() of a deferred length pointer.
3073 2018-10-17 Tobias Burnus <burnus@net-b.de>
3076 * resolve.c (resolve_select_type): Use correct variable.
3078 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3080 * Make-lang.in (selftest-fortran): New.
3082 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
3089 * resolve.c (resolve_variable): Fix up expressions with array
3090 associate names, where the parser did not detect that this is
3091 array and there was no array part_ref in the expression.
3093 2018-10-16 Tobias Burnus <burnus@net-b.de>
3096 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
3097 Rename argument e3_is_array_constr to e3_has_nodescriptor
3098 and update comments.
3099 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
3100 to 1 for nonalloc/nonpointer func results/vars besides
3103 2018-10-16 Tobias Burnus <burnus@net-b.de>
3106 * trans-stmt.c (form_team, change_team, sync_team):
3107 Don't ignore argse.pre/argse.post.
3109 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
3110 Tobias Burnus <burnus@gcc.gnu.org>
3113 * resolve.c (resolve_assoc_var): Add missing array spec for
3114 class associate names.
3115 (resolve_select_type): Handle case where last typed component
3116 of the selector has a different type to the expression.
3117 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
3118 call to gfc_expr_to_initialize with call to gfc_copy_expr.
3119 (gfc_conv_class_to_class): Guard assignment to 'len' field
3120 against case where zero constant is supplied.
3122 2018-10-12 Tobias Burnus <burnus@net-b.de>
3125 * expr.c (gfc_simplify_expr): Avoid simplifying
3126 the 'array' argument to lbound/ubound/lcobound/
3129 2018-10-12 Tobias Burnus <burnus@net-b.de>
3132 * decl.c (get_proc_name): Return with error before
3135 2018-10-11 Tobias Burnus <burnus@net-b.de>
3138 2018-10-09 Tobias Burnus <burnus@net-b.de>
3141 * resolve.c (resolve_ref): Reject nonscalar
3142 substring references.
3144 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3146 * cpp.c (gfc_cpp_init_0): Update for renamings.
3147 (cb_cpp_error): Rename to...
3148 (cb_cpp_diagnostic): ...this, converting level and reason to
3151 2018-10-09 Tobias Burnus <burnus@net-b.de>
3154 * resolve.c (resolve_ref): Reject nonscalar
3155 substring references.
3157 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
3160 * trans-array.c (gfc_get_array_span): Deal with deferred char
3161 array components having a TYPE_MAX_VALUE of zero.
3162 (gfc_array_init_size): Use the hidden string length component
3163 to build the descriptor dtype.
3164 (gfc_array_allocate): Remove the erroneous replacement of the
3165 charlen backend decl with a temporary.
3166 (gfc_conv_expr_descriptor): Use the ss_info string length in
3167 the case of deferred character components.
3168 (gfc_alloc_allocatable_for_assignment): Actually compare the
3169 string lengths for deferred characters. Make sure that kind > 1
3170 is handled correctly. Set the span field of the descriptor.
3171 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
3175 * trans-array.c (gfc_array_allocate): Set the span field for
3176 variable length character arrays.
3178 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
3180 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
3181 contiguous pointer from non-contiguous target" to a warning.
3183 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
3186 * trans-stmt.c (trans_associate_var): Character associate names
3187 with variable string length do not have to be deferred length
3188 for the string length to be set, if variable.
3190 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3193 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
3194 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
3195 (gfc_arith_concat): If the types of op1 and op2 are not
3196 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
3198 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
3201 * resolve.c (resolve_fl_procedure): Include class functions in
3202 the test that elemental function results be scalar.
3204 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3207 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
3208 by one. Set extents one past the array boundaries to zero to avoid
3209 warning with instrumented compiler.
3210 (gfc_simplify_eoshift): Likewise, only for ss_ex.
3212 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
3215 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
3216 character length pointer initializer has the right type to fix
3217 problem with deferred_character_24.f90 on big endian.
3219 2018-10-03 Jeff Law <law@redhat.comg>
3221 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
3223 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
3226 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
3227 flag in the call to gfc_check_dependency.
3229 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3232 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
3233 introduced by r264358, which prevented components of associate
3234 names from being reallocated on assignment.
3236 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3240 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
3241 deferred type and the info->descriptor is present, use the
3243 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
3244 it as 'decl' rather than the symbol backend_decl.
3245 (gfc_array_allocate): If the se string_length is a component
3246 reference, fix it and use it for the expression string length
3247 if the latter is not a variable type. If it is a variable do
3248 an assignment. Make use of component ref string lengths to set
3249 the descriptor 'span'.
3250 (gfc_conv_expr_descriptor): For pointer assignment, do not set
3251 the span field if gfc_get_array_span returns zero.
3252 * trans.c (get_array_span): If the upper bound a character type
3253 is zero, use the descriptor span if available.
3255 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3258 * trans-decl.c (gfc_get_symbol_decl): A deferred character
3259 length pointer that is initialized needs the string length to
3260 be initialized as well.
3262 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
3265 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
3266 fix the rse stringlength.
3268 2018-09-25 Martin Liska <mliska@suse.cz>
3271 * decl.c (add_hidden_procptr_result): Simplify condition
3272 as we are in branch witch 'case1 || case2'.
3274 2018-09-25 Martin Liska <mliska@suse.cz>
3276 * trans.c (remove_suffix): Remove
3279 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3282 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3283 for variables in an associate statement.
3285 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
3286 Cesar Philippidis <cesar@codesourcery.com>
3288 * openmp.c (resolve_oacc_loop_blocks):
3290 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3293 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3294 for variables having the dimension attribute.
3296 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
3298 * trans-expr.c (gfc_caf_get_image_index): Do array index
3299 calculations in gfc_array_index_type.
3300 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
3301 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
3302 (gfc_trans_event_post_wait): Likewise.
3304 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3307 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
3308 clobber on INTENT(OUT) for saved variables.
3310 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3313 * trans.h (gfc_conv_expr_reference): Add optional argument
3314 add_clobber to prototype.
3315 (gfc_conv_procedure_call): Set add_clobber argument to
3316 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
3317 non-pointer, non-allocatable, non-dummy variables whose type
3318 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
3319 the procedure is not elemental.
3320 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
3321 statement before call if add_clobber is set.
3323 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
3326 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
3327 the charlen backend_decl before using the VAR_P macro.
3329 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3332 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
3333 rhs has a charlen expression, convert that and use it.
3334 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3335 assignment of deferred character array vars to a realocatable
3336 lhs should not be added to the exterior block since vector
3337 indices, for example, generate temporaries indexed within the
3340 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3343 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
3344 components if must_finalize is set for expr3.
3346 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3347 Kwok Cheung Yeung <kcy@codesourcery.com>
3349 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
3350 argument of a call to _gfortran_caf_register is of size_type_node.
3351 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
3352 index to a size_type_node type.
3353 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
3355 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3357 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
3359 2018-09-20 Janus Weil <janus@gcc.gnu.org>
3361 * gfortran.h (gfc_str_startswith): New macro.
3362 * decl.c (variable_decl, gfc_match_end): Use it.
3363 * iresolve.c (is_trig_resolved): Ditto.
3364 * module.c (load_omp_udrs, read_module): Ditto.
3365 * options.c (gfc_handle_runtime_check_option): Ditto.
3366 * primary.c (match_arg_list_function): Ditto.
3367 * trans-decl.c (gfc_get_symbol_decl): Ditto.
3368 * trans-expr.c (gfc_conv_procedure_call): Ditto.
3369 * interface.c (dtio_op): Replace strncmp by strcmp.
3370 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
3371 * trans-expr.c (conv_arglist_function): Ditto.
3372 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
3373 STARTS_WITH by gfc_str_startswith.
3375 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
3377 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
3378 and reorder the switch cases to match the enum in gfortran.h.
3380 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
3383 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3384 assignment of deferred character intrinsic elemental function
3385 results to a realocatable lhs must not be added to the exterior
3386 block if they are array valued but must go to the loop body.
3388 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3391 * gfortran.h (gfc_expr): Add external_blas flag.
3392 * frontend-passes.c (matrix_case): Add case A2TB2T.
3393 (optimize_namespace): Handle flag_external_blas by
3394 calling call_external_blas.
3395 (get_array_inq_function): Add argument okind. If
3396 it is nonzero, use it as the kind of argument
3398 (inline_limit_check): Remove m_case argument, add
3399 limit argument instead. Remove assert about m_case.
3400 Set the limit for inlining from the limit argument.
3401 (matmul_lhs_realloc): Handle case A2TB2T.
3402 (inline_matmul_assign): Handle inline limit for other cases with
3403 two rank-two matrices. Remove no-op calls to inline_limit_check.
3404 (call_external_blas): New function.
3405 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
3406 argument to external BLAS if external_blas is already set.
3408 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3411 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3412 assignment of deferred character elemental function results to
3413 a realocatable lhs must not be added to the exterior block but
3414 must go to the loop body.
3416 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3419 * trans-array.c (gfc_get_array_span): Try to get the element
3420 length of incomplete types. Return NULL_TREE otherwise.
3421 (gfc_conv_expr_descriptor): Only set the 'span' field if the
3422 above does not return NULL_TREE. Set 'span' field if possible
3423 for all new descriptors.
3425 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3428 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
3429 characters with a variable length expression for deferred init.
3430 (gfc_trans_deferred_vars): Perform the assignment for these
3431 symbols by calling gfc_conv_string_length.
3433 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3436 * resolve.c (resolve_assoc_var): If the target expression is a
3437 deferred charlen dummy and the associate name shares the
3438 charlen, generate a new one. Make sure that new charlens are in
3439 the namespace list so that they get cleaned up.
3440 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
3442 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
3443 length dummy and result arrays on the deferred initialization
3444 list so that the variable length arrays can be correctly dealt
3446 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
3447 NULL rather than ICEing..
3449 2018-09-16 Janus Weil <janus@gcc.gnu.org>
3453 * match.c (gfc_match_assignment): For a polymorphic assignment,
3454 make sure that the vtab for the rhs type is generated.
3456 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
3459 * frontend-passes.c (B_ERROR): New macro for matmul bounds
3460 checking error messages.
3461 (C_ERROR): Likewise.
3462 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
3465 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3467 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
3468 from overlength string initializers.
3470 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
3473 * trans-expr.c (gfc_trans_class_init_assign): Access to
3474 to array elements of the dynamic type requires that the array
3475 reference be added to the class expression and not the _data
3476 component, unlike scalar expressions.
3478 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3481 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
3482 attribute, then it was declared in another module, so there should be
3483 no error that it has not been declared.
3485 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
3488 * expr.c (is_subref_array): Add the check of dimensionality for
3489 class, dummy, pointer arrays.
3491 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3494 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
3495 with non-polymorphic objects.
3497 2018-09-10 Janus Weil <janus@gcc.gnu.org>
3500 * decl.c (match_binding_attributes): Use correct default accessibility
3501 for procedure pointer components.
3503 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3505 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
3506 'P' is zero and issue an error if it is.
3508 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
3512 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
3513 info->descriptor but pass it directly to gfc_build_array_ref.
3514 (gfc_conv_array_ref): Likewise for se->expr.
3515 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
3516 obtain the span field directly from it.
3518 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
3521 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
3522 scalar results being passed to a derived type formal argument
3523 are finalized if possible. Otherwise, rely on existing code for
3524 deallocation. Make the deallocation of allocatable result
3525 components conditional on finalization not taking place. Make
3526 the freeing of data components after finalization conditional
3527 on the data being NULL.
3528 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
3529 condition to return NULL_TREE.
3530 (gfc_trans_assignment_1): If the assignment is class to class
3531 and the rhs expression must be finalized but the assignment
3532 is not marked as a polymorphic assignment, use the vptr copy
3533 function instead of gfc_trans_scalar_assign.
3536 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
3537 block to the pre block if the expression is to be finalized.
3538 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
3539 finalized, load the post block into a finalization block and
3540 add it right at the end of the allocation block.
3542 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3545 * error.c (gfc_format_decoder): Update for conversion of
3546 show_caret_p to a tri-state.
3548 2018-08-25 Janus Weil <janus@gcc.gnu.org>
3551 * resolve.c (resolve_transfer): Correctly determine typespec for
3552 generic function calls, in order to throw a proper error.
3554 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3557 * frontend-passes.c (var_in_expr_callback): New function.
3558 (var_in_expr): New function.
3559 (traverse_io_block): Use var_in_expr instead of
3560 gfc_check_dependency for checking if the variable depends on the
3561 previous interators.
3563 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
3565 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
3566 HONOR_SIGNED_ZEROS checks.
3568 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
3571 * resolve.c (resolve_typebound_call): If the TBP is not marked
3572 as a subroutine, check the specific symbol.
3574 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3576 * gfortran.texi: Mention that asynchronous I/O does
3577 not work on systems which lack condition variables, such
3580 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3583 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
3586 2018-08-22 Andrew Benson <abensonca@gmail.com>
3588 * module.c (load_generic_interfaces): Move call to find_symbol()
3589 so that only occurs if actually needed.
3591 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3594 * decl.c (gfc_match_data_decl): Allow allocatable components of
3595 indirectly recursive type.
3596 * resolve.c (resolve_component): Remove two errors messages ...
3597 (resolve_fl_derived): ... and replace them by a new one.
3599 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
3601 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
3602 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
3603 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
3606 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
3607 Thomas Koenig <tkoenig@gcc.gnu.org>
3610 * gfortran.texi: Add description of asynchronous I/O.
3611 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3613 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3614 st_wait_async and change argument spec from ".X" to ".w".
3615 (gfc_trans_wait): Pass ID argument via reference.
3617 2018-08-16 Nathan Sidwell <nathan@acm.org>
3619 * cpp.c (dump_macro): Use cpp_user_macro_p.
3621 2018-08-14 Janus Weil <janus@gcc.gnu.org>
3624 * interface.c (compare_type): Remove a CLASS/TYPE check.
3625 (compare_type_characteristics): New function that behaves like the old
3627 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
3628 Call 'compare_type_characteristics' instead of 'compare_type'.
3630 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3633 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
3634 elements are returned as references to the data element. Get
3635 the class expression by stripping back the references. Use this
3636 for the element size.
3638 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3641 * resolve.c (resolve_fl_variable_derived): Check if the derived
3642 type is use associated before checking for the host association
3645 2018-08-10 Janus Weil <janus@gcc.gnu.org>
3648 * invoke.texi (frontend-optimize): Mention short-circuiting.
3649 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
3650 * resolve.c (resolve_operator): Warn about short-circuiting only with
3651 -ffrontend-optimize.
3652 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
3653 with -ffrontend-optimize. Without that flag, make sure that both
3654 operands are evaluated.
3656 2018-08-08 Nathan Sidwell <nathan@acm.org>
3658 * cpp.c (cb_file_change): Use linemap_included_from.
3660 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
3662 * trans-stmt.h: Remove stale reference to trans-openacc.c.
3664 2018-08-04 Janus Weil <janus@gcc.gnu.org>
3667 * interface.c (gfc_compare_interfaces): Apply additional
3668 distinguishability criteria of F08 to operator interfaces.
3670 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
3672 Revert 'AsyncI/O patch committed'
3673 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3674 Thomas Koenig <tkoenig@gcc.gnu.org>
3677 * gfortran.texi: Add description of asynchronous I/O.
3678 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3680 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3681 st_wait_async and change argument spec from ".X" to ".w".
3682 (gfc_trans_wait): Pass ID argument via reference.
3684 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3685 Thomas Koenig <tkoenig@gcc.gnu.org>
3688 * gfortran.texi: Add description of asynchronous I/O.
3689 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3691 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3692 st_wait_async and change argument spec from ".X" to ".w".
3693 (gfc_trans_wait): Pass ID argument via reference.
3695 2018-07-20 Martin Sebor <msebor@redhat.com>
3698 * gfortran.h (gfc_handle_option): Change function argument
3700 * options.c (gfc_handle_option): Same.
3702 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
3704 * gfortran.h (gfc_symbol): Add pointer to next derived type.
3705 (gfc_dt_list, gfc_get_dt_list): Remove.
3706 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
3707 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
3708 simple nullification of gfc_derived_types.
3709 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
3711 (add_dt_to_dt_list): Change derived type linked list insertion to
3712 utilize dt_next pointers in gfc_symbol.
3713 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
3714 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
3715 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
3716 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
3717 * trans-types.c (gfc_get_derived_type): Change derived type linked
3718 list search to utilize dt_next pointers in gfc_symbol.
3720 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3722 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
3723 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
3725 2018-07-18 Janus Weil <janus@gcc.gnu.org>
3726 Thomas Koenig <tkoenig@gcc.gnu.org>
3729 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
3730 * frontend-passes.c (do_warn_function_elimination): Do not warn for
3732 * gfortran.h: Add prototypes for gfc_pure_function and
3733 gfc_implicit_pure_function.
3734 * gfortran.texi: Add chapter on evaluation of logical expressions.
3735 * invoke.texi: Mention that -Wfunction-elimination is implied
3737 * lang.opt: Make -Wextra imply -Wfunction-elimination.
3738 * resolve.c (pure_function): Rename to gfc_pure_function.
3739 (gfc_implicit_pure_function): New function.
3740 (check_pure_function): Use it here.
3741 (impure_function_callback): New function.
3742 (resolve_operator): Call it via gfc_expr_walker.
3744 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3747 * decl.c (match_old_style_init): Initialize locus of variable expr when
3748 creating a data variable.
3749 (match_clist_expr): Verify array is explicit shape/size before
3750 attempting to allocate constant array constructor.
3752 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3755 * module.c (mio_component): Set component->loc when loading from module.
3757 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3760 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
3762 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
3763 on linear clauses. Initialize n->where to gfc_current_locus.
3765 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
3768 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
3769 in F2008 and not F2003.
3770 (resolve_function): Ditto in error message. Also, exclude
3771 deferred character length results from the error.
3773 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
3777 * expr.c (class_allocatable, class_pointer, comp_allocatable,
3778 comp_pointer): New helpers.
3779 (component_initializer): Generate EXPR_NULL for allocatable or pointer
3780 components. Do not generate initializers for components within BT_CLASS.
3781 Do not assign to comp->initializer.
3782 (gfc_generate_initializer): Use new helpers; move code to generate
3783 EXPR_NULL for class allocatable components into component_initializer().
3785 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3788 * trans-decl.c (gfc_process_block_locals): Delete assert and set
3789 saved_local_decls = NULL_TREE.
3791 2018-07-02 Richard Biener <rguenther@suse.de>
3794 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
3795 for the distinct type copy.
3797 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3801 * trans-array.c (structure_alloc_comps): Do not explicitly copy
3802 procedure pointer components.
3804 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3807 * expr.c : Add a prototype for scalarize_intrinsic_call.
3808 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
3809 intrinsic function calls.
3810 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
3811 the expression or any of the actual argument expressions are
3812 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
3813 Only simplify the scalarized expressions if there are no errors
3815 (gfc_check_init_expr): Set 'init_flag' true in the call to
3816 scalarize_intrinsic_call.
3818 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
3821 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
3823 2018-06-28 Martin Liska <mliska@suse.cz>
3825 * gfortranspec.c: Include opt-suggestions.h.
3827 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
3832 * expr.c (component_initializer): Assign init expr to c->initializer.
3833 (generate_isocbinding_initializer): New.
3834 (gfc_generate_initializer): Call generate_isocbinding_initializer to
3835 generate initializers for c_ptr and c_funptr with -finit-derived.
3837 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3840 * interface.c (check_dtio_interface1): Delete assert.
3842 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
3843 Rainer Orth <ro@gcc.gnu.org>
3846 * resolve.c (resolve_contained_fntype): Check for the charlen
3847 before testing the length.
3849 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
3852 * resolve.c (resolve_contained_fntype): Change standard ref.
3853 from F95 to F2003: C418. Correct a spelling error in a comment.
3854 It is an error for an abstract interface to have an assumed
3855 character length result.
3856 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
3859 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
3862 * resolve.c (resolve_ordinary_assign): Force the creation of a
3863 vtable for assignment of non-polymorphic expressions to an
3864 unlimited polymorphic object.
3865 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
3866 size of the rhs type for such assignments. Set the dtype, _len
3867 and vptrs appropriately.
3868 * trans-expr.c (gfc_trans_assignment): Force the use of the
3869 _copy function for these assignments.
3871 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3872 Thomas Schwinge <thomas@codesourcery.com>
3873 Cesar Philippidis <cesar@codesourcery.com>
3875 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
3877 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
3878 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3879 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
3880 create, deviceptr, present_of_*. Add support for finalize and
3882 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
3883 (OACC_KERNELS_CLAUSES): Likewise.
3884 (OACC_DATA_CLAUSES): Likewise.
3885 (OACC_DECLARE_CLAUSES): Likewise.
3886 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
3887 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
3888 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
3889 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
3890 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
3893 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3895 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
3897 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3899 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
3900 (nonlocal_dummy_decls): Likewise.
3901 (gfc_nonlocal_dummy_array_decl): Likewise.
3902 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
3903 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
3904 reusing the result of a recursive call.
3905 (gfc_generate_function_code): Do not create, insert and destroy
3906 nonlocal_dummy_decls.
3908 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
3911 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
3912 pointer dereference.
3914 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
3917 * parse.c (decode_oacc_directive): Set gfc_matching_function
3919 (decode_omp_directive): Likewise.
3921 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
3924 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
3926 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3929 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
3930 levenshtein_distance to get_edit_distance.
3932 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
3935 * expr.c (gfc_check_assign): Select non-NULL locus.
3937 2018-06-11 Janus Weil <janus@gcc.gnu.org>
3940 * interface.c (compare_ptr_alloc): New function.
3941 (generic_correspondence): Call it.
3943 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
3945 * gfortran.h (gfc_expr): Add no_bounds_check field.
3946 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
3947 on function and function argument.
3948 (inline_matmul_assign): Set no_bounds_check on zero expression
3949 and on lhs of zero expression.
3950 Also handle A1B2 case if realloc on assigment is active.
3951 * trans-array.c (gfc_conv_array_ref): Don't do range checking
3952 if expr has no_bounds_check set.
3953 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
3955 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
3956 on lss and lss if the corresponding expressions have it set.
3958 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
3961 * trans-const.c: Remove include "diagnostic-core.h".
3962 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
3964 2018-06-10 Janus Weil <janus@gcc.gnu.org>
3967 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
3968 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
3969 and remove a TODO note.
3970 * gfortran.h: Add a comment to sym_intent.
3972 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3975 * resolve.c (resolve_operator): Provide better error message for
3976 derived type entity used in an binary intrinsic numeric operator.
3978 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3983 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
3984 reduce a charlen to a constant.
3986 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3989 * data.c (gfc_assign_data_value): Re-arrange code to allow for
3990 an error for double initialization of CHARACTER entities.
3992 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3995 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
3997 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4000 * trans.h (gfc_ss): Add field no_bounds_check.
4001 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
4002 ss->no_bounds_check is set, do not use runtime checks.
4003 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
4004 for reallocatable lhs.
4006 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4009 * array.c (match_array_cons_element): NULL() cannot be in an
4012 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4015 * data.c (create_character_initializer): Return early if type is
4016 incompatible with CHARACTER.
4018 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
4021 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
4022 'P' is zero and issue an error if it is.
4024 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4027 * frontend-passes.c (is_fe_temp): Add prototype.
4028 (realloc_string_callback): Early return for frontend-generated
4031 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
4035 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
4036 subroutine data clause arguments.
4038 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
4041 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
4044 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
4047 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
4049 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
4052 * check.c (gfc_check_random_init): New function. Check arguments of
4054 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
4055 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
4057 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
4058 * intrinsic.h: Add prototypes for gfc_check_random_init and
4059 gfc_resolve_random_init
4060 * intrinsic.texi: Document new intrinsic subprogram.
4061 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
4062 * trans-decl.c: Declare gfor_fndecl_random_init
4063 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
4064 Translate call to RANDOM_INIT.
4065 (gfc_conv_intrinsic_subroutine): Call it.
4066 * trans.h: Declare gfor_fndecl_random_init
4068 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
4070 * decl.c (match_data_constant): Fortran 2018 allows pointer
4071 initialization in a data statement.
4073 2018-05-25 Janus Weil <janus@gcc.gnu.org>
4076 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
4077 an obsolescent feature in Fortran 2018.
4078 (gfc_match_equivalence): Ditto.
4079 * resolve.c (resolve_common_blocks): Ditto.
4080 (gfc_resolve_forall): Ditto.
4081 * symbol.c (gfc_define_st_label): Ditto.
4083 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4086 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
4087 pointer dereference.
4089 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4092 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
4094 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4097 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
4099 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4102 * resolve.c (resolve_sync): Resolve expression before checking for
4105 2018-05-22 Janus Weil <janus@gcc.gnu.org>
4108 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
4110 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
4111 * options.c (set_default_std_flags): Ditto.
4112 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
4113 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
4115 * check.c (gfc_check_atomic, gfc_check_event_query,
4116 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
4117 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
4118 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
4119 * intrinsic.c (add_functions, add_subroutines,
4120 gfc_check_intrinsic_standard): Ditto.
4121 * iso-c-binding.def: Ditto.
4122 * iso-fortran-env.def: Ditto.
4123 * match.c (gfc_match_event_post, gfc_match_event_wait,
4124 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
4125 gfc_match_end_team, gfc_match_sync_team): Ditto.
4126 * gfortran.texi: Remove mention of -std=f2008ts.
4127 Move TSs into F2018 section.
4128 * invoke.texi: Update documentation of -std=f2008ts.
4130 2018-05-21 Janus Weil <janus@gcc.gnu.org>
4133 * libgfortran.h: New macros GFC_STD_OPT_*.
4134 * error.c (notify_std_msg): New function.
4135 (gfc_notify_std): Adjust such that it can handle combinations of
4136 GFC_STD_* flags in the 'std' argument, not just a single one.
4137 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
4139 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
4140 * options.c (set_default_std_flags): Warn for F2018 deleted features
4142 (gfc_handle_option): F2018 deleted features are allowed in earlier
4144 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
4145 nonblock do constructs in Fortran 2018.
4147 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4150 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
4151 test for self refs to the function result in the character len
4152 expression. If a self reference is found, emit an error and
4154 (resolve_fntype): Use the function symbol in the calls to the
4157 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4160 * trans-array.c (gfc_get_array_span): Renamed from
4162 (gfc_conv_expr_descriptor): Change references to above.
4163 * trans-array.h : Add prototype for 'gfc_get_array_span'.
4164 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
4166 * trans-stmt.c (trans_associate_var): If the associate name is
4167 a subref array pointer, use gfc_get_array_span for the span.
4169 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4172 * match.c (gfc_match_type_spec): Go through the array ref and
4173 decrement 'rank' for every dimension that is an element.
4175 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
4180 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
4181 charlen backend_decl of the rhs expr to ss->info->string_length
4182 so that the value in the current scope is used.
4184 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4187 * gfortran.texi: Clarify documentation for Cray pointer and
4188 assumed-sized array.
4190 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
4193 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
4194 of 'size'. If the element type is a pointer use the size of the
4195 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
4196 case, set the size to zero.
4198 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4200 * gfortran.h: Remove prototype.
4201 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
4203 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
4206 * expr.c (check_inquiry): Avoid NULL pointer dereference.
4208 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4211 * check.c (gfc_check_rank): Check that the argument is a data object.
4213 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4216 * array.c (gfc_resolve_character_array_constructor): Substrings
4217 with upper bound smaller than lower bound are zero length strings.
4219 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4222 * data.c (gfc_assign_data_value): Check that a data object does
4223 not also have default initialization.
4225 2018-05-10 Marek Polacek <polacek@redhat.com>
4228 * options.c (gfc_post_options): Set main_input_filename.
4230 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4233 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
4235 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
4239 * resolve.c (get_temp_from_expr): The temporary must not have
4240 dummy or intent attributes.
4242 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4245 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
4246 implemented. Use gfc_logical_4_kind for BACK.
4247 * simplify.c (min_max_choose): Add optional argument back_val.
4249 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
4250 back_val to min_max_choose.
4251 (simplify_minmaxloc_to_nodim): Likewise.
4252 (simplify_minmaxloc_to_array): Likewise.
4253 (gfc_simplify_minmaxloc): Add argument back, handle it.
4254 Pass back_val to specific simplification functions.
4255 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
4256 pass it on to gfc_simplify_minmaxloc.
4257 (gfc_simplify_maxloc): Likewise.
4258 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
4259 comment. If BACK is true, use greater or equal (or lesser or
4260 equal) insteal of greater (or lesser). Mark the condition of
4261 having found a value which exceeds the limit as unlikely.
4263 2018-05-07 Jeff Law <law@redhat.comg>
4265 * scanner.c (preprocessor_line): Call linemap_add after a line
4266 directive that changes the current filename.
4268 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
4271 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
4272 introduced by r259385.
4273 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
4274 same variables in coarray assignments.
4276 2018-05-02 Tom de Vries <tom@codesourcery.com>
4279 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
4281 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
4284 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
4286 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
4290 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
4291 during dependency computation. They define no data dependency.
4292 * trans-array.c (conv_array_index_offset): The stride can not be set
4294 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
4295 for caf_get's result and copying to the array with vectorial
4298 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
4301 * frontend-passes.c (traverse_io_block): Check for start, end or
4302 stride being defined by an outer implied DO loop.
4304 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
4308 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
4309 for annotation and remove dependence on -ftree-parallelize-loops.
4311 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4314 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
4315 (resolve_oacc_nested_loops): Likewise. Formatting fix.
4317 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4320 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
4321 parallell processing of DO CONCURRENT -ftree-parallelize-loops
4324 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4327 * resolve.c (resolve_variable): Simplify cases where access to a
4328 parameter array results in a single constant.
4330 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
4333 * decl.c (variable_decl): If upper or lower bounds simplify
4334 to a constant, use that.
4336 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
4339 * simplify.c (gfc_convert_constant): Handle case of array
4340 constructors within an array that has no iterator and improve
4341 the conciseness of this section of code.
4343 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4346 * array.c (gfc_resolve_character_array_constructor): Early
4347 exit for zero-size arrays.
4348 * simplify.c (simplify_transformation_to_array): Exit early
4349 if the result size is zero.
4350 (simplify_minmaxloc_to_array): Likewise.
4352 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
4355 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
4357 (gfc_free_namespace): Restore assert (revert r258839).
4359 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4361 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
4362 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
4363 (IOPARM_dt_dec_ext): ... this.
4364 * trans-io.c (build_dt): Adjust for default_exp renaming to
4365 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
4366 * io.c (match_io): Likewise.
4368 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4371 * frontend-passes.c (gfc_run_passes): Do not run front-end
4372 optimizations if a previous error occurred.
4374 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4375 Harald Anlauf <anlauf@gmx.de>
4378 * primary.c (gfc_convert_to_structure_constructor): Check
4379 conformance of argument types in structure constructor.
4381 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
4384 * io.c: Include constructor.h.
4385 (resolve_tag_format): For a constant character array, concatenate
4386 into a single character expression.
4388 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
4389 Dominique d'Humieres <dominiq@gcc.gnu.org>
4392 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
4393 scalar derived type with -std=f2003 and -std=f2008.
4395 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4396 Dominique d'Humieres <dominiq@gcc.gnu.org>
4399 * symbol.c (gfc_free_namespace): Delete the assert and only if
4400 refs count is equals zero, free the namespace. Otherwise,
4401 something is halfway and other errors will resound.
4403 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
4406 * expr.c (find_substring_ref): Change types of start, end
4407 and length variables to gfc_charlen_t. Set length to zero
4408 for empty substring.
4410 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
4413 * decl.c (check_function_name): Improved error message
4414 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
4416 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
4419 * decl.c (get_proc_name): If the MODULE prefix appears in interface
4420 body, then it must appear on the contained subroutine or function.
4421 While here, fix nearby mis-indented code.
4423 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
4424 Harald Anlauf <anlauf@gmx.de>
4427 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
4429 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
4432 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
4433 gfc_charlen_type_node when calling procedure.
4435 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
4438 * interface.c (symbol_rank): Remove bogus null pointer check that
4439 crept in when translating a ternary operator into an if-else
4442 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4445 * simplify.c (gfc_convert_constant): Correctly handle iterators
4446 for type conversion.
4448 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4451 * decl.c (get_proc_name): Check for a subroutine re-defined in
4452 the contain portion of a subroutine. Change language of existing
4453 error message to better describe the issue. While here fix whitespace
4456 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4459 * decl.c (get_proc_name): Catch clash between a procedure statement
4460 and a contained subprogram
4462 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
4465 * decl.c (merge_array_spec): Correct the error condition.
4467 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4470 * decl.c (get_proc_name): Check for clash of entry name with
4473 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4476 * decl.c (merge_array_spec): Limit the merging to maximum allowed
4477 dimensions, and issue error message if limit is exceeded.
4479 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
4481 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
4482 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
4483 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
4484 * intrinsic.texi: Update documentation.
4485 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
4486 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
4487 gfor_fndecl_kill and gfor_fndecl_kill_sub
4488 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
4490 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
4491 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
4492 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
4494 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
4497 * trans-array.c (structure_alloc_comps): Make sure that the
4498 vptr is copied and that the unlimited polymorphic _len is used
4499 to compute the size to be allocated.
4500 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
4501 unlimited polymorphic _len for the offset to the element.
4502 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
4503 * trans.h : Add the boolean 'unlimited' to the prototype.
4505 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
4508 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
4510 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
4512 * check.c (gfc_check_kill): Check pid and sig are scalar.
4513 (gfc_check_kill_sub): Restrict kind to 4 and 8.
4514 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
4515 keywords for KILL. Remove redundant *back="back" in favor of the
4516 original *bck="back".
4517 (add_subroutines): Sort keyword list. Add pid and sig keywords
4519 * intrinsic.texi: Fix documentation to consistently use pid and sig.
4520 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
4522 (gfc_resolve_rename_sub): Add comment.
4524 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
4527 * simplify.c (simplify_transformation): Return default result for
4528 empty array argument.
4529 (gfc_simplify_all): Remove special-case handling for zerosize.
4530 (gfc_simplify_any): Likewise.
4531 (gfc_simplify_count): Likewise.
4532 (gfc_simplify_iall): Likewise.
4533 (gfc_simplify_iany): Likewise.
4534 (gfc_simplify_iparity): Likewise.
4535 (gfc_simplify_minval): Likewise.
4536 (gfc_simplify_maxval): Likewise.
4537 (gfc_simplify_norm2): Likewise.
4538 (gfc_simplify_product): Likewise.
4539 (gfc_simplify_sum): Likewise.
4541 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
4544 * arith.c (check_result, eval_intrinsic): If result overflows, pass
4545 the expression up the chain instead of a NULL pointer.
4547 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
4551 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
4553 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4557 * expr.c (simplify_parameter_variable): If p is a size zero array
4558 and not an ARRAY_EXPR insert an empty array constructor and
4560 * gfortran.h: Add prototype for gfc_is_size_zero_array.
4561 * simplify.c (is_size_zero_array): Make non-static and rename into
4562 (gfc_is_size_zero_array): Check for parameter arrays of zero
4563 size by comparing shape and absence of constructor.
4564 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
4566 (gfc_simplify_count): Likewise.
4567 (gfc_simplify_iall): Likewise.
4568 (gfc_simplify_iany): Likewise.
4569 (gfc_simplify_iparity): Likewise.
4570 (gfc_simplify_minval): Likewise.
4571 (gfc_simplify_maxval): Likewise.
4572 (gfc_simplify_product): Likewise.
4573 (gfc_simplify_sum): Likewise.
4575 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
4578 * primary.c (match_sym_complex_part): Give the matcher for an implied
4579 do-loop a chance to run.
4581 2018-03-03 Harald Anlauf <anlauf@gmx.de>
4584 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
4585 dereference NULL pointer.
4587 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4590 * simplify.c (is_size_zero_array): New function to check for size
4592 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
4593 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
4594 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
4595 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
4596 requirements from F2018.
4598 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4601 * simplify.c (gfc_simplify_transfer): Resolve mold.
4603 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
4606 * resolve.c (build_loc_call): Change symtree name from 'loc' to
4609 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4612 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
4613 components are caf tokens.
4614 (gfc_target_interpret_expr): Treat BT_VOID expressions as
4617 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4620 * class.c (class_array_ref_detected): Remove the condition that
4621 there be no reference after the array reference.
4622 (find_intrinsic_vtab): Remove excess whitespace.
4623 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
4624 as 'base and call build_class_array_ref earlier.
4626 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
4629 * trans-stmt.c (trans_associate_var): Make sure that the se
4630 expression is a pointer type before converting it to the symbol
4633 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
4636 * decl.c (variable_decl): Check that an explicit-shape-array with
4637 nonconstant bounds is allowed.
4639 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
4642 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
4643 has a pre block, add it to the expression pre block.
4645 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
4648 * gfortran.h (gfc_integer_4_kind): Define.
4649 * resolve.c (resolve_select_type): Make sure that the
4650 kind of c->high is gfc_integer_4_kind.
4652 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
4655 * decl.c (gfc_match_data): Check for invalid substring in
4658 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4660 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
4662 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4665 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
4667 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4670 * interface.c (compare_actual_formal): Issue error if keyword is
4671 used in a statement function.
4673 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4676 * trans-io.c (set_parameter_value_inquire): Adjust range check of
4677 negative unit values for kind=8 units to the kind=4 negative limit.
4679 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4682 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
4683 accessing its components.
4685 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4688 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
4689 before accessing its components.
4691 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4694 * trans-const.c : Clean up some whitespace issues.
4695 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
4696 derived type has a kind value of zero, set it to the default
4699 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
4702 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
4703 argument to stop and error stop decls.
4704 * trans-stmt.c (gfc_trans_stop): Add false value to argument
4707 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4711 * trans-decl.c (gfc_build_builtin_function_decls): Pass
4712 gfc_int8_type node to pause_numeric, size_type_node to
4714 * trans-stmt.c (gfc_trans_pause): Likewise.
4716 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4718 * gfortran.texi: Update Coarray API description.
4719 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
4720 character lengths, int for exit codes.
4721 (generate_coarray_sym_init): Use size_t for character length.
4722 * trans-intrinsic.c (conv_co_collective): Likewise.
4723 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
4724 (gfc_trans_event_post_wait): Likewise.
4725 (gfc_trans_sync): Likewise.
4726 (gfc_trans_stop): Use size_t for character lengths, int for exit
4729 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
4733 * primary.c (gfc_convert_to_structure_constructor):
4734 For a constant string constructor, make sure the length
4737 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
4741 * resolve.c (resolve_assoc_var): Rearrange the logic for the
4742 determination of the character length of associate names. If
4743 the associate name is missing a length expression or the length
4744 expression is not a constant and the target is not a variable,
4745 make the associate name allocatable and deferred length.
4746 * trans-decl.c (gfc_get_symbol_decl): Null the character length
4747 backend_decl for deferred length associate names that are not
4748 variables. Set 'length' to gfc_index_zero_node for character
4749 associate names, whose character length is a PARM_DECL.
4751 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4754 * frontend-passes.c (traverse_io_block): Remove workaround for
4757 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
4759 * gfortran.texi: Document additional src/dst_type. Fix some typos.
4760 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
4761 argument of _caf_*_by_ref () with * e { get, send, sendget }.
4762 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
4763 data referenced when generating a call to caf_get_by_ref ().
4764 (conv_caf_send): Same but for caf_send_by_ref () and
4765 caf_sendget_by_ref ().
4767 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4770 * io.c (check_format): Allow FMT_COLON.
4772 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
4775 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
4776 the typenode in the case of deferred length characters.
4778 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
4781 * frontend-passes (scalarized_expr): If the expression
4782 is an assumed size array, leave in the last reference
4783 and pass AR_SECTION instead of AR_FULL to gfc_resolve
4784 in order to avoid an error.
4786 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
4789 * resolve.c (resolve_assoc_var): If a non-constant target expr.
4790 has no string length expression, make the associate variable
4791 into a deferred length, allocatable symbol.
4792 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
4794 * trans-stmt.c (trans_associate_var): Null and free scalar
4795 associate names that are allocatable. After assignment, remove
4796 the allocatable attribute to prevent reallocation.
4798 2018-02-16 Jakub Jelinek <jakub@redhat.com>
4801 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
4802 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
4804 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
4807 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
4809 2018-02-15 Janus Weil <janus@gcc.gnu.org>
4812 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
4815 2018-02-14 Janus Weil <janus@gcc.gnu.org>
4818 * match.c (gfc_match_select_type): Fix check for selector in
4819 SELECT TYPE statement.
4821 2018-02-13 Janus Weil <janus@gcc.gnu.org>
4824 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
4826 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
4827 Janne Blomqvist <jb@gcc.gnu.org>
4829 * module.c (dump_module): Use lbasename to ensure that module
4830 files are reproducible.
4832 2018-02-12 Janus Weil <janus@gcc.gnu.org>
4835 * resolve.c (resolve_component): Fix checks of passed argument in
4836 procedure-pointer components.
4838 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4841 * resolve.c (resolve_formal_arglist): Update error message.
4843 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
4845 * gfortran.texi: Fix typos in documentation of caf_register ().
4846 * trans-array.c (structure_alloc_comps): Only register a component of
4847 a derived typed corray, not of an ultimate component coarray.
4849 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
4853 * interface.c (compare_actual_formal): Add in_statement_function
4854 bool parameter. Skip check of INTENT attribute for statement
4855 functions. Arguments to a statement function cannot be optional,
4856 issue error for missing argument.
4857 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
4858 in_statement_function.
4860 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
4863 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
4864 flag. If the is a vector subscript or the expression is not a
4865 variable, make the descriptor one-based.
4867 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
4871 * trans-array.c (gfc_array_init_size): Revert the change made
4872 in revision 257356 setting the dtype.
4873 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
4874 Call gfc_get_dtype_rank_type every time.
4877 * trans-array.c (gfc_conv_expr_descriptor): If the source array
4878 is a descriptor type, use its offset, removing the condition
4879 that is be a class expression.
4881 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
4884 * match.c (gfc_match_deallocate): Check for NULL pointer.
4886 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
4889 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
4890 (gfc_conv_intrinsic_function): Call it.
4892 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
4895 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
4896 try to resolve it. While here return early if possible.
4898 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
4901 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
4902 'length' if the symbol charlen backend_decl is an indirect ref.
4904 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
4908 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
4909 use gfc_get_dtype_rank_type.
4911 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
4915 * resolve.c (resolve_assoc_var): Generate an error if
4916 target length unknown.
4918 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
4921 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
4922 to runtime, print a warning message.
4924 2018-01-31 Jakub Jelinek <jakub@redhat.com>
4927 * openmp.c (gfc_match_omp_clauses): If all the linear
4928 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
4929 nor set *head = NULL. Formatting fixes.
4931 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
4934 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
4935 an address expression passed to an assumed rank dummy, convert
4936 to an indirect reference.
4938 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
4940 * dump-parse-tree.c (write_proc): Use sym_name (which may
4941 be sym->binding_label) instead of sym->name.
4943 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
4945 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
4948 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
4951 * trans-expr.c (fill_with_spaces): Use memset instead of
4953 (gfc_trans_string_copy): Improve opportunity to use builtins with
4956 2018-01-30 Jakub Jelinek <jakub@redhat.com>
4959 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
4960 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
4962 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4965 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
4968 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4971 * frontend-passes (matmul_to_var_expr): Return early if
4972 in association list.
4973 (inline_matmul_assign): Likewise.
4975 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
4978 * resolve.c (resolve_component): Ensure BIND(C) character
4979 components have length one.
4980 (resolve_symbol): Likewise for variables.
4982 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4985 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
4988 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
4989 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
4990 Soren Rasmussen <s.c.rasmussen@gmail.com>
4992 Partial support for Fortran 2018 teams features.
4994 * array.c (gfc_match_array_ref): add team attribute in coarray
4996 * check.c (gfc_check_get_team, gfc_check_team_number): add new
4997 functions for get_team and team_number.
4998 * dump-parse-tree.c (show_code_node): add new statements: form team,
4999 change team, end team, and sync team.
5000 * expr.c (gfc_find_team_co): add new function.
5001 * gfortran.h: add new statements.
5002 * intrinsic.c (add_functions): add get_team and team_number functions.
5003 * intrinsic.h: add get_team and team_number prototypes for check,
5004 simplify, and resolve.
5005 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
5007 * iso-fortran-env.def: add the team_type derived type.
5008 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
5009 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
5010 add change team, end team, form team, sync team match and functions.
5011 * match.h: add new prototypes for change team, end team, form team,
5013 * parse.c (decode_statement): add cases for change team, end team,
5014 form team, and sync team.
5015 * resolve.c: add cases for exec form team, change team, end team, and
5017 * simplify.c (gfc_simplify_get_team): add new function for get team.
5018 * st.c (gfc_free_statement): add cases exec for change team, end team,
5019 form team, sync team.
5020 * trans-decl.c (gfor_fndecl_caf_form_team)
5021 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
5022 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
5023 (gfor_fndecl_caf_team_number): add functions and definitions.
5024 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
5025 new function and team_type argument support.
5026 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
5027 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
5028 * trans-stmt.h: add new prototypes.
5029 * trans-types.c (gfc_get_derived_type): check condition for team_type.
5030 * trans.c (trans_code): new exec cases for form team, change team, end
5031 team, and sync team.
5032 * trans.h: add new prototypes.
5034 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
5037 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
5038 or .false. The summation does the correct type conversion.
5039 (gfc_simplify_dot_product): Special case zero-sized arrays.
5041 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
5044 * array.c (gfc_match_array_ref): If standard earlier than F2008
5045 it is an error if the reference dimension is greater than 7.
5046 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
5047 dtype masks and shifts accordingly.
5048 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
5049 type node to check the field.
5050 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
5051 (duplicate_allocatable_coarray): Access the rank field of the
5052 dtype descriptor rather than the dtype itself.
5053 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
5054 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
5056 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
5057 get_scalar_to_descriptor_type if the actual expression is a
5059 (gfc_trans_structure_assign): Assign the rank directly to the
5061 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
5062 to default integer kind.
5063 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
5064 'elem_len' field of the dtype.
5065 * trans-io.c (gfc_build_io_library_fndecls): Replace
5066 gfc_int4_type_node with dtype_type_node where necessary.
5067 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
5069 * trans-types.c : Provide 'get_dtype_type_node' to acces the
5070 dtype_type_node and, if necessary, build it.
5071 The maximum size of an array element is now determined by the
5072 maximum value of size_t.
5073 Update the description of the array descriptor, including the
5074 type def for the dtype_type.
5075 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
5076 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
5077 (gfc_get_array_descriptor_base): Change the type of the dtype
5078 field to dtype_type_node.
5079 (gfc_get_array_descr_info): Get the offset to the rank field of
5081 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
5082 * trans.h : Define the indices of the dtype fields.
5084 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5087 * decl.c (gfc_match_derived_decl): If eos not matched, recover
5088 and emit error about garbage after declaration.
5090 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5093 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
5096 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
5100 * arith.c (gfc_arith_concat): Use size_t for string length.
5101 (gfc_compare_string): Likewise.
5102 (gfc_compare_with_Cstring): Likewise.
5103 * array.c (gfc_resolve_character_array_constructor): Use
5104 HOST_WIDE_INT, gfc_mpz_get_hwi.
5105 * check.c (gfc_check_fe_runtime_error): Use size_t.
5106 * data.c (create_character_initializer): Use HOST_WIDE_INT,
5108 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
5109 (add_init_expr_to_sym): Use HOST_WIDE_INT.
5110 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
5112 (gfc_apply_init): Likewise.
5113 * match.h (gfc_set_constant_character_len): Update prototype.
5114 * primary.c (match_string_constant): Use size_t.
5115 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
5117 * simplify.c (init_result_expr): Likewise.
5118 (gfc_simplify_len_trim): Use size_t.
5119 * target-memory.c (gfc_encode_character): Use size_t.
5120 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
5121 (interpret_array): Use size_t.
5122 (gfc_interpret_character): Likewise.
5123 * target-memory.h (gfc_encode_character): Update prototype.
5124 (gfc_interpret_character): Likewise.
5125 (gfc_target_interpret_expr): Likewise.
5126 * trans-const.c (gfc_build_string_const): Use size_t for length
5128 (gfc_build_wide_string_const): Likewise.
5129 * trans-const.h (gfc_build_string_const): Likewise.
5130 (gfc_build_wide_string_const): Likewise.
5132 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
5135 * simplify.c (gfc_simplify_matmul): Set return type correctly.
5137 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
5140 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
5142 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5145 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5147 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5150 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5152 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
5155 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
5156 from symbol marked unlimited polymorphic.
5157 * resolve.c (resolve_structure_cons): Likewise.
5158 * misc.c (gfc_typename): Don't dereference derived->components
5161 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
5164 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
5165 (gfc_logical_4_kind): New macro
5166 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
5167 (gfc_simplify_maxloc): Likewise.
5168 (gfc_resolve_maxloc): Likewise.
5169 (gfc_resolve_minloc): Likewise.
5170 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
5171 argument; also raise error if it is used (for now). Add it
5172 if it isn't present.
5173 * intrinsic.c (add_sym_4ml): Rename to
5174 (add_sym_5ml), adjust for extra argument.
5175 (add_functions): Add "back" constant. Adjust maxloc and minloc
5177 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
5178 not of gfc_logical_4_kind, convert.
5179 (gfc_resolve_minloc): Likewise.
5180 * simplify.c (gfc_simplify_minloc): Add back argument.
5181 (gfc_simplify_maxloc): Likewise.
5182 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
5183 argument to %VAL to ensure passing by value.
5184 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
5185 also for library calls.
5187 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5190 * resolve.c (resolve_transfer): Delete code looking for 'DT'
5191 format specifiers in format strings. Set formatted to true if a
5192 format string or format label is present.
5193 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
5196 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5199 * dump-parse-tree.c (get_c_type_name): Remove extra line.
5200 Change for loop to use declaration in for loop. Handle BT_LOGICAL
5202 (write_decl): Add where argument. Fix indentation. Replace
5203 assert with error message. Add typename to warning
5205 (write_type): Adjust locus to call of write_decl.
5206 (write_variable): Likewise.
5207 (write_proc): Likewise. Replace assert with error message.
5209 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
5212 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
5213 the rhs expression is neither an elemental nor a conversion
5217 * trans-array.c (is_pointer_array): Remove unconditional return
5218 of false for -fopenmp.
5220 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5224 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
5227 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5230 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
5232 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5235 * resolve.c (resolve_charlen): Check the type of cl->length
5238 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5241 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
5243 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5246 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
5247 LHS type when assigning.
5249 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
5252 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
5254 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5256 * match.c (gfc_match_allocate): Check for NULL pointer.
5258 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5260 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
5262 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
5265 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
5266 an initializer, convert the kind parameters and add to the
5267 component if the instance.
5268 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
5269 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
5270 for parameterized arrays. Clean up typos in comments. Convert
5271 parameterized array initializers and copy into the array.
5272 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
5273 parameterized types.
5274 *trans-stmt.c (trans_associate_var): Deallocate associate vars
5275 as necessary, when they are PDT function results for example.
5278 * trans-array.c (structure_alloc_comps): Only compare len parms
5279 when they are declared explicitly.
5281 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
5284 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
5287 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
5291 * array.c (got_charlen): Use gfc_charlen_int_kind.
5292 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
5294 (find_intrinsic_vtab): Likewise.
5295 * decl.c (match_char_length): Use gfc_charlen_int_kind.
5296 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
5297 (gfc_match_implicit): Use gfc_charlen_int_kind.
5298 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
5299 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
5300 * expr.c (gfc_get_character_expr): Length parameter of type
5302 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
5303 (gfc_extract_hwi): New function.
5304 (simplify_const_ref): Make string_len of type gfc_charlen_t.
5305 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
5306 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
5307 * gfortran.h (gfc_mpz_get_hwi): New prototype.
5308 (gfc_mpz_set_hwi): Likewise.
5309 (gfc_charlen_t): New typedef.
5310 (gfc_expr): Use gfc_charlen_t for character lengths.
5311 (gfc_size_kind): New extern variable.
5312 (gfc_extract_hwi): New prototype.
5313 (gfc_get_character_expr): Use gfc_charlen_t for character length.
5314 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
5315 * gfortran.texi: Update description of hidden string length argument.
5316 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
5317 (gfc_resolve_char_achar): Likewise.
5318 (gfc_resolve_repeat): Pass string length directly without
5319 temporary, use gfc_charlen_int_kind.
5320 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
5321 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
5322 * misc.c (gfc_mpz_get_hwi): New function.
5323 (gfc_mpz_set_hwi): New function.
5324 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
5325 (parse_integer): Don't complain about large integers.
5326 (write_atom): Use HOST_WIDE_INT for integers.
5327 (mio_integer): Handle integer type mismatch.
5328 (mio_hwi): New function.
5329 (mio_intrinsic_op): Use HOST_WIDE_INT.
5330 (mio_array_ref): Likewise.
5331 (mio_expr): Likewise.
5332 * primary.c (match_substring): Use gfc_charlen_int_kind.
5333 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
5334 (resolve_character_operator): Likewise.
5335 (resolve_assoc_var): Likewise.
5336 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
5337 (resolve_charlen): Use mpz_sgn to determine sign.
5338 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
5340 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
5341 * target-memory.c (size_character): Length argument of type
5343 (gfc_encode_character): Likewise.
5344 (gfc_interpret_character): Use gfc_charlen_t.
5345 * target-memory.h (gfc_encode_character): Modify prototype.
5346 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
5347 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
5348 (trans_array_constructor): Use existing type.
5349 (get_array_charlen): Likewise.
5350 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
5351 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
5352 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
5353 (add_argument_checking): Likewise.
5354 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
5355 gfc_charlen_type_node.
5356 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
5357 4, fold_convert to correct type.
5358 (gfc_conv_class_to_class): Build const of type size_type_node for
5360 (gfc_copy_class_to_class): Likewise.
5361 (gfc_conv_string_length): Use same type in expression.
5362 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
5363 (gfc_conv_string_tmp): Make sure len is of the right type.
5364 (gfc_conv_concat_op): Use same type in expression.
5365 (gfc_conv_procedure_call): Likewise.
5366 (fill_with_spaces): Comment out memset() block due to spurious
5367 -Wstringop-overflow warnings.
5368 (gfc_trans_string_copy): Use gfc_charlen_type_node.
5369 (alloc_scalar_allocatable_for_subcomponent_assignment):
5370 fold_convert to right type.
5371 (gfc_trans_subcomponent_assign): Likewise.
5372 (trans_class_vptr_len_assignment): Build const of correct type.
5373 (gfc_trans_pointer_assignment): Likewise.
5374 (alloc_scalar_allocatable_for_assignment): fold_convert to right
5376 (trans_class_assignment): Build const of correct type.
5377 * trans-intrinsic.c (gfc_conv_associated): Likewise.
5378 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
5379 * trans-io.c (gfc_build_io_library_fndecls): Use
5380 gfc_charlen_type_node for character lengths.
5381 (set_string): Convert to right type in assignment.
5382 * trans-stmt.c (gfc_trans_label_assign): Build const of
5383 gfc_charlen_type_node.
5384 (trans_associate_var): Likewise.
5385 (gfc_trans_character_select): Likewise.
5386 (gfc_trans_allocate): Likewise, don't typecast strlen result.
5387 (gfc_trans_deallocate): Don't typecast strlen result.
5388 * trans-types.c (gfc_size_kind): New variable.
5389 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
5390 from size_type_node.
5391 * trans-types.h: Fix comment.
5393 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
5397 * check.c (gfc_check_eoshift): Check for string length and
5398 for conformance of boundary.
5399 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
5400 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
5401 * simplify.c (gfc_simplify_eoshift): New function.
5403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5404 Alan Hayward <alan.hayward@arm.com>
5405 David Sherwood <david.sherwood@arm.com>
5407 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
5409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5410 Alan Hayward <alan.hayward@arm.com>
5411 David Sherwood <david.sherwood@arm.com>
5413 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
5415 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
5418 * check.c (gfc_check_eoshift): Error for missing boundary if array
5419 is not one of the standard types.
5421 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5423 Update copyright years.
5425 * gfortranspec.c (lang_specific_driver): Update copyright notice
5427 * gfc-internals.texi: Bump @copying's copyright year.
5428 * gfortran.texi: Ditto.
5429 * intrinsic.texi: Ditto.
5430 * invoke.texi: Ditto.
5432 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5435 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
5436 gfc_simplify_minloc to maxloc and minloc, respectively.
5437 * intrinsic.h: Add prototypes for gfc_simplify_minloc
5438 and gfc_simplify_maxloc.
5439 * simplify.c (min_max_chose): Adjust prototype. Modify function
5440 to have a return value which indicates if the extremum was found.
5441 (is_constant_array_expr): Fix typo in comment.
5442 (simplify_minmaxloc_to_scalar): New function.
5443 (simplify_minmaxloc_nodim): New function.
5444 (new_array): New function.
5445 (simplify_minmaxloc_to_array): New function.
5446 (gfc_simplify_minmaxloc): New function.
5447 (simplify_minloc): New function.
5448 (simplify_maxloc): New function.
5450 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5454 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
5457 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
5460 * resolve.c (resolve_fl_derived0): Add caf_token fields for
5461 allocatable and pointer scalars, when -fcoarray selected.
5462 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
5463 field as well as the backend_decl.
5464 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
5465 derived types that are not vtypes. Components with caf_token
5466 attribute are pvoid types. For a component requiring it, find
5467 the caf_token field and have the component token field point to
5471 *trans-types.c (gfc_get_array_descriptor_base): Add the token
5472 field to the descriptor even when codimen not set.
5474 Copyright (C) 2018 Free Software Foundation, Inc.
5476 Copying and distribution of this file, with or without modification,
5477 are permitted in any medium without royalty provided the copyright
5478 notice and this notice are preserved.