1 2018-12-09 Fritz Reese <fritzoreese@gmail.com>
4 * resolve.c (resolve_operator): Do not call resolve_function.
5 Break like other cases.
7 2018-12-09 Cesar Philippidis <cesar@codesourcery.com>
9 * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the
10 location of combined acc loops.
12 2018-12-09 Thomas Schwinge <thomas@codesourcery.com>
14 * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC
18 * openmp.c (resolve_oacc_loop_blocks): Remove "Clause SEQ
19 conflicts with INDEPENDENT" diagnostic.
21 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
24 * resolve.c (check_data_variable): Named constant cannot be a
27 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
30 * decl.c (var_element): Inquiry parameters cannit be data objects.
32 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
35 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
36 Check for a NULL pointer.
38 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
41 * class.c (insert_component_ref): Check for NULL pointer and
42 previous error message issued.
43 * parse.c (parse_associate): Check for NULL pointer.
44 * resolve.c (resolve_assoc_var): Check for NULL pointer.
46 2018-12-07 Jakub Jelinek <jakub@redhat.com>
49 * trans-openmp.c (gfc_omp_clause_default_ctor,
50 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
51 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
52 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
55 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
56 Mark Eggleston <mark.eggleston@codethink.co.uk>
59 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
60 (set_dec_flags): Set/unset DEC and std flags according to value.
61 (post_dec_flags, set_init_local_zero): New functions.
62 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
63 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
65 <case OPT_finit_local_zero>: Use set_init_local_zero.
66 <case OPT_fdec>: Pass value to set_dec_flags.
67 <case OPT_fdec_structure>: Remove.
69 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
71 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
74 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
77 2018-11-27 Martin Liska <mliska@suse.cz>
79 * decl.c (gfc_match_gcc_builtin): New function.
80 * gfortran.h (struct vect_builtin_tuple): New.
81 (gfc_adjust_builtins): Likewise.
82 * lang-specs.h (TARGET_F951_OPTIONS): New.
83 (F951_OPTIONS): Use it.
84 * lang.opt: Add new option -fpre-include.
85 * match.h (gfc_match_gcc_builtin): Declare new function.
86 * parse.c (decode_gcc_attribute): Handle builtin.
87 (parse_progunit): Call gfc_adjust_builtins.
88 * scanner.c (gfc_new_file): Load pre-included header file
90 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
91 (gfc_adjust_builtins): Likewise.
93 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
96 * resolve.c (resolve_variable): Check for associate names with
99 2018-11-23 Jakub Jelinek <jakub@redhat.com>
101 * lang.opt (fpad-source): New option.
102 * scanner.c (load_line): Don't pad fixed form lines if
104 * invoke.texi (-fno-pad-source): Document.
106 2018-11-21 Jakub Jelinek <jakub@redhat.com>
108 * invoke.texi (-fdec-include): Document.
110 2018-11-21 Jakub Jelinek <jakub@redhat.com>
111 Mark Eggleston <mark.eggleston@codethink.com>
113 * lang.opt (fdec-include): New option.
114 * options.c (set_dec_flags): Set also flag_dec_include.
115 * scanner.c (include_line): Change return type from bool to int.
116 In fixed form allow spaces in between include keyword letters.
117 For -fdec-include, allow in fixed form 0 in column 6. With
118 -fdec-include return -1 if the parsed line is not full include
119 statement and it could be successfully completed on continuation
121 (include_stmt): New function.
122 (load_file): Adjust include_line caller. If it returns -1, keep
123 trying include_stmt until it stops returning -1 whenever adding
124 further line of input.
126 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
129 * frontend-passes.c (combine_array_constructor): Do not do
130 anything if in a WHERE statement.
132 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
135 * expr.c (gfc_check_assign): Reject assigning to an external
137 (gfc_check_pointer_assign): Add suppress_type_test
138 argument. Insert line after if. A non-proc pointer can not point
139 to a constant. Only check types if suppress_type_test is false.
140 * gfortran.h (gfc_check_pointer_assign): Add optional
141 suppress_type_test argument.
142 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
143 and give it the extra argument.
144 (resolve_fl_procedure): Set error on value for a function with
147 2018-11-15 David Malcolm <dmalcolm@redhat.com>
150 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
152 2018-11-13 David Malcolm <dmalcolm@redhat.com>
154 * cpp.c: Replace "source_location" with "location_t".
155 * gfortran.h: Likewise.
157 2018-11-08 Jakub Jelinek <jakub@redhat.com>
159 * trans-openmp.c (gfc_trans_omp_clauses): Use
160 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
161 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
162 rather than OMP_ATOMIC_SEQ_CST.
163 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
164 make_node instead of build1_loc.
165 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
166 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
167 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
168 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
169 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
170 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
171 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
173 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
176 * decl.c (verify_bind_c_sym): Remove unnecessary space
179 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
182 * frontend-passes.c (constant_string_length): If there is a
183 substring with a length which cannot be reduced to a constant,
186 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
189 * dependency.c (are_identical_variables): Return false if the
190 inquiry refs are not the same.
191 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
192 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
193 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
194 (gfc_copy_ref): Copy the inquiry ref types.
195 (find_inquiry_ref): New function.
196 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
197 to simplify_ref_chain.
198 (gfc_simplify_expr): Use the new arg in call to
200 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
202 (gfc_traverse_expr): Return true for inquiry ref.
203 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
204 * gfortran.h : Add enums and union member in gfc_ref to
205 implement inquiry refs.
206 * intrinsic.c : Fix white nois.
207 * match.c (gfc_match_assignment): A constant lavlue is an
209 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
211 (mio_ref): Handle inquiry refs.
212 * primary.c (is_inquiry_ref): New function.
213 (gfc_match_varspec): Handle inquiry refs calling new function.
214 (gfc_variable_attr): Detect inquiry ref for disambiguation
216 (caf_variable_attr): Treat inquiry and substring refs in the
218 * resolve.c (find_array_spec): ditto.
219 (gfc_resolve_substring_charlen): If there is neither a charlen
220 ref not an inquiry ref, return.
221 (resolve_ref): Handle inqiry refs as appropriate.
222 (resolve_allocate_expr): Entities with an inquiry ref cannot be
224 * simplify.c (simplify_bound, simplify_cobound): Punt on
226 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
228 *trans-expr.c (conv_inquiry): New function.
229 (gfc_conv_variable): Retain the last typespec to pass to
230 conv_inquiry on detecting an inquiry ref.
232 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
235 * decl.c (verify_bind_c_sym): Improve error message.
237 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
240 * gfortran.texi (File format of unformatted sequential files):
241 Replace random comma with period.
242 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
244 (MAXLOC): Add refrence to FINDLOC.
247 2018-10-31 Nathan Sidwell <nathan@acm.org>
249 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
251 2018-10-31 Martin Liska <mliska@suse.cz>
253 * trans-decl.c (struct module_hasher): Call htab_hash_string
254 for s->name and not for s.
256 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
259 * simplify.c (simplify_min_max): Do not convert the type of the
262 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
265 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
266 (gfc_check_f): Add f6fl field.
267 (gfc_simplify_f): Add f6 field.
268 (gfc_resolve_f): Likewise.
269 (gfc_type_letter): Add optional logical_equas_int flag.
270 * check.c (intrinsic_type_check): New function.
271 (gfc_check_findloc): New function.
272 * intrinsics.c (gfc_type_letter): If logical_equals_int is
273 set, act accordingly.
274 (add_sym_5ml): Reformat comment.
275 (add_sym_6fl): New function.
276 (add_functions): Add findloc.
277 (check_arglist): Add sixth argument, handle it.
278 (resolve_intrinsic): Likewise.
279 (check_specific): Handle findloc.
280 * intrinsic.h (gfc_check_findloc): Add prototype.
281 (gfc_simplify_findloc): Likewise.
282 (gfc_resolve_findloc): Likewise.
283 (MAX_INTRINSIC_ARGS): Adjust.
284 * iresolve.c (gfc_resolve_findloc): New function.
285 * simplify.c (gfc_simplify_minmaxloc): Make static.
286 (simplify_findloc_to_scalar): New function.
287 (simplify_findloc_nodim): New function.
288 (simplify_findloc_to_array): New function.
289 (gfc_simplify_findloc): New function.
290 (gfc_conv_intrinsic_findloc): New function.
291 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
292 (gfc_is_intrinsic_libcall): Likewise.
294 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
297 * frontend-passes.c (check_locus_code): Add information that
298 warning about missing location information points to an
299 inconsisten internal state.
300 (check_locus_expr): Likewise.
302 2018-10-25 Jakub Jelinek <jakub@redhat.com>
305 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
306 nonmonotonic modifiers regardless of if they have been parsed
307 already or if the opposite one has. Fix up check whether
308 comma after modifier should be parsed.
309 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
311 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
314 * frontend-passes.c (get_len_call): New function to generate a
315 call to intrinsic LEN.
316 (create_var): Use this to make length expressions for variable
318 Clean up some white space issues.
320 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
323 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
324 length for array valued deferred length lhs.
326 2018-10-18 Tobias Burnus <burnus@net-b.de>
329 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
332 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
335 * trans-stmt.c (trans_associate_var): All strings that return
336 as pointer types can be assigned directly to the associate
337 name so remove 'attr' and the condition that uses it.
339 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
342 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
343 initialization with NULL() of a deferred length pointer.
345 2018-10-17 Tobias Burnus <burnus@net-b.de>
348 * resolve.c (resolve_select_type): Use correct variable.
350 2018-10-17 David Malcolm <dmalcolm@redhat.com>
352 * Make-lang.in (selftest-fortran): New.
354 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
361 * resolve.c (resolve_variable): Fix up expressions with array
362 associate names, where the parser did not detect that this is
363 array and there was no array part_ref in the expression.
365 2018-10-16 Tobias Burnus <burnus@net-b.de>
368 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
369 Rename argument e3_is_array_constr to e3_has_nodescriptor
371 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
372 to 1 for nonalloc/nonpointer func results/vars besides
375 2018-10-16 Tobias Burnus <burnus@net-b.de>
378 * trans-stmt.c (form_team, change_team, sync_team):
379 Don't ignore argse.pre/argse.post.
381 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
382 Tobias Burnus <burnus@gcc.gnu.org>
385 * resolve.c (resolve_assoc_var): Add missing array spec for
386 class associate names.
387 (resolve_select_type): Handle case where last typed component
388 of the selector has a different type to the expression.
389 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
390 call to gfc_expr_to_initialize with call to gfc_copy_expr.
391 (gfc_conv_class_to_class): Guard assignment to 'len' field
392 against case where zero constant is supplied.
394 2018-10-12 Tobias Burnus <burnus@net-b.de>
397 * expr.c (gfc_simplify_expr): Avoid simplifying
398 the 'array' argument to lbound/ubound/lcobound/
401 2018-10-12 Tobias Burnus <burnus@net-b.de>
404 * decl.c (get_proc_name): Return with error before
407 2018-10-11 Tobias Burnus <burnus@net-b.de>
410 2018-10-09 Tobias Burnus <burnus@net-b.de>
413 * resolve.c (resolve_ref): Reject nonscalar
414 substring references.
416 2018-10-09 David Malcolm <dmalcolm@redhat.com>
418 * cpp.c (gfc_cpp_init_0): Update for renamings.
419 (cb_cpp_error): Rename to...
420 (cb_cpp_diagnostic): ...this, converting level and reason to
423 2018-10-09 Tobias Burnus <burnus@net-b.de>
426 * resolve.c (resolve_ref): Reject nonscalar
427 substring references.
429 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
432 * trans-array.c (gfc_get_array_span): Deal with deferred char
433 array components having a TYPE_MAX_VALUE of zero.
434 (gfc_array_init_size): Use the hidden string length component
435 to build the descriptor dtype.
436 (gfc_array_allocate): Remove the erroneous replacement of the
437 charlen backend decl with a temporary.
438 (gfc_conv_expr_descriptor): Use the ss_info string length in
439 the case of deferred character components.
440 (gfc_alloc_allocatable_for_assignment): Actually compare the
441 string lengths for deferred characters. Make sure that kind > 1
442 is handled correctly. Set the span field of the descriptor.
443 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
447 * trans-array.c (gfc_array_allocate): Set the span field for
448 variable length character arrays.
450 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
452 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
453 contiguous pointer from non-contiguous target" to a warning.
455 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
458 * trans-stmt.c (trans_associate_var): Character associate names
459 with variable string length do not have to be deferred length
460 for the string length to be set, if variable.
462 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
465 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
466 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
467 (gfc_arith_concat): If the types of op1 and op2 are not
468 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
470 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
473 * resolve.c (resolve_fl_procedure): Include class functions in
474 the test that elemental function results be scalar.
476 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
479 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
480 by one. Set extents one past the array boundaries to zero to avoid
481 warning with instrumented compiler.
482 (gfc_simplify_eoshift): Likewise, only for ss_ex.
484 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
487 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
488 character length pointer initializer has the right type to fix
489 problem with deferred_character_24.f90 on big endian.
491 2018-10-03 Jeff Law <law@redhat.comg>
493 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
495 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
498 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
499 flag in the call to gfc_check_dependency.
501 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
504 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
505 introduced by r264358, which prevented components of associate
506 names from being reallocated on assignment.
508 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
512 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
513 deferred type and the info->descriptor is present, use the
515 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
516 it as 'decl' rather than the symbol backend_decl.
517 (gfc_array_allocate): If the se string_length is a component
518 reference, fix it and use it for the expression string length
519 if the latter is not a variable type. If it is a variable do
520 an assignment. Make use of component ref string lengths to set
521 the descriptor 'span'.
522 (gfc_conv_expr_descriptor): For pointer assignment, do not set
523 the span field if gfc_get_array_span returns zero.
524 * trans.c (get_array_span): If the upper bound a character type
525 is zero, use the descriptor span if available.
527 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
530 * trans-decl.c (gfc_get_symbol_decl): A deferred character
531 length pointer that is initialized needs the string length to
532 be initialized as well.
534 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
537 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
538 fix the rse stringlength.
540 2018-09-25 Martin Liska <mliska@suse.cz>
543 * decl.c (add_hidden_procptr_result): Simplify condition
544 as we are in branch witch 'case1 || case2'.
546 2018-09-25 Martin Liska <mliska@suse.cz>
548 * trans.c (remove_suffix): Remove
551 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
554 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
555 for variables in an associate statement.
557 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
558 Cesar Philippidis <cesar@codesourcery.com>
560 * openmp.c (resolve_oacc_loop_blocks):
562 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
565 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
566 for variables having the dimension attribute.
568 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
570 * trans-expr.c (gfc_caf_get_image_index): Do array index
571 calculations in gfc_array_index_type.
572 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
573 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
574 (gfc_trans_event_post_wait): Likewise.
576 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
579 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
580 clobber on INTENT(OUT) for saved variables.
582 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
585 * trans.h (gfc_conv_expr_reference): Add optional argument
586 add_clobber to prototype.
587 (gfc_conv_procedure_call): Set add_clobber argument to
588 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
589 non-pointer, non-allocatable, non-dummy variables whose type
590 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
591 the procedure is not elemental.
592 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
593 statement before call if add_clobber is set.
595 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
598 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
599 the charlen backend_decl before using the VAR_P macro.
601 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
604 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
605 rhs has a charlen expression, convert that and use it.
606 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
607 assignment of deferred character array vars to a realocatable
608 lhs should not be added to the exterior block since vector
609 indices, for example, generate temporaries indexed within the
612 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
615 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
616 components if must_finalize is set for expr3.
618 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
619 Kwok Cheung Yeung <kcy@codesourcery.com>
621 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
622 argument of a call to _gfortran_caf_register is of size_type_node.
623 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
624 index to a size_type_node type.
625 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
627 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
629 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
631 2018-09-20 Janus Weil <janus@gcc.gnu.org>
633 * gfortran.h (gfc_str_startswith): New macro.
634 * decl.c (variable_decl, gfc_match_end): Use it.
635 * iresolve.c (is_trig_resolved): Ditto.
636 * module.c (load_omp_udrs, read_module): Ditto.
637 * options.c (gfc_handle_runtime_check_option): Ditto.
638 * primary.c (match_arg_list_function): Ditto.
639 * trans-decl.c (gfc_get_symbol_decl): Ditto.
640 * trans-expr.c (gfc_conv_procedure_call): Ditto.
641 * interface.c (dtio_op): Replace strncmp by strcmp.
642 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
643 * trans-expr.c (conv_arglist_function): Ditto.
644 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
645 STARTS_WITH by gfc_str_startswith.
647 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
649 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
650 and reorder the switch cases to match the enum in gfortran.h.
652 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
655 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
656 assignment of deferred character intrinsic elemental function
657 results to a realocatable lhs must not be added to the exterior
658 block if they are array valued but must go to the loop body.
660 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
663 * gfortran.h (gfc_expr): Add external_blas flag.
664 * frontend-passes.c (matrix_case): Add case A2TB2T.
665 (optimize_namespace): Handle flag_external_blas by
666 calling call_external_blas.
667 (get_array_inq_function): Add argument okind. If
668 it is nonzero, use it as the kind of argument
670 (inline_limit_check): Remove m_case argument, add
671 limit argument instead. Remove assert about m_case.
672 Set the limit for inlining from the limit argument.
673 (matmul_lhs_realloc): Handle case A2TB2T.
674 (inline_matmul_assign): Handle inline limit for other cases with
675 two rank-two matrices. Remove no-op calls to inline_limit_check.
676 (call_external_blas): New function.
677 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
678 argument to external BLAS if external_blas is already set.
680 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
683 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
684 assignment of deferred character elemental function results to
685 a realocatable lhs must not be added to the exterior block but
686 must go to the loop body.
688 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
691 * trans-array.c (gfc_get_array_span): Try to get the element
692 length of incomplete types. Return NULL_TREE otherwise.
693 (gfc_conv_expr_descriptor): Only set the 'span' field if the
694 above does not return NULL_TREE. Set 'span' field if possible
695 for all new descriptors.
697 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
700 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
701 characters with a variable length expression for deferred init.
702 (gfc_trans_deferred_vars): Perform the assignment for these
703 symbols by calling gfc_conv_string_length.
705 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
708 * resolve.c (resolve_assoc_var): If the target expression is a
709 deferred charlen dummy and the associate name shares the
710 charlen, generate a new one. Make sure that new charlens are in
711 the namespace list so that they get cleaned up.
712 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
714 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
715 length dummy and result arrays on the deferred initialization
716 list so that the variable length arrays can be correctly dealt
718 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
719 NULL rather than ICEing..
721 2018-09-16 Janus Weil <janus@gcc.gnu.org>
725 * match.c (gfc_match_assignment): For a polymorphic assignment,
726 make sure that the vtab for the rhs type is generated.
728 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
731 * frontend-passes.c (B_ERROR): New macro for matmul bounds
732 checking error messages.
734 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
737 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
739 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
740 from overlength string initializers.
742 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
745 * trans-expr.c (gfc_trans_class_init_assign): Access to
746 to array elements of the dynamic type requires that the array
747 reference be added to the class expression and not the _data
748 component, unlike scalar expressions.
750 2018-09-11 Janus Weil <janus@gcc.gnu.org>
753 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
754 attribute, then it was declared in another module, so there should be
755 no error that it has not been declared.
757 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
760 * expr.c (is_subref_array): Add the check of dimensionality for
761 class, dummy, pointer arrays.
763 2018-09-11 Janus Weil <janus@gcc.gnu.org>
766 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
767 with non-polymorphic objects.
769 2018-09-10 Janus Weil <janus@gcc.gnu.org>
772 * decl.c (match_binding_attributes): Use correct default accessibility
773 for procedure pointer components.
775 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
777 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
778 'P' is zero and issue an error if it is.
780 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
784 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
785 info->descriptor but pass it directly to gfc_build_array_ref.
786 (gfc_conv_array_ref): Likewise for se->expr.
787 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
788 obtain the span field directly from it.
790 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
793 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
794 scalar results being passed to a derived type formal argument
795 are finalized if possible. Otherwise, rely on existing code for
796 deallocation. Make the deallocation of allocatable result
797 components conditional on finalization not taking place. Make
798 the freeing of data components after finalization conditional
799 on the data being NULL.
800 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
801 condition to return NULL_TREE.
802 (gfc_trans_assignment_1): If the assignment is class to class
803 and the rhs expression must be finalized but the assignment
804 is not marked as a polymorphic assignment, use the vptr copy
805 function instead of gfc_trans_scalar_assign.
808 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
809 block to the pre block if the expression is to be finalized.
810 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
811 finalized, load the post block into a finalization block and
812 add it right at the end of the allocation block.
814 2018-08-27 David Malcolm <dmalcolm@redhat.com>
817 * error.c (gfc_format_decoder): Update for conversion of
818 show_caret_p to a tri-state.
820 2018-08-25 Janus Weil <janus@gcc.gnu.org>
823 * resolve.c (resolve_transfer): Correctly determine typespec for
824 generic function calls, in order to throw a proper error.
826 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
829 * frontend-passes.c (var_in_expr_callback): New function.
830 (var_in_expr): New function.
831 (traverse_io_block): Use var_in_expr instead of
832 gfc_check_dependency for checking if the variable depends on the
835 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
837 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
838 HONOR_SIGNED_ZEROS checks.
840 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
843 * resolve.c (resolve_typebound_call): If the TBP is not marked
844 as a subroutine, check the specific symbol.
846 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
848 * gfortran.texi: Mention that asynchronous I/O does
849 not work on systems which lack condition variables, such
852 2018-08-22 Janus Weil <janus@gcc.gnu.org>
855 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
858 2018-08-22 Andrew Benson <abensonca@gmail.com>
860 * module.c (load_generic_interfaces): Move call to find_symbol()
861 so that only occurs if actually needed.
863 2018-08-22 Janus Weil <janus@gcc.gnu.org>
866 * decl.c (gfc_match_data_decl): Allow allocatable components of
867 indirectly recursive type.
868 * resolve.c (resolve_component): Remove two errors messages ...
869 (resolve_fl_derived): ... and replace them by a new one.
871 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
873 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
874 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
875 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
878 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
879 Thomas Koenig <tkoenig@gcc.gnu.org>
882 * gfortran.texi: Add description of asynchronous I/O.
883 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
885 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
886 st_wait_async and change argument spec from ".X" to ".w".
887 (gfc_trans_wait): Pass ID argument via reference.
889 2018-08-16 Nathan Sidwell <nathan@acm.org>
891 * cpp.c (dump_macro): Use cpp_user_macro_p.
893 2018-08-14 Janus Weil <janus@gcc.gnu.org>
896 * interface.c (compare_type): Remove a CLASS/TYPE check.
897 (compare_type_characteristics): New function that behaves like the old
899 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
900 Call 'compare_type_characteristics' instead of 'compare_type'.
902 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
905 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
906 elements are returned as references to the data element. Get
907 the class expression by stripping back the references. Use this
908 for the element size.
910 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
913 * resolve.c (resolve_fl_variable_derived): Check if the derived
914 type is use associated before checking for the host association
917 2018-08-10 Janus Weil <janus@gcc.gnu.org>
920 * invoke.texi (frontend-optimize): Mention short-circuiting.
921 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
922 * resolve.c (resolve_operator): Warn about short-circuiting only with
924 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
925 with -ffrontend-optimize. Without that flag, make sure that both
926 operands are evaluated.
928 2018-08-08 Nathan Sidwell <nathan@acm.org>
930 * cpp.c (cb_file_change): Use linemap_included_from.
932 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
934 * trans-stmt.h: Remove stale reference to trans-openacc.c.
936 2018-08-04 Janus Weil <janus@gcc.gnu.org>
939 * interface.c (gfc_compare_interfaces): Apply additional
940 distinguishability criteria of F08 to operator interfaces.
942 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
944 Revert 'AsyncI/O patch committed'
945 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
946 Thomas Koenig <tkoenig@gcc.gnu.org>
949 * gfortran.texi: Add description of asynchronous I/O.
950 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
952 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
953 st_wait_async and change argument spec from ".X" to ".w".
954 (gfc_trans_wait): Pass ID argument via reference.
956 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
957 Thomas Koenig <tkoenig@gcc.gnu.org>
960 * gfortran.texi: Add description of asynchronous I/O.
961 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
963 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
964 st_wait_async and change argument spec from ".X" to ".w".
965 (gfc_trans_wait): Pass ID argument via reference.
967 2018-07-20 Martin Sebor <msebor@redhat.com>
970 * gfortran.h (gfc_handle_option): Change function argument
972 * options.c (gfc_handle_option): Same.
974 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
976 * gfortran.h (gfc_symbol): Add pointer to next derived type.
977 (gfc_dt_list, gfc_get_dt_list): Remove.
978 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
979 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
980 simple nullification of gfc_derived_types.
981 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
983 (add_dt_to_dt_list): Change derived type linked list insertion to
984 utilize dt_next pointers in gfc_symbol.
985 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
986 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
987 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
988 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
989 * trans-types.c (gfc_get_derived_type): Change derived type linked
990 list search to utilize dt_next pointers in gfc_symbol.
992 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
994 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
995 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
997 2018-07-18 Janus Weil <janus@gcc.gnu.org>
998 Thomas Koenig <tkoenig@gcc.gnu.org>
1001 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
1002 * frontend-passes.c (do_warn_function_elimination): Do not warn for
1004 * gfortran.h: Add prototypes for gfc_pure_function and
1005 gfc_implicit_pure_function.
1006 * gfortran.texi: Add chapter on evaluation of logical expressions.
1007 * invoke.texi: Mention that -Wfunction-elimination is implied
1009 * lang.opt: Make -Wextra imply -Wfunction-elimination.
1010 * resolve.c (pure_function): Rename to gfc_pure_function.
1011 (gfc_implicit_pure_function): New function.
1012 (check_pure_function): Use it here.
1013 (impure_function_callback): New function.
1014 (resolve_operator): Call it via gfc_expr_walker.
1016 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1019 * decl.c (match_old_style_init): Initialize locus of variable expr when
1020 creating a data variable.
1021 (match_clist_expr): Verify array is explicit shape/size before
1022 attempting to allocate constant array constructor.
1024 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1027 * module.c (mio_component): Set component->loc when loading from module.
1029 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1032 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1034 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1035 on linear clauses. Initialize n->where to gfc_current_locus.
1037 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
1040 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
1041 in F2008 and not F2003.
1042 (resolve_function): Ditto in error message. Also, exclude
1043 deferred character length results from the error.
1045 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
1049 * expr.c (class_allocatable, class_pointer, comp_allocatable,
1050 comp_pointer): New helpers.
1051 (component_initializer): Generate EXPR_NULL for allocatable or pointer
1052 components. Do not generate initializers for components within BT_CLASS.
1053 Do not assign to comp->initializer.
1054 (gfc_generate_initializer): Use new helpers; move code to generate
1055 EXPR_NULL for class allocatable components into component_initializer().
1057 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1060 * trans-decl.c (gfc_process_block_locals): Delete assert and set
1061 saved_local_decls = NULL_TREE.
1063 2018-07-02 Richard Biener <rguenther@suse.de>
1066 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
1067 for the distinct type copy.
1069 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1073 * trans-array.c (structure_alloc_comps): Do not explicitly copy
1074 procedure pointer components.
1076 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1079 * expr.c : Add a prototype for scalarize_intrinsic_call.
1080 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
1081 intrinsic function calls.
1082 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
1083 the expression or any of the actual argument expressions are
1084 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
1085 Only simplify the scalarized expressions if there are no errors
1087 (gfc_check_init_expr): Set 'init_flag' true in the call to
1088 scalarize_intrinsic_call.
1090 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
1093 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
1095 2018-06-28 Martin Liska <mliska@suse.cz>
1097 * gfortranspec.c: Include opt-suggestions.h.
1099 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
1104 * expr.c (component_initializer): Assign init expr to c->initializer.
1105 (generate_isocbinding_initializer): New.
1106 (gfc_generate_initializer): Call generate_isocbinding_initializer to
1107 generate initializers for c_ptr and c_funptr with -finit-derived.
1109 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1112 * interface.c (check_dtio_interface1): Delete assert.
1114 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
1115 Rainer Orth <ro@gcc.gnu.org>
1118 * resolve.c (resolve_contained_fntype): Check for the charlen
1119 before testing the length.
1121 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1124 * resolve.c (resolve_contained_fntype): Change standard ref.
1125 from F95 to F2003: C418. Correct a spelling error in a comment.
1126 It is an error for an abstract interface to have an assumed
1127 character length result.
1128 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
1131 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1134 * resolve.c (resolve_ordinary_assign): Force the creation of a
1135 vtable for assignment of non-polymorphic expressions to an
1136 unlimited polymorphic object.
1137 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1138 size of the rhs type for such assignments. Set the dtype, _len
1139 and vptrs appropriately.
1140 * trans-expr.c (gfc_trans_assignment): Force the use of the
1141 _copy function for these assignments.
1143 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1144 Thomas Schwinge <thomas@codesourcery.com>
1145 Cesar Philippidis <cesar@codesourcery.com>
1147 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
1149 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
1150 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1151 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
1152 create, deviceptr, present_of_*. Add support for finalize and
1154 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
1155 (OACC_KERNELS_CLAUSES): Likewise.
1156 (OACC_DATA_CLAUSES): Likewise.
1157 (OACC_DECLARE_CLAUSES): Likewise.
1158 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
1159 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
1160 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
1161 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
1162 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
1165 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1167 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
1169 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1171 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
1172 (nonlocal_dummy_decls): Likewise.
1173 (gfc_nonlocal_dummy_array_decl): Likewise.
1174 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
1175 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
1176 reusing the result of a recursive call.
1177 (gfc_generate_function_code): Do not create, insert and destroy
1178 nonlocal_dummy_decls.
1180 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1183 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
1184 pointer dereference.
1186 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1189 * parse.c (decode_oacc_directive): Set gfc_matching_function
1191 (decode_omp_directive): Likewise.
1193 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1196 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1198 2018-06-12 David Malcolm <dmalcolm@redhat.com>
1201 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
1202 levenshtein_distance to get_edit_distance.
1204 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1207 * expr.c (gfc_check_assign): Select non-NULL locus.
1209 2018-06-11 Janus Weil <janus@gcc.gnu.org>
1212 * interface.c (compare_ptr_alloc): New function.
1213 (generic_correspondence): Call it.
1215 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1217 * gfortran.h (gfc_expr): Add no_bounds_check field.
1218 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
1219 on function and function argument.
1220 (inline_matmul_assign): Set no_bounds_check on zero expression
1221 and on lhs of zero expression.
1222 Also handle A1B2 case if realloc on assigment is active.
1223 * trans-array.c (gfc_conv_array_ref): Don't do range checking
1224 if expr has no_bounds_check set.
1225 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
1227 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
1228 on lss and lss if the corresponding expressions have it set.
1230 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
1233 * trans-const.c: Remove include "diagnostic-core.h".
1234 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
1236 2018-06-10 Janus Weil <janus@gcc.gnu.org>
1239 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
1240 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
1241 and remove a TODO note.
1242 * gfortran.h: Add a comment to sym_intent.
1244 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1247 * resolve.c (resolve_operator): Provide better error message for
1248 derived type entity used in an binary intrinsic numeric operator.
1250 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1255 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
1256 reduce a charlen to a constant.
1258 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1261 * data.c (gfc_assign_data_value): Re-arrange code to allow for
1262 an error for double initialization of CHARACTER entities.
1264 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1267 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1269 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1272 * trans.h (gfc_ss): Add field no_bounds_check.
1273 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1274 ss->no_bounds_check is set, do not use runtime checks.
1275 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1276 for reallocatable lhs.
1278 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1281 * array.c (match_array_cons_element): NULL() cannot be in an
1284 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1287 * data.c (create_character_initializer): Return early if type is
1288 incompatible with CHARACTER.
1290 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1293 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1294 'P' is zero and issue an error if it is.
1296 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1299 * frontend-passes.c (is_fe_temp): Add prototype.
1300 (realloc_string_callback): Early return for frontend-generated
1303 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
1307 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
1308 subroutine data clause arguments.
1310 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
1313 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
1316 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
1319 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
1321 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
1324 * check.c (gfc_check_random_init): New function. Check arguments of
1326 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
1327 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
1329 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
1330 * intrinsic.h: Add prototypes for gfc_check_random_init and
1331 gfc_resolve_random_init
1332 * intrinsic.texi: Document new intrinsic subprogram.
1333 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
1334 * trans-decl.c: Declare gfor_fndecl_random_init
1335 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
1336 Translate call to RANDOM_INIT.
1337 (gfc_conv_intrinsic_subroutine): Call it.
1338 * trans.h: Declare gfor_fndecl_random_init
1340 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
1342 * decl.c (match_data_constant): Fortran 2018 allows pointer
1343 initialization in a data statement.
1345 2018-05-25 Janus Weil <janus@gcc.gnu.org>
1348 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
1349 an obsolescent feature in Fortran 2018.
1350 (gfc_match_equivalence): Ditto.
1351 * resolve.c (resolve_common_blocks): Ditto.
1352 (gfc_resolve_forall): Ditto.
1353 * symbol.c (gfc_define_st_label): Ditto.
1355 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1358 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1359 pointer dereference.
1361 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1364 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1366 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1369 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1371 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1374 * resolve.c (resolve_sync): Resolve expression before checking for
1377 2018-05-22 Janus Weil <janus@gcc.gnu.org>
1380 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
1382 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
1383 * options.c (set_default_std_flags): Ditto.
1384 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
1385 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
1387 * check.c (gfc_check_atomic, gfc_check_event_query,
1388 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
1389 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
1390 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
1391 * intrinsic.c (add_functions, add_subroutines,
1392 gfc_check_intrinsic_standard): Ditto.
1393 * iso-c-binding.def: Ditto.
1394 * iso-fortran-env.def: Ditto.
1395 * match.c (gfc_match_event_post, gfc_match_event_wait,
1396 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
1397 gfc_match_end_team, gfc_match_sync_team): Ditto.
1398 * gfortran.texi: Remove mention of -std=f2008ts.
1399 Move TSs into F2018 section.
1400 * invoke.texi: Update documentation of -std=f2008ts.
1402 2018-05-21 Janus Weil <janus@gcc.gnu.org>
1405 * libgfortran.h: New macros GFC_STD_OPT_*.
1406 * error.c (notify_std_msg): New function.
1407 (gfc_notify_std): Adjust such that it can handle combinations of
1408 GFC_STD_* flags in the 'std' argument, not just a single one.
1409 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
1411 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
1412 * options.c (set_default_std_flags): Warn for F2018 deleted features
1414 (gfc_handle_option): F2018 deleted features are allowed in earlier
1416 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
1417 nonblock do constructs in Fortran 2018.
1419 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1422 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1423 test for self refs to the function result in the character len
1424 expression. If a self reference is found, emit an error and
1426 (resolve_fntype): Use the function symbol in the calls to the
1429 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1432 * trans-array.c (gfc_get_array_span): Renamed from
1434 (gfc_conv_expr_descriptor): Change references to above.
1435 * trans-array.h : Add prototype for 'gfc_get_array_span'.
1436 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
1438 * trans-stmt.c (trans_associate_var): If the associate name is
1439 a subref array pointer, use gfc_get_array_span for the span.
1441 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1444 * match.c (gfc_match_type_spec): Go through the array ref and
1445 decrement 'rank' for every dimension that is an element.
1447 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
1452 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1453 charlen backend_decl of the rhs expr to ss->info->string_length
1454 so that the value in the current scope is used.
1456 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1459 * gfortran.texi: Clarify documentation for Cray pointer and
1460 assumed-sized array.
1462 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
1465 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1466 of 'size'. If the element type is a pointer use the size of the
1467 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1468 case, set the size to zero.
1470 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1472 * gfortran.h: Remove prototype.
1473 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
1475 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
1478 * expr.c (check_inquiry): Avoid NULL pointer dereference.
1480 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1483 * check.c (gfc_check_rank): Check that the argument is a data object.
1485 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1488 * array.c (gfc_resolve_character_array_constructor): Substrings
1489 with upper bound smaller than lower bound are zero length strings.
1491 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1494 * data.c (gfc_assign_data_value): Check that a data object does
1495 not also have default initialization.
1497 2018-05-10 Marek Polacek <polacek@redhat.com>
1500 * options.c (gfc_post_options): Set main_input_filename.
1502 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1505 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1507 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
1511 * resolve.c (get_temp_from_expr): The temporary must not have
1512 dummy or intent attributes.
1514 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1517 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1518 implemented. Use gfc_logical_4_kind for BACK.
1519 * simplify.c (min_max_choose): Add optional argument back_val.
1521 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1522 back_val to min_max_choose.
1523 (simplify_minmaxloc_to_nodim): Likewise.
1524 (simplify_minmaxloc_to_array): Likewise.
1525 (gfc_simplify_minmaxloc): Add argument back, handle it.
1526 Pass back_val to specific simplification functions.
1527 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1528 pass it on to gfc_simplify_minmaxloc.
1529 (gfc_simplify_maxloc): Likewise.
1530 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1531 comment. If BACK is true, use greater or equal (or lesser or
1532 equal) insteal of greater (or lesser). Mark the condition of
1533 having found a value which exceeds the limit as unlikely.
1535 2018-05-07 Jeff Law <law@redhat.comg>
1537 * scanner.c (preprocessor_line): Call linemap_add after a line
1538 directive that changes the current filename.
1540 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
1543 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1544 introduced by r259385.
1545 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1546 same variables in coarray assignments.
1548 2018-05-02 Tom de Vries <tom@codesourcery.com>
1551 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1553 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1556 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1558 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
1562 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1563 during dependency computation. They define no data dependency.
1564 * trans-array.c (conv_array_index_offset): The stride can not be set
1566 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1567 for caf_get's result and copying to the array with vectorial
1570 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1573 * frontend-passes.c (traverse_io_block): Check for start, end or
1574 stride being defined by an outer implied DO loop.
1576 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1580 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1581 for annotation and remove dependence on -ftree-parallelize-loops.
1583 2018-04-10 Jakub Jelinek <jakub@redhat.com>
1586 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1587 (resolve_oacc_nested_loops): Likewise. Formatting fix.
1589 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1592 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1593 parallell processing of DO CONCURRENT -ftree-parallelize-loops
1596 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1599 * resolve.c (resolve_variable): Simplify cases where access to a
1600 parameter array results in a single constant.
1602 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1605 * decl.c (variable_decl): If upper or lower bounds simplify
1606 to a constant, use that.
1608 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
1611 * simplify.c (gfc_convert_constant): Handle case of array
1612 constructors within an array that has no iterator and improve
1613 the conciseness of this section of code.
1615 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1618 * array.c (gfc_resolve_character_array_constructor): Early
1619 exit for zero-size arrays.
1620 * simplify.c (simplify_transformation_to_array): Exit early
1621 if the result size is zero.
1622 (simplify_minmaxloc_to_array): Likewise.
1624 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
1627 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1629 (gfc_free_namespace): Restore assert (revert r258839).
1631 2018-03-28 Jakub Jelinek <jakub@redhat.com>
1633 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1634 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1635 (IOPARM_dt_dec_ext): ... this.
1636 * trans-io.c (build_dt): Adjust for default_exp renaming to
1637 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1638 * io.c (match_io): Likewise.
1640 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1643 * frontend-passes.c (gfc_run_passes): Do not run front-end
1644 optimizations if a previous error occurred.
1646 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1647 Harald Anlauf <anlauf@gmx.de>
1650 * primary.c (gfc_convert_to_structure_constructor): Check
1651 conformance of argument types in structure constructor.
1653 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1656 * io.c: Include constructor.h.
1657 (resolve_tag_format): For a constant character array, concatenate
1658 into a single character expression.
1660 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1661 Dominique d'Humieres <dominiq@gcc.gnu.org>
1664 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1665 scalar derived type with -std=f2003 and -std=f2008.
1667 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1668 Dominique d'Humieres <dominiq@gcc.gnu.org>
1671 * symbol.c (gfc_free_namespace): Delete the assert and only if
1672 refs count is equals zero, free the namespace. Otherwise,
1673 something is halfway and other errors will resound.
1675 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1678 * expr.c (find_substring_ref): Change types of start, end
1679 and length variables to gfc_charlen_t. Set length to zero
1680 for empty substring.
1682 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1685 * decl.c (check_function_name): Improved error message
1686 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1688 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1691 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1692 body, then it must appear on the contained subroutine or function.
1693 While here, fix nearby mis-indented code.
1695 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1696 Harald Anlauf <anlauf@gmx.de>
1699 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1701 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1704 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1705 gfc_charlen_type_node when calling procedure.
1707 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1710 * interface.c (symbol_rank): Remove bogus null pointer check that
1711 crept in when translating a ternary operator into an if-else
1714 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1717 * simplify.c (gfc_convert_constant): Correctly handle iterators
1718 for type conversion.
1720 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1723 * decl.c (get_proc_name): Check for a subroutine re-defined in
1724 the contain portion of a subroutine. Change language of existing
1725 error message to better describe the issue. While here fix whitespace
1728 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1731 * decl.c (get_proc_name): Catch clash between a procedure statement
1732 and a contained subprogram
1734 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1737 * decl.c (merge_array_spec): Correct the error condition.
1739 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1742 * decl.c (get_proc_name): Check for clash of entry name with
1745 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1748 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1749 dimensions, and issue error message if limit is exceeded.
1751 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1753 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1754 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1755 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1756 * intrinsic.texi: Update documentation.
1757 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1758 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1759 gfor_fndecl_kill and gfor_fndecl_kill_sub
1760 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1762 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1763 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1764 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1766 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
1769 * trans-array.c (structure_alloc_comps): Make sure that the
1770 vptr is copied and that the unlimited polymorphic _len is used
1771 to compute the size to be allocated.
1772 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1773 unlimited polymorphic _len for the offset to the element.
1774 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1775 * trans.h : Add the boolean 'unlimited' to the prototype.
1777 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1780 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1782 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1784 * check.c (gfc_check_kill): Check pid and sig are scalar.
1785 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1786 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1787 keywords for KILL. Remove redundant *back="back" in favor of the
1788 original *bck="back".
1789 (add_subroutines): Sort keyword list. Add pid and sig keywords
1791 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1792 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1794 (gfc_resolve_rename_sub): Add comment.
1796 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1799 * simplify.c (simplify_transformation): Return default result for
1800 empty array argument.
1801 (gfc_simplify_all): Remove special-case handling for zerosize.
1802 (gfc_simplify_any): Likewise.
1803 (gfc_simplify_count): Likewise.
1804 (gfc_simplify_iall): Likewise.
1805 (gfc_simplify_iany): Likewise.
1806 (gfc_simplify_iparity): Likewise.
1807 (gfc_simplify_minval): Likewise.
1808 (gfc_simplify_maxval): Likewise.
1809 (gfc_simplify_norm2): Likewise.
1810 (gfc_simplify_product): Likewise.
1811 (gfc_simplify_sum): Likewise.
1813 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1816 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1817 the expression up the chain instead of a NULL pointer.
1819 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1823 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1825 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1829 * expr.c (simplify_parameter_variable): If p is a size zero array
1830 and not an ARRAY_EXPR insert an empty array constructor and
1832 * gfortran.h: Add prototype for gfc_is_size_zero_array.
1833 * simplify.c (is_size_zero_array): Make non-static and rename into
1834 (gfc_is_size_zero_array): Check for parameter arrays of zero
1835 size by comparing shape and absence of constructor.
1836 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1838 (gfc_simplify_count): Likewise.
1839 (gfc_simplify_iall): Likewise.
1840 (gfc_simplify_iany): Likewise.
1841 (gfc_simplify_iparity): Likewise.
1842 (gfc_simplify_minval): Likewise.
1843 (gfc_simplify_maxval): Likewise.
1844 (gfc_simplify_product): Likewise.
1845 (gfc_simplify_sum): Likewise.
1847 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1850 * primary.c (match_sym_complex_part): Give the matcher for an implied
1851 do-loop a chance to run.
1853 2018-03-03 Harald Anlauf <anlauf@gmx.de>
1856 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1857 dereference NULL pointer.
1859 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1862 * simplify.c (is_size_zero_array): New function to check for size
1864 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1865 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1866 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1867 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1868 requirements from F2018.
1870 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1873 * simplify.c (gfc_simplify_transfer): Resolve mold.
1875 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
1878 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1881 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1884 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1885 components are caf tokens.
1886 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1889 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1892 * class.c (class_array_ref_detected): Remove the condition that
1893 there be no reference after the array reference.
1894 (find_intrinsic_vtab): Remove excess whitespace.
1895 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1896 as 'base and call build_class_array_ref earlier.
1898 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
1901 * trans-stmt.c (trans_associate_var): Make sure that the se
1902 expression is a pointer type before converting it to the symbol
1905 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1908 * decl.c (variable_decl): Check that an explicit-shape-array with
1909 nonconstant bounds is allowed.
1911 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
1914 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1915 has a pre block, add it to the expression pre block.
1917 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1920 * gfortran.h (gfc_integer_4_kind): Define.
1921 * resolve.c (resolve_select_type): Make sure that the
1922 kind of c->high is gfc_integer_4_kind.
1924 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1927 * decl.c (gfc_match_data): Check for invalid substring in
1930 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1932 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1934 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1937 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1939 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1942 * interface.c (compare_actual_formal): Issue error if keyword is
1943 used in a statement function.
1945 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1948 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1949 negative unit values for kind=8 units to the kind=4 negative limit.
1951 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1954 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1955 accessing its components.
1957 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1960 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1961 before accessing its components.
1963 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1966 * trans-const.c : Clean up some whitespace issues.
1967 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1968 derived type has a kind value of zero, set it to the default
1971 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1974 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1975 argument to stop and error stop decls.
1976 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1979 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1983 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1984 gfc_int8_type node to pause_numeric, size_type_node to
1986 * trans-stmt.c (gfc_trans_pause): Likewise.
1988 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1990 * gfortran.texi: Update Coarray API description.
1991 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1992 character lengths, int for exit codes.
1993 (generate_coarray_sym_init): Use size_t for character length.
1994 * trans-intrinsic.c (conv_co_collective): Likewise.
1995 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1996 (gfc_trans_event_post_wait): Likewise.
1997 (gfc_trans_sync): Likewise.
1998 (gfc_trans_stop): Use size_t for character lengths, int for exit
2001 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
2005 * primary.c (gfc_convert_to_structure_constructor):
2006 For a constant string constructor, make sure the length
2009 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
2013 * resolve.c (resolve_assoc_var): Rearrange the logic for the
2014 determination of the character length of associate names. If
2015 the associate name is missing a length expression or the length
2016 expression is not a constant and the target is not a variable,
2017 make the associate name allocatable and deferred length.
2018 * trans-decl.c (gfc_get_symbol_decl): Null the character length
2019 backend_decl for deferred length associate names that are not
2020 variables. Set 'length' to gfc_index_zero_node for character
2021 associate names, whose character length is a PARM_DECL.
2023 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2026 * frontend-passes.c (traverse_io_block): Remove workaround for
2029 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
2031 * gfortran.texi: Document additional src/dst_type. Fix some typos.
2032 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2033 argument of _caf_*_by_ref () with * e { get, send, sendget }.
2034 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2035 data referenced when generating a call to caf_get_by_ref ().
2036 (conv_caf_send): Same but for caf_send_by_ref () and
2037 caf_sendget_by_ref ().
2039 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2042 * io.c (check_format): Allow FMT_COLON.
2044 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
2047 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2048 the typenode in the case of deferred length characters.
2050 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2053 * frontend-passes (scalarized_expr): If the expression
2054 is an assumed size array, leave in the last reference
2055 and pass AR_SECTION instead of AR_FULL to gfc_resolve
2056 in order to avoid an error.
2058 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
2061 * resolve.c (resolve_assoc_var): If a non-constant target expr.
2062 has no string length expression, make the associate variable
2063 into a deferred length, allocatable symbol.
2064 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2066 * trans-stmt.c (trans_associate_var): Null and free scalar
2067 associate names that are allocatable. After assignment, remove
2068 the allocatable attribute to prevent reallocation.
2070 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2073 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2074 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2076 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
2079 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2081 2018-02-15 Janus Weil <janus@gcc.gnu.org>
2084 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
2087 2018-02-14 Janus Weil <janus@gcc.gnu.org>
2090 * match.c (gfc_match_select_type): Fix check for selector in
2091 SELECT TYPE statement.
2093 2018-02-13 Janus Weil <janus@gcc.gnu.org>
2096 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
2098 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
2099 Janne Blomqvist <jb@gcc.gnu.org>
2101 * module.c (dump_module): Use lbasename to ensure that module
2102 files are reproducible.
2104 2018-02-12 Janus Weil <janus@gcc.gnu.org>
2107 * resolve.c (resolve_component): Fix checks of passed argument in
2108 procedure-pointer components.
2110 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2113 * resolve.c (resolve_formal_arglist): Update error message.
2115 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2117 * gfortran.texi: Fix typos in documentation of caf_register ().
2118 * trans-array.c (structure_alloc_comps): Only register a component of
2119 a derived typed corray, not of an ultimate component coarray.
2121 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
2125 * interface.c (compare_actual_formal): Add in_statement_function
2126 bool parameter. Skip check of INTENT attribute for statement
2127 functions. Arguments to a statement function cannot be optional,
2128 issue error for missing argument.
2129 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2130 in_statement_function.
2132 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
2135 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2136 flag. If the is a vector subscript or the expression is not a
2137 variable, make the descriptor one-based.
2139 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
2143 * trans-array.c (gfc_array_init_size): Revert the change made
2144 in revision 257356 setting the dtype.
2145 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2146 Call gfc_get_dtype_rank_type every time.
2149 * trans-array.c (gfc_conv_expr_descriptor): If the source array
2150 is a descriptor type, use its offset, removing the condition
2151 that is be a class expression.
2153 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2156 * match.c (gfc_match_deallocate): Check for NULL pointer.
2158 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2161 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2162 (gfc_conv_intrinsic_function): Call it.
2164 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2167 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2168 try to resolve it. While here return early if possible.
2170 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
2173 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2174 'length' if the symbol charlen backend_decl is an indirect ref.
2176 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
2180 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2181 use gfc_get_dtype_rank_type.
2183 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2187 * resolve.c (resolve_assoc_var): Generate an error if
2188 target length unknown.
2190 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2193 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
2194 to runtime, print a warning message.
2196 2018-01-31 Jakub Jelinek <jakub@redhat.com>
2199 * openmp.c (gfc_match_omp_clauses): If all the linear
2200 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2201 nor set *head = NULL. Formatting fixes.
2203 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
2206 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2207 an address expression passed to an assumed rank dummy, convert
2208 to an indirect reference.
2210 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2212 * dump-parse-tree.c (write_proc): Use sym_name (which may
2213 be sym->binding_label) instead of sym->name.
2215 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2217 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2220 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2223 * trans-expr.c (fill_with_spaces): Use memset instead of
2225 (gfc_trans_string_copy): Improve opportunity to use builtins with
2228 2018-01-30 Jakub Jelinek <jakub@redhat.com>
2231 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2232 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2234 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2237 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
2240 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2243 * frontend-passes (matmul_to_var_expr): Return early if
2244 in association list.
2245 (inline_matmul_assign): Likewise.
2247 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2250 * resolve.c (resolve_component): Ensure BIND(C) character
2251 components have length one.
2252 (resolve_symbol): Likewise for variables.
2254 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2257 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
2260 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
2261 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2262 Soren Rasmussen <s.c.rasmussen@gmail.com>
2264 Partial support for Fortran 2018 teams features.
2266 * array.c (gfc_match_array_ref): add team attribute in coarray
2268 * check.c (gfc_check_get_team, gfc_check_team_number): add new
2269 functions for get_team and team_number.
2270 * dump-parse-tree.c (show_code_node): add new statements: form team,
2271 change team, end team, and sync team.
2272 * expr.c (gfc_find_team_co): add new function.
2273 * gfortran.h: add new statements.
2274 * intrinsic.c (add_functions): add get_team and team_number functions.
2275 * intrinsic.h: add get_team and team_number prototypes for check,
2276 simplify, and resolve.
2277 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2279 * iso-fortran-env.def: add the team_type derived type.
2280 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2281 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2282 add change team, end team, form team, sync team match and functions.
2283 * match.h: add new prototypes for change team, end team, form team,
2285 * parse.c (decode_statement): add cases for change team, end team,
2286 form team, and sync team.
2287 * resolve.c: add cases for exec form team, change team, end team, and
2289 * simplify.c (gfc_simplify_get_team): add new function for get team.
2290 * st.c (gfc_free_statement): add cases exec for change team, end team,
2291 form team, sync team.
2292 * trans-decl.c (gfor_fndecl_caf_form_team)
2293 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2294 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2295 (gfor_fndecl_caf_team_number): add functions and definitions.
2296 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2297 new function and team_type argument support.
2298 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2299 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2300 * trans-stmt.h: add new prototypes.
2301 * trans-types.c (gfc_get_derived_type): check condition for team_type.
2302 * trans.c (trans_code): new exec cases for form team, change team, end
2303 team, and sync team.
2304 * trans.h: add new prototypes.
2306 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
2309 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
2310 or .false. The summation does the correct type conversion.
2311 (gfc_simplify_dot_product): Special case zero-sized arrays.
2313 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
2316 * array.c (gfc_match_array_ref): If standard earlier than F2008
2317 it is an error if the reference dimension is greater than 7.
2318 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2319 dtype masks and shifts accordingly.
2320 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2321 type node to check the field.
2322 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
2323 (duplicate_allocatable_coarray): Access the rank field of the
2324 dtype descriptor rather than the dtype itself.
2325 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
2326 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2328 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2329 get_scalar_to_descriptor_type if the actual expression is a
2331 (gfc_trans_structure_assign): Assign the rank directly to the
2333 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2334 to default integer kind.
2335 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
2336 'elem_len' field of the dtype.
2337 * trans-io.c (gfc_build_io_library_fndecls): Replace
2338 gfc_int4_type_node with dtype_type_node where necessary.
2339 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
2341 * trans-types.c : Provide 'get_dtype_type_node' to acces the
2342 dtype_type_node and, if necessary, build it.
2343 The maximum size of an array element is now determined by the
2344 maximum value of size_t.
2345 Update the description of the array descriptor, including the
2346 type def for the dtype_type.
2347 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
2348 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2349 (gfc_get_array_descriptor_base): Change the type of the dtype
2350 field to dtype_type_node.
2351 (gfc_get_array_descr_info): Get the offset to the rank field of
2353 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2354 * trans.h : Define the indices of the dtype fields.
2356 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2359 * decl.c (gfc_match_derived_decl): If eos not matched, recover
2360 and emit error about garbage after declaration.
2362 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2365 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2368 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
2372 * arith.c (gfc_arith_concat): Use size_t for string length.
2373 (gfc_compare_string): Likewise.
2374 (gfc_compare_with_Cstring): Likewise.
2375 * array.c (gfc_resolve_character_array_constructor): Use
2376 HOST_WIDE_INT, gfc_mpz_get_hwi.
2377 * check.c (gfc_check_fe_runtime_error): Use size_t.
2378 * data.c (create_character_initializer): Use HOST_WIDE_INT,
2380 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2381 (add_init_expr_to_sym): Use HOST_WIDE_INT.
2382 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2384 (gfc_apply_init): Likewise.
2385 * match.h (gfc_set_constant_character_len): Update prototype.
2386 * primary.c (match_string_constant): Use size_t.
2387 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2389 * simplify.c (init_result_expr): Likewise.
2390 (gfc_simplify_len_trim): Use size_t.
2391 * target-memory.c (gfc_encode_character): Use size_t.
2392 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2393 (interpret_array): Use size_t.
2394 (gfc_interpret_character): Likewise.
2395 * target-memory.h (gfc_encode_character): Update prototype.
2396 (gfc_interpret_character): Likewise.
2397 (gfc_target_interpret_expr): Likewise.
2398 * trans-const.c (gfc_build_string_const): Use size_t for length
2400 (gfc_build_wide_string_const): Likewise.
2401 * trans-const.h (gfc_build_string_const): Likewise.
2402 (gfc_build_wide_string_const): Likewise.
2404 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2407 * simplify.c (gfc_simplify_matmul): Set return type correctly.
2409 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2412 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2414 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2417 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2419 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2422 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2424 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
2427 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2428 from symbol marked unlimited polymorphic.
2429 * resolve.c (resolve_structure_cons): Likewise.
2430 * misc.c (gfc_typename): Don't dereference derived->components
2433 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2436 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2437 (gfc_logical_4_kind): New macro
2438 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2439 (gfc_simplify_maxloc): Likewise.
2440 (gfc_resolve_maxloc): Likewise.
2441 (gfc_resolve_minloc): Likewise.
2442 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
2443 argument; also raise error if it is used (for now). Add it
2444 if it isn't present.
2445 * intrinsic.c (add_sym_4ml): Rename to
2446 (add_sym_5ml), adjust for extra argument.
2447 (add_functions): Add "back" constant. Adjust maxloc and minloc
2449 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2450 not of gfc_logical_4_kind, convert.
2451 (gfc_resolve_minloc): Likewise.
2452 * simplify.c (gfc_simplify_minloc): Add back argument.
2453 (gfc_simplify_maxloc): Likewise.
2454 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2455 argument to %VAL to ensure passing by value.
2456 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2457 also for library calls.
2459 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2462 * resolve.c (resolve_transfer): Delete code looking for 'DT'
2463 format specifiers in format strings. Set formatted to true if a
2464 format string or format label is present.
2465 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2468 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2471 * dump-parse-tree.c (get_c_type_name): Remove extra line.
2472 Change for loop to use declaration in for loop. Handle BT_LOGICAL
2474 (write_decl): Add where argument. Fix indentation. Replace
2475 assert with error message. Add typename to warning
2477 (write_type): Adjust locus to call of write_decl.
2478 (write_variable): Likewise.
2479 (write_proc): Likewise. Replace assert with error message.
2481 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
2484 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2485 the rhs expression is neither an elemental nor a conversion
2489 * trans-array.c (is_pointer_array): Remove unconditional return
2490 of false for -fopenmp.
2492 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2496 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
2499 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2502 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
2504 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2507 * resolve.c (resolve_charlen): Check the type of cl->length
2510 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2513 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2515 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2518 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2519 LHS type when assigning.
2521 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2524 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2526 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2528 * match.c (gfc_match_allocate): Check for NULL pointer.
2530 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2532 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2534 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
2537 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2538 an initializer, convert the kind parameters and add to the
2539 component if the instance.
2540 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2541 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2542 for parameterized arrays. Clean up typos in comments. Convert
2543 parameterized array initializers and copy into the array.
2544 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2545 parameterized types.
2546 *trans-stmt.c (trans_associate_var): Deallocate associate vars
2547 as necessary, when they are PDT function results for example.
2550 * trans-array.c (structure_alloc_comps): Only compare len parms
2551 when they are declared explicitly.
2553 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
2556 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2559 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
2563 * array.c (got_charlen): Use gfc_charlen_int_kind.
2564 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2566 (find_intrinsic_vtab): Likewise.
2567 * decl.c (match_char_length): Use gfc_charlen_int_kind.
2568 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2569 (gfc_match_implicit): Use gfc_charlen_int_kind.
2570 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2571 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2572 * expr.c (gfc_get_character_expr): Length parameter of type
2574 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2575 (gfc_extract_hwi): New function.
2576 (simplify_const_ref): Make string_len of type gfc_charlen_t.
2577 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2578 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2579 * gfortran.h (gfc_mpz_get_hwi): New prototype.
2580 (gfc_mpz_set_hwi): Likewise.
2581 (gfc_charlen_t): New typedef.
2582 (gfc_expr): Use gfc_charlen_t for character lengths.
2583 (gfc_size_kind): New extern variable.
2584 (gfc_extract_hwi): New prototype.
2585 (gfc_get_character_expr): Use gfc_charlen_t for character length.
2586 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2587 * gfortran.texi: Update description of hidden string length argument.
2588 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2589 (gfc_resolve_char_achar): Likewise.
2590 (gfc_resolve_repeat): Pass string length directly without
2591 temporary, use gfc_charlen_int_kind.
2592 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2593 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2594 * misc.c (gfc_mpz_get_hwi): New function.
2595 (gfc_mpz_set_hwi): New function.
2596 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2597 (parse_integer): Don't complain about large integers.
2598 (write_atom): Use HOST_WIDE_INT for integers.
2599 (mio_integer): Handle integer type mismatch.
2600 (mio_hwi): New function.
2601 (mio_intrinsic_op): Use HOST_WIDE_INT.
2602 (mio_array_ref): Likewise.
2603 (mio_expr): Likewise.
2604 * primary.c (match_substring): Use gfc_charlen_int_kind.
2605 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2606 (resolve_character_operator): Likewise.
2607 (resolve_assoc_var): Likewise.
2608 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2609 (resolve_charlen): Use mpz_sgn to determine sign.
2610 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2612 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2613 * target-memory.c (size_character): Length argument of type
2615 (gfc_encode_character): Likewise.
2616 (gfc_interpret_character): Use gfc_charlen_t.
2617 * target-memory.h (gfc_encode_character): Modify prototype.
2618 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2619 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2620 (trans_array_constructor): Use existing type.
2621 (get_array_charlen): Likewise.
2622 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2623 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2624 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2625 (add_argument_checking): Likewise.
2626 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2627 gfc_charlen_type_node.
2628 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2629 4, fold_convert to correct type.
2630 (gfc_conv_class_to_class): Build const of type size_type_node for
2632 (gfc_copy_class_to_class): Likewise.
2633 (gfc_conv_string_length): Use same type in expression.
2634 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2635 (gfc_conv_string_tmp): Make sure len is of the right type.
2636 (gfc_conv_concat_op): Use same type in expression.
2637 (gfc_conv_procedure_call): Likewise.
2638 (fill_with_spaces): Comment out memset() block due to spurious
2639 -Wstringop-overflow warnings.
2640 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2641 (alloc_scalar_allocatable_for_subcomponent_assignment):
2642 fold_convert to right type.
2643 (gfc_trans_subcomponent_assign): Likewise.
2644 (trans_class_vptr_len_assignment): Build const of correct type.
2645 (gfc_trans_pointer_assignment): Likewise.
2646 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2648 (trans_class_assignment): Build const of correct type.
2649 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2650 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2651 * trans-io.c (gfc_build_io_library_fndecls): Use
2652 gfc_charlen_type_node for character lengths.
2653 (set_string): Convert to right type in assignment.
2654 * trans-stmt.c (gfc_trans_label_assign): Build const of
2655 gfc_charlen_type_node.
2656 (trans_associate_var): Likewise.
2657 (gfc_trans_character_select): Likewise.
2658 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2659 (gfc_trans_deallocate): Don't typecast strlen result.
2660 * trans-types.c (gfc_size_kind): New variable.
2661 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2662 from size_type_node.
2663 * trans-types.h: Fix comment.
2665 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2669 * check.c (gfc_check_eoshift): Check for string length and
2670 for conformance of boundary.
2671 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2672 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2673 * simplify.c (gfc_simplify_eoshift): New function.
2675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2676 Alan Hayward <alan.hayward@arm.com>
2677 David Sherwood <david.sherwood@arm.com>
2679 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2682 Alan Hayward <alan.hayward@arm.com>
2683 David Sherwood <david.sherwood@arm.com>
2685 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2687 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2690 * check.c (gfc_check_eoshift): Error for missing boundary if array
2691 is not one of the standard types.
2693 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2695 Update copyright years.
2697 * gfortranspec.c (lang_specific_driver): Update copyright notice
2699 * gfc-internals.texi: Bump @copying's copyright year.
2700 * gfortran.texi: Ditto.
2701 * intrinsic.texi: Ditto.
2702 * invoke.texi: Ditto.
2704 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2707 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2708 gfc_simplify_minloc to maxloc and minloc, respectively.
2709 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2710 and gfc_simplify_maxloc.
2711 * simplify.c (min_max_chose): Adjust prototype. Modify function
2712 to have a return value which indicates if the extremum was found.
2713 (is_constant_array_expr): Fix typo in comment.
2714 (simplify_minmaxloc_to_scalar): New function.
2715 (simplify_minmaxloc_nodim): New function.
2716 (new_array): New function.
2717 (simplify_minmaxloc_to_array): New function.
2718 (gfc_simplify_minmaxloc): New function.
2719 (simplify_minloc): New function.
2720 (simplify_maxloc): New function.
2722 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2726 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2729 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
2732 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2733 allocatable and pointer scalars, when -fcoarray selected.
2734 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2735 field as well as the backend_decl.
2736 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2737 derived types that are not vtypes. Components with caf_token
2738 attribute are pvoid types. For a component requiring it, find
2739 the caf_token field and have the component token field point to
2743 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2744 field to the descriptor even when codimen not set.
2746 Copyright (C) 2018 Free Software Foundation, Inc.
2748 Copying and distribution of this file, with or without modification,
2749 are permitted in any medium without royalty provided the copyright
2750 notice and this notice are preserved.
2753 * decl.c (var_element): Inquiry parameters cannit be data objects.
2755 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2758 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
2759 Check for a NULL pointer.
2761 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2764 * class.c (insert_component_ref): Check for NULL pointer and
2765 previous error message issued.
2766 * parse.c (parse_associate): Check for NULL pointer.
2767 * resolve.c (resolve_assoc_var): Check for NULL pointer.
2769 2018-12-07 Jakub Jelinek <jakub@redhat.com>
2772 * trans-openmp.c (gfc_omp_clause_default_ctor,
2773 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2774 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
2775 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
2778 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
2779 Mark Eggleston <mark.eggleston@codethink.co.uk>
2782 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
2783 (set_dec_flags): Set/unset DEC and std flags according to value.
2784 (post_dec_flags, set_init_local_zero): New functions.
2785 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
2786 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
2788 <case OPT_finit_local_zero>: Use set_init_local_zero.
2789 <case OPT_fdec>: Pass value to set_dec_flags.
2790 <case OPT_fdec_structure>: Remove.
2792 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
2794 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
2797 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
2800 2018-11-27 Martin Liska <mliska@suse.cz>
2802 * decl.c (gfc_match_gcc_builtin): New function.
2803 * gfortran.h (struct vect_builtin_tuple): New.
2804 (gfc_adjust_builtins): Likewise.
2805 * lang-specs.h (TARGET_F951_OPTIONS): New.
2806 (F951_OPTIONS): Use it.
2807 * lang.opt: Add new option -fpre-include.
2808 * match.h (gfc_match_gcc_builtin): Declare new function.
2809 * parse.c (decode_gcc_attribute): Handle builtin.
2810 (parse_progunit): Call gfc_adjust_builtins.
2811 * scanner.c (gfc_new_file): Load pre-included header file
2813 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
2814 (gfc_adjust_builtins): Likewise.
2816 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
2819 * resolve.c (resolve_variable): Check for associate names with
2822 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2824 * lang.opt (fpad-source): New option.
2825 * scanner.c (load_line): Don't pad fixed form lines if
2827 * invoke.texi (-fno-pad-source): Document.
2829 2018-11-21 Jakub Jelinek <jakub@redhat.com>
2831 * invoke.texi (-fdec-include): Document.
2833 2018-11-21 Jakub Jelinek <jakub@redhat.com>
2834 Mark Eggleston <mark.eggleston@codethink.com>
2836 * lang.opt (fdec-include): New option.
2837 * options.c (set_dec_flags): Set also flag_dec_include.
2838 * scanner.c (include_line): Change return type from bool to int.
2839 In fixed form allow spaces in between include keyword letters.
2840 For -fdec-include, allow in fixed form 0 in column 6. With
2841 -fdec-include return -1 if the parsed line is not full include
2842 statement and it could be successfully completed on continuation
2844 (include_stmt): New function.
2845 (load_file): Adjust include_line caller. If it returns -1, keep
2846 trying include_stmt until it stops returning -1 whenever adding
2847 further line of input.
2849 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2852 * frontend-passes.c (combine_array_constructor): Do not do
2853 anything if in a WHERE statement.
2855 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
2858 * expr.c (gfc_check_assign): Reject assigning to an external
2860 (gfc_check_pointer_assign): Add suppress_type_test
2861 argument. Insert line after if. A non-proc pointer can not point
2862 to a constant. Only check types if suppress_type_test is false.
2863 * gfortran.h (gfc_check_pointer_assign): Add optional
2864 suppress_type_test argument.
2865 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
2866 and give it the extra argument.
2867 (resolve_fl_procedure): Set error on value for a function with
2870 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2873 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
2875 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2877 * cpp.c: Replace "source_location" with "location_t".
2878 * gfortran.h: Likewise.
2880 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2882 * trans-openmp.c (gfc_trans_omp_clauses): Use
2883 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
2884 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
2885 rather than OMP_ATOMIC_SEQ_CST.
2886 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
2887 make_node instead of build1_loc.
2888 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2889 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2890 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2891 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2892 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2893 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2894 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
2896 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2899 * decl.c (verify_bind_c_sym): Remove unnecessary space
2902 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2905 * frontend-passes.c (constant_string_length): If there is a
2906 substring with a length which cannot be reduced to a constant,
2909 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
2912 * dependency.c (are_identical_variables): Return false if the
2913 inquiry refs are not the same.
2914 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
2915 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
2916 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
2917 (gfc_copy_ref): Copy the inquiry ref types.
2918 (find_inquiry_ref): New function.
2919 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
2920 to simplify_ref_chain.
2921 (gfc_simplify_expr): Use the new arg in call to
2923 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
2925 (gfc_traverse_expr): Return true for inquiry ref.
2926 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
2927 * gfortran.h : Add enums and union member in gfc_ref to
2928 implement inquiry refs.
2929 * intrinsic.c : Fix white nois.
2930 * match.c (gfc_match_assignment): A constant lavlue is an
2932 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
2934 (mio_ref): Handle inquiry refs.
2935 * primary.c (is_inquiry_ref): New function.
2936 (gfc_match_varspec): Handle inquiry refs calling new function.
2937 (gfc_variable_attr): Detect inquiry ref for disambiguation
2939 (caf_variable_attr): Treat inquiry and substring refs in the
2941 * resolve.c (find_array_spec): ditto.
2942 (gfc_resolve_substring_charlen): If there is neither a charlen
2943 ref not an inquiry ref, return.
2944 (resolve_ref): Handle inqiry refs as appropriate.
2945 (resolve_allocate_expr): Entities with an inquiry ref cannot be
2947 * simplify.c (simplify_bound, simplify_cobound): Punt on
2949 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
2951 *trans-expr.c (conv_inquiry): New function.
2952 (gfc_conv_variable): Retain the last typespec to pass to
2953 conv_inquiry on detecting an inquiry ref.
2955 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2958 * decl.c (verify_bind_c_sym): Improve error message.
2960 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2963 * gfortran.texi (File format of unformatted sequential files):
2964 Replace random comma with period.
2965 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
2966 (FINDLOC): Document.
2967 (MAXLOC): Add refrence to FINDLOC.
2970 2018-10-31 Nathan Sidwell <nathan@acm.org>
2972 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
2974 2018-10-31 Martin Liska <mliska@suse.cz>
2976 * trans-decl.c (struct module_hasher): Call htab_hash_string
2977 for s->name and not for s.
2979 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2982 * simplify.c (simplify_min_max): Do not convert the type of the
2985 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
2988 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
2989 (gfc_check_f): Add f6fl field.
2990 (gfc_simplify_f): Add f6 field.
2991 (gfc_resolve_f): Likewise.
2992 (gfc_type_letter): Add optional logical_equas_int flag.
2993 * check.c (intrinsic_type_check): New function.
2994 (gfc_check_findloc): New function.
2995 * intrinsics.c (gfc_type_letter): If logical_equals_int is
2996 set, act accordingly.
2997 (add_sym_5ml): Reformat comment.
2998 (add_sym_6fl): New function.
2999 (add_functions): Add findloc.
3000 (check_arglist): Add sixth argument, handle it.
3001 (resolve_intrinsic): Likewise.
3002 (check_specific): Handle findloc.
3003 * intrinsic.h (gfc_check_findloc): Add prototype.
3004 (gfc_simplify_findloc): Likewise.
3005 (gfc_resolve_findloc): Likewise.
3006 (MAX_INTRINSIC_ARGS): Adjust.
3007 * iresolve.c (gfc_resolve_findloc): New function.
3008 * simplify.c (gfc_simplify_minmaxloc): Make static.
3009 (simplify_findloc_to_scalar): New function.
3010 (simplify_findloc_nodim): New function.
3011 (simplify_findloc_to_array): New function.
3012 (gfc_simplify_findloc): New function.
3013 (gfc_conv_intrinsic_findloc): New function.
3014 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
3015 (gfc_is_intrinsic_libcall): Likewise.
3017 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3020 * frontend-passes.c (check_locus_code): Add information that
3021 warning about missing location information points to an
3022 inconsisten internal state.
3023 (check_locus_expr): Likewise.
3025 2018-10-25 Jakub Jelinek <jakub@redhat.com>
3028 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
3029 nonmonotonic modifiers regardless of if they have been parsed
3030 already or if the opposite one has. Fix up check whether
3031 comma after modifier should be parsed.
3032 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
3034 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
3037 * frontend-passes.c (get_len_call): New function to generate a
3038 call to intrinsic LEN.
3039 (create_var): Use this to make length expressions for variable
3041 Clean up some white space issues.
3043 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
3046 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
3047 length for array valued deferred length lhs.
3049 2018-10-18 Tobias Burnus <burnus@net-b.de>
3052 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
3055 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3058 * trans-stmt.c (trans_associate_var): All strings that return
3059 as pointer types can be assigned directly to the associate
3060 name so remove 'attr' and the condition that uses it.
3062 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3065 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
3066 initialization with NULL() of a deferred length pointer.
3068 2018-10-17 Tobias Burnus <burnus@net-b.de>
3071 * resolve.c (resolve_select_type): Use correct variable.
3073 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3075 * Make-lang.in (selftest-fortran): New.
3077 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
3084 * resolve.c (resolve_variable): Fix up expressions with array
3085 associate names, where the parser did not detect that this is
3086 array and there was no array part_ref in the expression.
3088 2018-10-16 Tobias Burnus <burnus@net-b.de>
3091 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
3092 Rename argument e3_is_array_constr to e3_has_nodescriptor
3093 and update comments.
3094 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
3095 to 1 for nonalloc/nonpointer func results/vars besides
3098 2018-10-16 Tobias Burnus <burnus@net-b.de>
3101 * trans-stmt.c (form_team, change_team, sync_team):
3102 Don't ignore argse.pre/argse.post.
3104 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
3105 Tobias Burnus <burnus@gcc.gnu.org>
3108 * resolve.c (resolve_assoc_var): Add missing array spec for
3109 class associate names.
3110 (resolve_select_type): Handle case where last typed component
3111 of the selector has a different type to the expression.
3112 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
3113 call to gfc_expr_to_initialize with call to gfc_copy_expr.
3114 (gfc_conv_class_to_class): Guard assignment to 'len' field
3115 against case where zero constant is supplied.
3117 2018-10-12 Tobias Burnus <burnus@net-b.de>
3120 * expr.c (gfc_simplify_expr): Avoid simplifying
3121 the 'array' argument to lbound/ubound/lcobound/
3124 2018-10-12 Tobias Burnus <burnus@net-b.de>
3127 * decl.c (get_proc_name): Return with error before
3130 2018-10-11 Tobias Burnus <burnus@net-b.de>
3133 2018-10-09 Tobias Burnus <burnus@net-b.de>
3136 * resolve.c (resolve_ref): Reject nonscalar
3137 substring references.
3139 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3141 * cpp.c (gfc_cpp_init_0): Update for renamings.
3142 (cb_cpp_error): Rename to...
3143 (cb_cpp_diagnostic): ...this, converting level and reason to
3146 2018-10-09 Tobias Burnus <burnus@net-b.de>
3149 * resolve.c (resolve_ref): Reject nonscalar
3150 substring references.
3152 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
3155 * trans-array.c (gfc_get_array_span): Deal with deferred char
3156 array components having a TYPE_MAX_VALUE of zero.
3157 (gfc_array_init_size): Use the hidden string length component
3158 to build the descriptor dtype.
3159 (gfc_array_allocate): Remove the erroneous replacement of the
3160 charlen backend decl with a temporary.
3161 (gfc_conv_expr_descriptor): Use the ss_info string length in
3162 the case of deferred character components.
3163 (gfc_alloc_allocatable_for_assignment): Actually compare the
3164 string lengths for deferred characters. Make sure that kind > 1
3165 is handled correctly. Set the span field of the descriptor.
3166 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
3170 * trans-array.c (gfc_array_allocate): Set the span field for
3171 variable length character arrays.
3173 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
3175 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
3176 contiguous pointer from non-contiguous target" to a warning.
3178 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
3181 * trans-stmt.c (trans_associate_var): Character associate names
3182 with variable string length do not have to be deferred length
3183 for the string length to be set, if variable.
3185 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3188 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
3189 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
3190 (gfc_arith_concat): If the types of op1 and op2 are not
3191 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
3193 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
3196 * resolve.c (resolve_fl_procedure): Include class functions in
3197 the test that elemental function results be scalar.
3199 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3202 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
3203 by one. Set extents one past the array boundaries to zero to avoid
3204 warning with instrumented compiler.
3205 (gfc_simplify_eoshift): Likewise, only for ss_ex.
3207 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
3210 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
3211 character length pointer initializer has the right type to fix
3212 problem with deferred_character_24.f90 on big endian.
3214 2018-10-03 Jeff Law <law@redhat.comg>
3216 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
3218 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
3221 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
3222 flag in the call to gfc_check_dependency.
3224 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3227 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
3228 introduced by r264358, which prevented components of associate
3229 names from being reallocated on assignment.
3231 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3235 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
3236 deferred type and the info->descriptor is present, use the
3238 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
3239 it as 'decl' rather than the symbol backend_decl.
3240 (gfc_array_allocate): If the se string_length is a component
3241 reference, fix it and use it for the expression string length
3242 if the latter is not a variable type. If it is a variable do
3243 an assignment. Make use of component ref string lengths to set
3244 the descriptor 'span'.
3245 (gfc_conv_expr_descriptor): For pointer assignment, do not set
3246 the span field if gfc_get_array_span returns zero.
3247 * trans.c (get_array_span): If the upper bound a character type
3248 is zero, use the descriptor span if available.
3250 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3253 * trans-decl.c (gfc_get_symbol_decl): A deferred character
3254 length pointer that is initialized needs the string length to
3255 be initialized as well.
3257 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
3260 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
3261 fix the rse stringlength.
3263 2018-09-25 Martin Liska <mliska@suse.cz>
3266 * decl.c (add_hidden_procptr_result): Simplify condition
3267 as we are in branch witch 'case1 || case2'.
3269 2018-09-25 Martin Liska <mliska@suse.cz>
3271 * trans.c (remove_suffix): Remove
3274 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3277 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3278 for variables in an associate statement.
3280 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
3281 Cesar Philippidis <cesar@codesourcery.com>
3283 * openmp.c (resolve_oacc_loop_blocks):
3285 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3288 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3289 for variables having the dimension attribute.
3291 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
3293 * trans-expr.c (gfc_caf_get_image_index): Do array index
3294 calculations in gfc_array_index_type.
3295 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
3296 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
3297 (gfc_trans_event_post_wait): Likewise.
3299 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3302 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
3303 clobber on INTENT(OUT) for saved variables.
3305 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3308 * trans.h (gfc_conv_expr_reference): Add optional argument
3309 add_clobber to prototype.
3310 (gfc_conv_procedure_call): Set add_clobber argument to
3311 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
3312 non-pointer, non-allocatable, non-dummy variables whose type
3313 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
3314 the procedure is not elemental.
3315 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
3316 statement before call if add_clobber is set.
3318 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
3321 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
3322 the charlen backend_decl before using the VAR_P macro.
3324 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3327 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
3328 rhs has a charlen expression, convert that and use it.
3329 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3330 assignment of deferred character array vars to a realocatable
3331 lhs should not be added to the exterior block since vector
3332 indices, for example, generate temporaries indexed within the
3335 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3338 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
3339 components if must_finalize is set for expr3.
3341 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3342 Kwok Cheung Yeung <kcy@codesourcery.com>
3344 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
3345 argument of a call to _gfortran_caf_register is of size_type_node.
3346 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
3347 index to a size_type_node type.
3348 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
3350 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3352 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
3354 2018-09-20 Janus Weil <janus@gcc.gnu.org>
3356 * gfortran.h (gfc_str_startswith): New macro.
3357 * decl.c (variable_decl, gfc_match_end): Use it.
3358 * iresolve.c (is_trig_resolved): Ditto.
3359 * module.c (load_omp_udrs, read_module): Ditto.
3360 * options.c (gfc_handle_runtime_check_option): Ditto.
3361 * primary.c (match_arg_list_function): Ditto.
3362 * trans-decl.c (gfc_get_symbol_decl): Ditto.
3363 * trans-expr.c (gfc_conv_procedure_call): Ditto.
3364 * interface.c (dtio_op): Replace strncmp by strcmp.
3365 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
3366 * trans-expr.c (conv_arglist_function): Ditto.
3367 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
3368 STARTS_WITH by gfc_str_startswith.
3370 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
3372 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
3373 and reorder the switch cases to match the enum in gfortran.h.
3375 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
3378 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3379 assignment of deferred character intrinsic elemental function
3380 results to a realocatable lhs must not be added to the exterior
3381 block if they are array valued but must go to the loop body.
3383 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3386 * gfortran.h (gfc_expr): Add external_blas flag.
3387 * frontend-passes.c (matrix_case): Add case A2TB2T.
3388 (optimize_namespace): Handle flag_external_blas by
3389 calling call_external_blas.
3390 (get_array_inq_function): Add argument okind. If
3391 it is nonzero, use it as the kind of argument
3393 (inline_limit_check): Remove m_case argument, add
3394 limit argument instead. Remove assert about m_case.
3395 Set the limit for inlining from the limit argument.
3396 (matmul_lhs_realloc): Handle case A2TB2T.
3397 (inline_matmul_assign): Handle inline limit for other cases with
3398 two rank-two matrices. Remove no-op calls to inline_limit_check.
3399 (call_external_blas): New function.
3400 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
3401 argument to external BLAS if external_blas is already set.
3403 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3406 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3407 assignment of deferred character elemental function results to
3408 a realocatable lhs must not be added to the exterior block but
3409 must go to the loop body.
3411 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3414 * trans-array.c (gfc_get_array_span): Try to get the element
3415 length of incomplete types. Return NULL_TREE otherwise.
3416 (gfc_conv_expr_descriptor): Only set the 'span' field if the
3417 above does not return NULL_TREE. Set 'span' field if possible
3418 for all new descriptors.
3420 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3423 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
3424 characters with a variable length expression for deferred init.
3425 (gfc_trans_deferred_vars): Perform the assignment for these
3426 symbols by calling gfc_conv_string_length.
3428 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3431 * resolve.c (resolve_assoc_var): If the target expression is a
3432 deferred charlen dummy and the associate name shares the
3433 charlen, generate a new one. Make sure that new charlens are in
3434 the namespace list so that they get cleaned up.
3435 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
3437 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
3438 length dummy and result arrays on the deferred initialization
3439 list so that the variable length arrays can be correctly dealt
3441 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
3442 NULL rather than ICEing..
3444 2018-09-16 Janus Weil <janus@gcc.gnu.org>
3448 * match.c (gfc_match_assignment): For a polymorphic assignment,
3449 make sure that the vtab for the rhs type is generated.
3451 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
3454 * frontend-passes.c (B_ERROR): New macro for matmul bounds
3455 checking error messages.
3456 (C_ERROR): Likewise.
3457 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
3460 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3462 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
3463 from overlength string initializers.
3465 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
3468 * trans-expr.c (gfc_trans_class_init_assign): Access to
3469 to array elements of the dynamic type requires that the array
3470 reference be added to the class expression and not the _data
3471 component, unlike scalar expressions.
3473 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3476 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
3477 attribute, then it was declared in another module, so there should be
3478 no error that it has not been declared.
3480 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
3483 * expr.c (is_subref_array): Add the check of dimensionality for
3484 class, dummy, pointer arrays.
3486 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3489 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
3490 with non-polymorphic objects.
3492 2018-09-10 Janus Weil <janus@gcc.gnu.org>
3495 * decl.c (match_binding_attributes): Use correct default accessibility
3496 for procedure pointer components.
3498 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3500 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
3501 'P' is zero and issue an error if it is.
3503 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
3507 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
3508 info->descriptor but pass it directly to gfc_build_array_ref.
3509 (gfc_conv_array_ref): Likewise for se->expr.
3510 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
3511 obtain the span field directly from it.
3513 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
3516 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
3517 scalar results being passed to a derived type formal argument
3518 are finalized if possible. Otherwise, rely on existing code for
3519 deallocation. Make the deallocation of allocatable result
3520 components conditional on finalization not taking place. Make
3521 the freeing of data components after finalization conditional
3522 on the data being NULL.
3523 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
3524 condition to return NULL_TREE.
3525 (gfc_trans_assignment_1): If the assignment is class to class
3526 and the rhs expression must be finalized but the assignment
3527 is not marked as a polymorphic assignment, use the vptr copy
3528 function instead of gfc_trans_scalar_assign.
3531 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
3532 block to the pre block if the expression is to be finalized.
3533 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
3534 finalized, load the post block into a finalization block and
3535 add it right at the end of the allocation block.
3537 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3540 * error.c (gfc_format_decoder): Update for conversion of
3541 show_caret_p to a tri-state.
3543 2018-08-25 Janus Weil <janus@gcc.gnu.org>
3546 * resolve.c (resolve_transfer): Correctly determine typespec for
3547 generic function calls, in order to throw a proper error.
3549 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3552 * frontend-passes.c (var_in_expr_callback): New function.
3553 (var_in_expr): New function.
3554 (traverse_io_block): Use var_in_expr instead of
3555 gfc_check_dependency for checking if the variable depends on the
3556 previous interators.
3558 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
3560 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
3561 HONOR_SIGNED_ZEROS checks.
3563 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
3566 * resolve.c (resolve_typebound_call): If the TBP is not marked
3567 as a subroutine, check the specific symbol.
3569 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3571 * gfortran.texi: Mention that asynchronous I/O does
3572 not work on systems which lack condition variables, such
3575 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3578 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
3581 2018-08-22 Andrew Benson <abensonca@gmail.com>
3583 * module.c (load_generic_interfaces): Move call to find_symbol()
3584 so that only occurs if actually needed.
3586 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3589 * decl.c (gfc_match_data_decl): Allow allocatable components of
3590 indirectly recursive type.
3591 * resolve.c (resolve_component): Remove two errors messages ...
3592 (resolve_fl_derived): ... and replace them by a new one.
3594 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
3596 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
3597 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
3598 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
3601 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
3602 Thomas Koenig <tkoenig@gcc.gnu.org>
3605 * gfortran.texi: Add description of asynchronous I/O.
3606 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3608 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3609 st_wait_async and change argument spec from ".X" to ".w".
3610 (gfc_trans_wait): Pass ID argument via reference.
3612 2018-08-16 Nathan Sidwell <nathan@acm.org>
3614 * cpp.c (dump_macro): Use cpp_user_macro_p.
3616 2018-08-14 Janus Weil <janus@gcc.gnu.org>
3619 * interface.c (compare_type): Remove a CLASS/TYPE check.
3620 (compare_type_characteristics): New function that behaves like the old
3622 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
3623 Call 'compare_type_characteristics' instead of 'compare_type'.
3625 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3628 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
3629 elements are returned as references to the data element. Get
3630 the class expression by stripping back the references. Use this
3631 for the element size.
3633 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3636 * resolve.c (resolve_fl_variable_derived): Check if the derived
3637 type is use associated before checking for the host association
3640 2018-08-10 Janus Weil <janus@gcc.gnu.org>
3643 * invoke.texi (frontend-optimize): Mention short-circuiting.
3644 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
3645 * resolve.c (resolve_operator): Warn about short-circuiting only with
3646 -ffrontend-optimize.
3647 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
3648 with -ffrontend-optimize. Without that flag, make sure that both
3649 operands are evaluated.
3651 2018-08-08 Nathan Sidwell <nathan@acm.org>
3653 * cpp.c (cb_file_change): Use linemap_included_from.
3655 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
3657 * trans-stmt.h: Remove stale reference to trans-openacc.c.
3659 2018-08-04 Janus Weil <janus@gcc.gnu.org>
3662 * interface.c (gfc_compare_interfaces): Apply additional
3663 distinguishability criteria of F08 to operator interfaces.
3665 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
3667 Revert 'AsyncI/O patch committed'
3668 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3669 Thomas Koenig <tkoenig@gcc.gnu.org>
3672 * gfortran.texi: Add description of asynchronous I/O.
3673 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3675 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3676 st_wait_async and change argument spec from ".X" to ".w".
3677 (gfc_trans_wait): Pass ID argument via reference.
3679 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3680 Thomas Koenig <tkoenig@gcc.gnu.org>
3683 * gfortran.texi: Add description of asynchronous I/O.
3684 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3686 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3687 st_wait_async and change argument spec from ".X" to ".w".
3688 (gfc_trans_wait): Pass ID argument via reference.
3690 2018-07-20 Martin Sebor <msebor@redhat.com>
3693 * gfortran.h (gfc_handle_option): Change function argument
3695 * options.c (gfc_handle_option): Same.
3697 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
3699 * gfortran.h (gfc_symbol): Add pointer to next derived type.
3700 (gfc_dt_list, gfc_get_dt_list): Remove.
3701 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
3702 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
3703 simple nullification of gfc_derived_types.
3704 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
3706 (add_dt_to_dt_list): Change derived type linked list insertion to
3707 utilize dt_next pointers in gfc_symbol.
3708 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
3709 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
3710 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
3711 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
3712 * trans-types.c (gfc_get_derived_type): Change derived type linked
3713 list search to utilize dt_next pointers in gfc_symbol.
3715 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3717 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
3718 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
3720 2018-07-18 Janus Weil <janus@gcc.gnu.org>
3721 Thomas Koenig <tkoenig@gcc.gnu.org>
3724 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
3725 * frontend-passes.c (do_warn_function_elimination): Do not warn for
3727 * gfortran.h: Add prototypes for gfc_pure_function and
3728 gfc_implicit_pure_function.
3729 * gfortran.texi: Add chapter on evaluation of logical expressions.
3730 * invoke.texi: Mention that -Wfunction-elimination is implied
3732 * lang.opt: Make -Wextra imply -Wfunction-elimination.
3733 * resolve.c (pure_function): Rename to gfc_pure_function.
3734 (gfc_implicit_pure_function): New function.
3735 (check_pure_function): Use it here.
3736 (impure_function_callback): New function.
3737 (resolve_operator): Call it via gfc_expr_walker.
3739 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3742 * decl.c (match_old_style_init): Initialize locus of variable expr when
3743 creating a data variable.
3744 (match_clist_expr): Verify array is explicit shape/size before
3745 attempting to allocate constant array constructor.
3747 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3750 * module.c (mio_component): Set component->loc when loading from module.
3752 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3755 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
3757 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
3758 on linear clauses. Initialize n->where to gfc_current_locus.
3760 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
3763 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
3764 in F2008 and not F2003.
3765 (resolve_function): Ditto in error message. Also, exclude
3766 deferred character length results from the error.
3768 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
3772 * expr.c (class_allocatable, class_pointer, comp_allocatable,
3773 comp_pointer): New helpers.
3774 (component_initializer): Generate EXPR_NULL for allocatable or pointer
3775 components. Do not generate initializers for components within BT_CLASS.
3776 Do not assign to comp->initializer.
3777 (gfc_generate_initializer): Use new helpers; move code to generate
3778 EXPR_NULL for class allocatable components into component_initializer().
3780 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3783 * trans-decl.c (gfc_process_block_locals): Delete assert and set
3784 saved_local_decls = NULL_TREE.
3786 2018-07-02 Richard Biener <rguenther@suse.de>
3789 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
3790 for the distinct type copy.
3792 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3796 * trans-array.c (structure_alloc_comps): Do not explicitly copy
3797 procedure pointer components.
3799 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3802 * expr.c : Add a prototype for scalarize_intrinsic_call.
3803 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
3804 intrinsic function calls.
3805 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
3806 the expression or any of the actual argument expressions are
3807 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
3808 Only simplify the scalarized expressions if there are no errors
3810 (gfc_check_init_expr): Set 'init_flag' true in the call to
3811 scalarize_intrinsic_call.
3813 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
3816 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
3818 2018-06-28 Martin Liska <mliska@suse.cz>
3820 * gfortranspec.c: Include opt-suggestions.h.
3822 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
3827 * expr.c (component_initializer): Assign init expr to c->initializer.
3828 (generate_isocbinding_initializer): New.
3829 (gfc_generate_initializer): Call generate_isocbinding_initializer to
3830 generate initializers for c_ptr and c_funptr with -finit-derived.
3832 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3835 * interface.c (check_dtio_interface1): Delete assert.
3837 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
3838 Rainer Orth <ro@gcc.gnu.org>
3841 * resolve.c (resolve_contained_fntype): Check for the charlen
3842 before testing the length.
3844 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
3847 * resolve.c (resolve_contained_fntype): Change standard ref.
3848 from F95 to F2003: C418. Correct a spelling error in a comment.
3849 It is an error for an abstract interface to have an assumed
3850 character length result.
3851 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
3854 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
3857 * resolve.c (resolve_ordinary_assign): Force the creation of a
3858 vtable for assignment of non-polymorphic expressions to an
3859 unlimited polymorphic object.
3860 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
3861 size of the rhs type for such assignments. Set the dtype, _len
3862 and vptrs appropriately.
3863 * trans-expr.c (gfc_trans_assignment): Force the use of the
3864 _copy function for these assignments.
3866 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3867 Thomas Schwinge <thomas@codesourcery.com>
3868 Cesar Philippidis <cesar@codesourcery.com>
3870 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
3872 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
3873 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3874 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
3875 create, deviceptr, present_of_*. Add support for finalize and
3877 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
3878 (OACC_KERNELS_CLAUSES): Likewise.
3879 (OACC_DATA_CLAUSES): Likewise.
3880 (OACC_DECLARE_CLAUSES): Likewise.
3881 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
3882 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
3883 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
3884 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
3885 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
3888 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3890 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
3892 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3894 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
3895 (nonlocal_dummy_decls): Likewise.
3896 (gfc_nonlocal_dummy_array_decl): Likewise.
3897 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
3898 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
3899 reusing the result of a recursive call.
3900 (gfc_generate_function_code): Do not create, insert and destroy
3901 nonlocal_dummy_decls.
3903 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
3906 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
3907 pointer dereference.
3909 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
3912 * parse.c (decode_oacc_directive): Set gfc_matching_function
3914 (decode_omp_directive): Likewise.
3916 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
3919 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
3921 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3924 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
3925 levenshtein_distance to get_edit_distance.
3927 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
3930 * expr.c (gfc_check_assign): Select non-NULL locus.
3932 2018-06-11 Janus Weil <janus@gcc.gnu.org>
3935 * interface.c (compare_ptr_alloc): New function.
3936 (generic_correspondence): Call it.
3938 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
3940 * gfortran.h (gfc_expr): Add no_bounds_check field.
3941 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
3942 on function and function argument.
3943 (inline_matmul_assign): Set no_bounds_check on zero expression
3944 and on lhs of zero expression.
3945 Also handle A1B2 case if realloc on assigment is active.
3946 * trans-array.c (gfc_conv_array_ref): Don't do range checking
3947 if expr has no_bounds_check set.
3948 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
3950 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
3951 on lss and lss if the corresponding expressions have it set.
3953 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
3956 * trans-const.c: Remove include "diagnostic-core.h".
3957 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
3959 2018-06-10 Janus Weil <janus@gcc.gnu.org>
3962 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
3963 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
3964 and remove a TODO note.
3965 * gfortran.h: Add a comment to sym_intent.
3967 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3970 * resolve.c (resolve_operator): Provide better error message for
3971 derived type entity used in an binary intrinsic numeric operator.
3973 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3978 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
3979 reduce a charlen to a constant.
3981 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3984 * data.c (gfc_assign_data_value): Re-arrange code to allow for
3985 an error for double initialization of CHARACTER entities.
3987 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3990 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
3992 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3995 * trans.h (gfc_ss): Add field no_bounds_check.
3996 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
3997 ss->no_bounds_check is set, do not use runtime checks.
3998 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
3999 for reallocatable lhs.
4001 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4004 * array.c (match_array_cons_element): NULL() cannot be in an
4007 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4010 * data.c (create_character_initializer): Return early if type is
4011 incompatible with CHARACTER.
4013 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
4016 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
4017 'P' is zero and issue an error if it is.
4019 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4022 * frontend-passes.c (is_fe_temp): Add prototype.
4023 (realloc_string_callback): Early return for frontend-generated
4026 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
4030 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
4031 subroutine data clause arguments.
4033 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
4036 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
4039 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
4042 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
4044 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
4047 * check.c (gfc_check_random_init): New function. Check arguments of
4049 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
4050 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
4052 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
4053 * intrinsic.h: Add prototypes for gfc_check_random_init and
4054 gfc_resolve_random_init
4055 * intrinsic.texi: Document new intrinsic subprogram.
4056 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
4057 * trans-decl.c: Declare gfor_fndecl_random_init
4058 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
4059 Translate call to RANDOM_INIT.
4060 (gfc_conv_intrinsic_subroutine): Call it.
4061 * trans.h: Declare gfor_fndecl_random_init
4063 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
4065 * decl.c (match_data_constant): Fortran 2018 allows pointer
4066 initialization in a data statement.
4068 2018-05-25 Janus Weil <janus@gcc.gnu.org>
4071 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
4072 an obsolescent feature in Fortran 2018.
4073 (gfc_match_equivalence): Ditto.
4074 * resolve.c (resolve_common_blocks): Ditto.
4075 (gfc_resolve_forall): Ditto.
4076 * symbol.c (gfc_define_st_label): Ditto.
4078 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4081 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
4082 pointer dereference.
4084 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4087 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
4089 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4092 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
4094 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4097 * resolve.c (resolve_sync): Resolve expression before checking for
4100 2018-05-22 Janus Weil <janus@gcc.gnu.org>
4103 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
4105 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
4106 * options.c (set_default_std_flags): Ditto.
4107 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
4108 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
4110 * check.c (gfc_check_atomic, gfc_check_event_query,
4111 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
4112 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
4113 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
4114 * intrinsic.c (add_functions, add_subroutines,
4115 gfc_check_intrinsic_standard): Ditto.
4116 * iso-c-binding.def: Ditto.
4117 * iso-fortran-env.def: Ditto.
4118 * match.c (gfc_match_event_post, gfc_match_event_wait,
4119 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
4120 gfc_match_end_team, gfc_match_sync_team): Ditto.
4121 * gfortran.texi: Remove mention of -std=f2008ts.
4122 Move TSs into F2018 section.
4123 * invoke.texi: Update documentation of -std=f2008ts.
4125 2018-05-21 Janus Weil <janus@gcc.gnu.org>
4128 * libgfortran.h: New macros GFC_STD_OPT_*.
4129 * error.c (notify_std_msg): New function.
4130 (gfc_notify_std): Adjust such that it can handle combinations of
4131 GFC_STD_* flags in the 'std' argument, not just a single one.
4132 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
4134 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
4135 * options.c (set_default_std_flags): Warn for F2018 deleted features
4137 (gfc_handle_option): F2018 deleted features are allowed in earlier
4139 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
4140 nonblock do constructs in Fortran 2018.
4142 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4145 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
4146 test for self refs to the function result in the character len
4147 expression. If a self reference is found, emit an error and
4149 (resolve_fntype): Use the function symbol in the calls to the
4152 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4155 * trans-array.c (gfc_get_array_span): Renamed from
4157 (gfc_conv_expr_descriptor): Change references to above.
4158 * trans-array.h : Add prototype for 'gfc_get_array_span'.
4159 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
4161 * trans-stmt.c (trans_associate_var): If the associate name is
4162 a subref array pointer, use gfc_get_array_span for the span.
4164 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4167 * match.c (gfc_match_type_spec): Go through the array ref and
4168 decrement 'rank' for every dimension that is an element.
4170 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
4175 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
4176 charlen backend_decl of the rhs expr to ss->info->string_length
4177 so that the value in the current scope is used.
4179 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4182 * gfortran.texi: Clarify documentation for Cray pointer and
4183 assumed-sized array.
4185 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
4188 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
4189 of 'size'. If the element type is a pointer use the size of the
4190 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
4191 case, set the size to zero.
4193 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4195 * gfortran.h: Remove prototype.
4196 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
4198 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
4201 * expr.c (check_inquiry): Avoid NULL pointer dereference.
4203 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4206 * check.c (gfc_check_rank): Check that the argument is a data object.
4208 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4211 * array.c (gfc_resolve_character_array_constructor): Substrings
4212 with upper bound smaller than lower bound are zero length strings.
4214 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4217 * data.c (gfc_assign_data_value): Check that a data object does
4218 not also have default initialization.
4220 2018-05-10 Marek Polacek <polacek@redhat.com>
4223 * options.c (gfc_post_options): Set main_input_filename.
4225 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4228 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
4230 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
4234 * resolve.c (get_temp_from_expr): The temporary must not have
4235 dummy or intent attributes.
4237 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4240 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
4241 implemented. Use gfc_logical_4_kind for BACK.
4242 * simplify.c (min_max_choose): Add optional argument back_val.
4244 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
4245 back_val to min_max_choose.
4246 (simplify_minmaxloc_to_nodim): Likewise.
4247 (simplify_minmaxloc_to_array): Likewise.
4248 (gfc_simplify_minmaxloc): Add argument back, handle it.
4249 Pass back_val to specific simplification functions.
4250 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
4251 pass it on to gfc_simplify_minmaxloc.
4252 (gfc_simplify_maxloc): Likewise.
4253 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
4254 comment. If BACK is true, use greater or equal (or lesser or
4255 equal) insteal of greater (or lesser). Mark the condition of
4256 having found a value which exceeds the limit as unlikely.
4258 2018-05-07 Jeff Law <law@redhat.comg>
4260 * scanner.c (preprocessor_line): Call linemap_add after a line
4261 directive that changes the current filename.
4263 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
4266 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
4267 introduced by r259385.
4268 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
4269 same variables in coarray assignments.
4271 2018-05-02 Tom de Vries <tom@codesourcery.com>
4274 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
4276 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
4279 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
4281 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
4285 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
4286 during dependency computation. They define no data dependency.
4287 * trans-array.c (conv_array_index_offset): The stride can not be set
4289 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
4290 for caf_get's result and copying to the array with vectorial
4293 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
4296 * frontend-passes.c (traverse_io_block): Check for start, end or
4297 stride being defined by an outer implied DO loop.
4299 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
4303 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
4304 for annotation and remove dependence on -ftree-parallelize-loops.
4306 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4309 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
4310 (resolve_oacc_nested_loops): Likewise. Formatting fix.
4312 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4315 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
4316 parallell processing of DO CONCURRENT -ftree-parallelize-loops
4319 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4322 * resolve.c (resolve_variable): Simplify cases where access to a
4323 parameter array results in a single constant.
4325 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
4328 * decl.c (variable_decl): If upper or lower bounds simplify
4329 to a constant, use that.
4331 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
4334 * simplify.c (gfc_convert_constant): Handle case of array
4335 constructors within an array that has no iterator and improve
4336 the conciseness of this section of code.
4338 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4341 * array.c (gfc_resolve_character_array_constructor): Early
4342 exit for zero-size arrays.
4343 * simplify.c (simplify_transformation_to_array): Exit early
4344 if the result size is zero.
4345 (simplify_minmaxloc_to_array): Likewise.
4347 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
4350 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
4352 (gfc_free_namespace): Restore assert (revert r258839).
4354 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4356 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
4357 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
4358 (IOPARM_dt_dec_ext): ... this.
4359 * trans-io.c (build_dt): Adjust for default_exp renaming to
4360 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
4361 * io.c (match_io): Likewise.
4363 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4366 * frontend-passes.c (gfc_run_passes): Do not run front-end
4367 optimizations if a previous error occurred.
4369 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4370 Harald Anlauf <anlauf@gmx.de>
4373 * primary.c (gfc_convert_to_structure_constructor): Check
4374 conformance of argument types in structure constructor.
4376 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
4379 * io.c: Include constructor.h.
4380 (resolve_tag_format): For a constant character array, concatenate
4381 into a single character expression.
4383 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
4384 Dominique d'Humieres <dominiq@gcc.gnu.org>
4387 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
4388 scalar derived type with -std=f2003 and -std=f2008.
4390 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4391 Dominique d'Humieres <dominiq@gcc.gnu.org>
4394 * symbol.c (gfc_free_namespace): Delete the assert and only if
4395 refs count is equals zero, free the namespace. Otherwise,
4396 something is halfway and other errors will resound.
4398 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
4401 * expr.c (find_substring_ref): Change types of start, end
4402 and length variables to gfc_charlen_t. Set length to zero
4403 for empty substring.
4405 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
4408 * decl.c (check_function_name): Improved error message
4409 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
4411 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
4414 * decl.c (get_proc_name): If the MODULE prefix appears in interface
4415 body, then it must appear on the contained subroutine or function.
4416 While here, fix nearby mis-indented code.
4418 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
4419 Harald Anlauf <anlauf@gmx.de>
4422 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
4424 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
4427 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
4428 gfc_charlen_type_node when calling procedure.
4430 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
4433 * interface.c (symbol_rank): Remove bogus null pointer check that
4434 crept in when translating a ternary operator into an if-else
4437 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4440 * simplify.c (gfc_convert_constant): Correctly handle iterators
4441 for type conversion.
4443 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4446 * decl.c (get_proc_name): Check for a subroutine re-defined in
4447 the contain portion of a subroutine. Change language of existing
4448 error message to better describe the issue. While here fix whitespace
4451 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4454 * decl.c (get_proc_name): Catch clash between a procedure statement
4455 and a contained subprogram
4457 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
4460 * decl.c (merge_array_spec): Correct the error condition.
4462 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4465 * decl.c (get_proc_name): Check for clash of entry name with
4468 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4471 * decl.c (merge_array_spec): Limit the merging to maximum allowed
4472 dimensions, and issue error message if limit is exceeded.
4474 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
4476 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
4477 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
4478 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
4479 * intrinsic.texi: Update documentation.
4480 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
4481 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
4482 gfor_fndecl_kill and gfor_fndecl_kill_sub
4483 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
4485 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
4486 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
4487 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
4489 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
4492 * trans-array.c (structure_alloc_comps): Make sure that the
4493 vptr is copied and that the unlimited polymorphic _len is used
4494 to compute the size to be allocated.
4495 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
4496 unlimited polymorphic _len for the offset to the element.
4497 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
4498 * trans.h : Add the boolean 'unlimited' to the prototype.
4500 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
4503 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
4505 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
4507 * check.c (gfc_check_kill): Check pid and sig are scalar.
4508 (gfc_check_kill_sub): Restrict kind to 4 and 8.
4509 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
4510 keywords for KILL. Remove redundant *back="back" in favor of the
4511 original *bck="back".
4512 (add_subroutines): Sort keyword list. Add pid and sig keywords
4514 * intrinsic.texi: Fix documentation to consistently use pid and sig.
4515 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
4517 (gfc_resolve_rename_sub): Add comment.
4519 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
4522 * simplify.c (simplify_transformation): Return default result for
4523 empty array argument.
4524 (gfc_simplify_all): Remove special-case handling for zerosize.
4525 (gfc_simplify_any): Likewise.
4526 (gfc_simplify_count): Likewise.
4527 (gfc_simplify_iall): Likewise.
4528 (gfc_simplify_iany): Likewise.
4529 (gfc_simplify_iparity): Likewise.
4530 (gfc_simplify_minval): Likewise.
4531 (gfc_simplify_maxval): Likewise.
4532 (gfc_simplify_norm2): Likewise.
4533 (gfc_simplify_product): Likewise.
4534 (gfc_simplify_sum): Likewise.
4536 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
4539 * arith.c (check_result, eval_intrinsic): If result overflows, pass
4540 the expression up the chain instead of a NULL pointer.
4542 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
4546 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
4548 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4552 * expr.c (simplify_parameter_variable): If p is a size zero array
4553 and not an ARRAY_EXPR insert an empty array constructor and
4555 * gfortran.h: Add prototype for gfc_is_size_zero_array.
4556 * simplify.c (is_size_zero_array): Make non-static and rename into
4557 (gfc_is_size_zero_array): Check for parameter arrays of zero
4558 size by comparing shape and absence of constructor.
4559 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
4561 (gfc_simplify_count): Likewise.
4562 (gfc_simplify_iall): Likewise.
4563 (gfc_simplify_iany): Likewise.
4564 (gfc_simplify_iparity): Likewise.
4565 (gfc_simplify_minval): Likewise.
4566 (gfc_simplify_maxval): Likewise.
4567 (gfc_simplify_product): Likewise.
4568 (gfc_simplify_sum): Likewise.
4570 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
4573 * primary.c (match_sym_complex_part): Give the matcher for an implied
4574 do-loop a chance to run.
4576 2018-03-03 Harald Anlauf <anlauf@gmx.de>
4579 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
4580 dereference NULL pointer.
4582 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4585 * simplify.c (is_size_zero_array): New function to check for size
4587 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
4588 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
4589 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
4590 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
4591 requirements from F2018.
4593 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4596 * simplify.c (gfc_simplify_transfer): Resolve mold.
4598 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
4601 * resolve.c (build_loc_call): Change symtree name from 'loc' to
4604 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4607 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
4608 components are caf tokens.
4609 (gfc_target_interpret_expr): Treat BT_VOID expressions as
4612 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4615 * class.c (class_array_ref_detected): Remove the condition that
4616 there be no reference after the array reference.
4617 (find_intrinsic_vtab): Remove excess whitespace.
4618 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
4619 as 'base and call build_class_array_ref earlier.
4621 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
4624 * trans-stmt.c (trans_associate_var): Make sure that the se
4625 expression is a pointer type before converting it to the symbol
4628 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
4631 * decl.c (variable_decl): Check that an explicit-shape-array with
4632 nonconstant bounds is allowed.
4634 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
4637 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
4638 has a pre block, add it to the expression pre block.
4640 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
4643 * gfortran.h (gfc_integer_4_kind): Define.
4644 * resolve.c (resolve_select_type): Make sure that the
4645 kind of c->high is gfc_integer_4_kind.
4647 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
4650 * decl.c (gfc_match_data): Check for invalid substring in
4653 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4655 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
4657 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4660 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
4662 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4665 * interface.c (compare_actual_formal): Issue error if keyword is
4666 used in a statement function.
4668 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4671 * trans-io.c (set_parameter_value_inquire): Adjust range check of
4672 negative unit values for kind=8 units to the kind=4 negative limit.
4674 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4677 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
4678 accessing its components.
4680 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4683 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
4684 before accessing its components.
4686 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4689 * trans-const.c : Clean up some whitespace issues.
4690 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
4691 derived type has a kind value of zero, set it to the default
4694 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
4697 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
4698 argument to stop and error stop decls.
4699 * trans-stmt.c (gfc_trans_stop): Add false value to argument
4702 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4706 * trans-decl.c (gfc_build_builtin_function_decls): Pass
4707 gfc_int8_type node to pause_numeric, size_type_node to
4709 * trans-stmt.c (gfc_trans_pause): Likewise.
4711 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4713 * gfortran.texi: Update Coarray API description.
4714 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
4715 character lengths, int for exit codes.
4716 (generate_coarray_sym_init): Use size_t for character length.
4717 * trans-intrinsic.c (conv_co_collective): Likewise.
4718 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
4719 (gfc_trans_event_post_wait): Likewise.
4720 (gfc_trans_sync): Likewise.
4721 (gfc_trans_stop): Use size_t for character lengths, int for exit
4724 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
4728 * primary.c (gfc_convert_to_structure_constructor):
4729 For a constant string constructor, make sure the length
4732 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
4736 * resolve.c (resolve_assoc_var): Rearrange the logic for the
4737 determination of the character length of associate names. If
4738 the associate name is missing a length expression or the length
4739 expression is not a constant and the target is not a variable,
4740 make the associate name allocatable and deferred length.
4741 * trans-decl.c (gfc_get_symbol_decl): Null the character length
4742 backend_decl for deferred length associate names that are not
4743 variables. Set 'length' to gfc_index_zero_node for character
4744 associate names, whose character length is a PARM_DECL.
4746 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4749 * frontend-passes.c (traverse_io_block): Remove workaround for
4752 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
4754 * gfortran.texi: Document additional src/dst_type. Fix some typos.
4755 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
4756 argument of _caf_*_by_ref () with * e { get, send, sendget }.
4757 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
4758 data referenced when generating a call to caf_get_by_ref ().
4759 (conv_caf_send): Same but for caf_send_by_ref () and
4760 caf_sendget_by_ref ().
4762 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4765 * io.c (check_format): Allow FMT_COLON.
4767 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
4770 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
4771 the typenode in the case of deferred length characters.
4773 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
4776 * frontend-passes (scalarized_expr): If the expression
4777 is an assumed size array, leave in the last reference
4778 and pass AR_SECTION instead of AR_FULL to gfc_resolve
4779 in order to avoid an error.
4781 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
4784 * resolve.c (resolve_assoc_var): If a non-constant target expr.
4785 has no string length expression, make the associate variable
4786 into a deferred length, allocatable symbol.
4787 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
4789 * trans-stmt.c (trans_associate_var): Null and free scalar
4790 associate names that are allocatable. After assignment, remove
4791 the allocatable attribute to prevent reallocation.
4793 2018-02-16 Jakub Jelinek <jakub@redhat.com>
4796 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
4797 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
4799 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
4802 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
4804 2018-02-15 Janus Weil <janus@gcc.gnu.org>
4807 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
4810 2018-02-14 Janus Weil <janus@gcc.gnu.org>
4813 * match.c (gfc_match_select_type): Fix check for selector in
4814 SELECT TYPE statement.
4816 2018-02-13 Janus Weil <janus@gcc.gnu.org>
4819 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
4821 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
4822 Janne Blomqvist <jb@gcc.gnu.org>
4824 * module.c (dump_module): Use lbasename to ensure that module
4825 files are reproducible.
4827 2018-02-12 Janus Weil <janus@gcc.gnu.org>
4830 * resolve.c (resolve_component): Fix checks of passed argument in
4831 procedure-pointer components.
4833 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4836 * resolve.c (resolve_formal_arglist): Update error message.
4838 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
4840 * gfortran.texi: Fix typos in documentation of caf_register ().
4841 * trans-array.c (structure_alloc_comps): Only register a component of
4842 a derived typed corray, not of an ultimate component coarray.
4844 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
4848 * interface.c (compare_actual_formal): Add in_statement_function
4849 bool parameter. Skip check of INTENT attribute for statement
4850 functions. Arguments to a statement function cannot be optional,
4851 issue error for missing argument.
4852 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
4853 in_statement_function.
4855 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
4858 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
4859 flag. If the is a vector subscript or the expression is not a
4860 variable, make the descriptor one-based.
4862 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
4866 * trans-array.c (gfc_array_init_size): Revert the change made
4867 in revision 257356 setting the dtype.
4868 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
4869 Call gfc_get_dtype_rank_type every time.
4872 * trans-array.c (gfc_conv_expr_descriptor): If the source array
4873 is a descriptor type, use its offset, removing the condition
4874 that is be a class expression.
4876 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
4879 * match.c (gfc_match_deallocate): Check for NULL pointer.
4881 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
4884 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
4885 (gfc_conv_intrinsic_function): Call it.
4887 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
4890 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
4891 try to resolve it. While here return early if possible.
4893 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
4896 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
4897 'length' if the symbol charlen backend_decl is an indirect ref.
4899 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
4903 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
4904 use gfc_get_dtype_rank_type.
4906 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
4910 * resolve.c (resolve_assoc_var): Generate an error if
4911 target length unknown.
4913 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
4916 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
4917 to runtime, print a warning message.
4919 2018-01-31 Jakub Jelinek <jakub@redhat.com>
4922 * openmp.c (gfc_match_omp_clauses): If all the linear
4923 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
4924 nor set *head = NULL. Formatting fixes.
4926 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
4929 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
4930 an address expression passed to an assumed rank dummy, convert
4931 to an indirect reference.
4933 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
4935 * dump-parse-tree.c (write_proc): Use sym_name (which may
4936 be sym->binding_label) instead of sym->name.
4938 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
4940 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
4943 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
4946 * trans-expr.c (fill_with_spaces): Use memset instead of
4948 (gfc_trans_string_copy): Improve opportunity to use builtins with
4951 2018-01-30 Jakub Jelinek <jakub@redhat.com>
4954 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
4955 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
4957 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4960 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
4963 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4966 * frontend-passes (matmul_to_var_expr): Return early if
4967 in association list.
4968 (inline_matmul_assign): Likewise.
4970 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
4973 * resolve.c (resolve_component): Ensure BIND(C) character
4974 components have length one.
4975 (resolve_symbol): Likewise for variables.
4977 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4980 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
4983 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
4984 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
4985 Soren Rasmussen <s.c.rasmussen@gmail.com>
4987 Partial support for Fortran 2018 teams features.
4989 * array.c (gfc_match_array_ref): add team attribute in coarray
4991 * check.c (gfc_check_get_team, gfc_check_team_number): add new
4992 functions for get_team and team_number.
4993 * dump-parse-tree.c (show_code_node): add new statements: form team,
4994 change team, end team, and sync team.
4995 * expr.c (gfc_find_team_co): add new function.
4996 * gfortran.h: add new statements.
4997 * intrinsic.c (add_functions): add get_team and team_number functions.
4998 * intrinsic.h: add get_team and team_number prototypes for check,
4999 simplify, and resolve.
5000 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
5002 * iso-fortran-env.def: add the team_type derived type.
5003 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
5004 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
5005 add change team, end team, form team, sync team match and functions.
5006 * match.h: add new prototypes for change team, end team, form team,
5008 * parse.c (decode_statement): add cases for change team, end team,
5009 form team, and sync team.
5010 * resolve.c: add cases for exec form team, change team, end team, and
5012 * simplify.c (gfc_simplify_get_team): add new function for get team.
5013 * st.c (gfc_free_statement): add cases exec for change team, end team,
5014 form team, sync team.
5015 * trans-decl.c (gfor_fndecl_caf_form_team)
5016 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
5017 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
5018 (gfor_fndecl_caf_team_number): add functions and definitions.
5019 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
5020 new function and team_type argument support.
5021 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
5022 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
5023 * trans-stmt.h: add new prototypes.
5024 * trans-types.c (gfc_get_derived_type): check condition for team_type.
5025 * trans.c (trans_code): new exec cases for form team, change team, end
5026 team, and sync team.
5027 * trans.h: add new prototypes.
5029 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
5032 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
5033 or .false. The summation does the correct type conversion.
5034 (gfc_simplify_dot_product): Special case zero-sized arrays.
5036 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
5039 * array.c (gfc_match_array_ref): If standard earlier than F2008
5040 it is an error if the reference dimension is greater than 7.
5041 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
5042 dtype masks and shifts accordingly.
5043 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
5044 type node to check the field.
5045 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
5046 (duplicate_allocatable_coarray): Access the rank field of the
5047 dtype descriptor rather than the dtype itself.
5048 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
5049 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
5051 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
5052 get_scalar_to_descriptor_type if the actual expression is a
5054 (gfc_trans_structure_assign): Assign the rank directly to the
5056 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
5057 to default integer kind.
5058 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
5059 'elem_len' field of the dtype.
5060 * trans-io.c (gfc_build_io_library_fndecls): Replace
5061 gfc_int4_type_node with dtype_type_node where necessary.
5062 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
5064 * trans-types.c : Provide 'get_dtype_type_node' to acces the
5065 dtype_type_node and, if necessary, build it.
5066 The maximum size of an array element is now determined by the
5067 maximum value of size_t.
5068 Update the description of the array descriptor, including the
5069 type def for the dtype_type.
5070 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
5071 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
5072 (gfc_get_array_descriptor_base): Change the type of the dtype
5073 field to dtype_type_node.
5074 (gfc_get_array_descr_info): Get the offset to the rank field of
5076 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
5077 * trans.h : Define the indices of the dtype fields.
5079 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5082 * decl.c (gfc_match_derived_decl): If eos not matched, recover
5083 and emit error about garbage after declaration.
5085 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5088 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
5091 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
5095 * arith.c (gfc_arith_concat): Use size_t for string length.
5096 (gfc_compare_string): Likewise.
5097 (gfc_compare_with_Cstring): Likewise.
5098 * array.c (gfc_resolve_character_array_constructor): Use
5099 HOST_WIDE_INT, gfc_mpz_get_hwi.
5100 * check.c (gfc_check_fe_runtime_error): Use size_t.
5101 * data.c (create_character_initializer): Use HOST_WIDE_INT,
5103 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
5104 (add_init_expr_to_sym): Use HOST_WIDE_INT.
5105 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
5107 (gfc_apply_init): Likewise.
5108 * match.h (gfc_set_constant_character_len): Update prototype.
5109 * primary.c (match_string_constant): Use size_t.
5110 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
5112 * simplify.c (init_result_expr): Likewise.
5113 (gfc_simplify_len_trim): Use size_t.
5114 * target-memory.c (gfc_encode_character): Use size_t.
5115 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
5116 (interpret_array): Use size_t.
5117 (gfc_interpret_character): Likewise.
5118 * target-memory.h (gfc_encode_character): Update prototype.
5119 (gfc_interpret_character): Likewise.
5120 (gfc_target_interpret_expr): Likewise.
5121 * trans-const.c (gfc_build_string_const): Use size_t for length
5123 (gfc_build_wide_string_const): Likewise.
5124 * trans-const.h (gfc_build_string_const): Likewise.
5125 (gfc_build_wide_string_const): Likewise.
5127 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
5130 * simplify.c (gfc_simplify_matmul): Set return type correctly.
5132 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
5135 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
5137 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5140 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5142 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5145 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5147 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
5150 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
5151 from symbol marked unlimited polymorphic.
5152 * resolve.c (resolve_structure_cons): Likewise.
5153 * misc.c (gfc_typename): Don't dereference derived->components
5156 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
5159 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
5160 (gfc_logical_4_kind): New macro
5161 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
5162 (gfc_simplify_maxloc): Likewise.
5163 (gfc_resolve_maxloc): Likewise.
5164 (gfc_resolve_minloc): Likewise.
5165 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
5166 argument; also raise error if it is used (for now). Add it
5167 if it isn't present.
5168 * intrinsic.c (add_sym_4ml): Rename to
5169 (add_sym_5ml), adjust for extra argument.
5170 (add_functions): Add "back" constant. Adjust maxloc and minloc
5172 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
5173 not of gfc_logical_4_kind, convert.
5174 (gfc_resolve_minloc): Likewise.
5175 * simplify.c (gfc_simplify_minloc): Add back argument.
5176 (gfc_simplify_maxloc): Likewise.
5177 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
5178 argument to %VAL to ensure passing by value.
5179 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
5180 also for library calls.
5182 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5185 * resolve.c (resolve_transfer): Delete code looking for 'DT'
5186 format specifiers in format strings. Set formatted to true if a
5187 format string or format label is present.
5188 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
5191 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5194 * dump-parse-tree.c (get_c_type_name): Remove extra line.
5195 Change for loop to use declaration in for loop. Handle BT_LOGICAL
5197 (write_decl): Add where argument. Fix indentation. Replace
5198 assert with error message. Add typename to warning
5200 (write_type): Adjust locus to call of write_decl.
5201 (write_variable): Likewise.
5202 (write_proc): Likewise. Replace assert with error message.
5204 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
5207 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
5208 the rhs expression is neither an elemental nor a conversion
5212 * trans-array.c (is_pointer_array): Remove unconditional return
5213 of false for -fopenmp.
5215 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5219 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
5222 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5225 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
5227 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5230 * resolve.c (resolve_charlen): Check the type of cl->length
5233 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5236 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
5238 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5241 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
5242 LHS type when assigning.
5244 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
5247 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
5249 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5251 * match.c (gfc_match_allocate): Check for NULL pointer.
5253 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5255 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
5257 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
5260 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
5261 an initializer, convert the kind parameters and add to the
5262 component if the instance.
5263 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
5264 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
5265 for parameterized arrays. Clean up typos in comments. Convert
5266 parameterized array initializers and copy into the array.
5267 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
5268 parameterized types.
5269 *trans-stmt.c (trans_associate_var): Deallocate associate vars
5270 as necessary, when they are PDT function results for example.
5273 * trans-array.c (structure_alloc_comps): Only compare len parms
5274 when they are declared explicitly.
5276 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
5279 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
5282 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
5286 * array.c (got_charlen): Use gfc_charlen_int_kind.
5287 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
5289 (find_intrinsic_vtab): Likewise.
5290 * decl.c (match_char_length): Use gfc_charlen_int_kind.
5291 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
5292 (gfc_match_implicit): Use gfc_charlen_int_kind.
5293 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
5294 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
5295 * expr.c (gfc_get_character_expr): Length parameter of type
5297 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
5298 (gfc_extract_hwi): New function.
5299 (simplify_const_ref): Make string_len of type gfc_charlen_t.
5300 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
5301 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
5302 * gfortran.h (gfc_mpz_get_hwi): New prototype.
5303 (gfc_mpz_set_hwi): Likewise.
5304 (gfc_charlen_t): New typedef.
5305 (gfc_expr): Use gfc_charlen_t for character lengths.
5306 (gfc_size_kind): New extern variable.
5307 (gfc_extract_hwi): New prototype.
5308 (gfc_get_character_expr): Use gfc_charlen_t for character length.
5309 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
5310 * gfortran.texi: Update description of hidden string length argument.
5311 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
5312 (gfc_resolve_char_achar): Likewise.
5313 (gfc_resolve_repeat): Pass string length directly without
5314 temporary, use gfc_charlen_int_kind.
5315 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
5316 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
5317 * misc.c (gfc_mpz_get_hwi): New function.
5318 (gfc_mpz_set_hwi): New function.
5319 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
5320 (parse_integer): Don't complain about large integers.
5321 (write_atom): Use HOST_WIDE_INT for integers.
5322 (mio_integer): Handle integer type mismatch.
5323 (mio_hwi): New function.
5324 (mio_intrinsic_op): Use HOST_WIDE_INT.
5325 (mio_array_ref): Likewise.
5326 (mio_expr): Likewise.
5327 * primary.c (match_substring): Use gfc_charlen_int_kind.
5328 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
5329 (resolve_character_operator): Likewise.
5330 (resolve_assoc_var): Likewise.
5331 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
5332 (resolve_charlen): Use mpz_sgn to determine sign.
5333 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
5335 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
5336 * target-memory.c (size_character): Length argument of type
5338 (gfc_encode_character): Likewise.
5339 (gfc_interpret_character): Use gfc_charlen_t.
5340 * target-memory.h (gfc_encode_character): Modify prototype.
5341 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
5342 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
5343 (trans_array_constructor): Use existing type.
5344 (get_array_charlen): Likewise.
5345 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
5346 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
5347 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
5348 (add_argument_checking): Likewise.
5349 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
5350 gfc_charlen_type_node.
5351 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
5352 4, fold_convert to correct type.
5353 (gfc_conv_class_to_class): Build const of type size_type_node for
5355 (gfc_copy_class_to_class): Likewise.
5356 (gfc_conv_string_length): Use same type in expression.
5357 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
5358 (gfc_conv_string_tmp): Make sure len is of the right type.
5359 (gfc_conv_concat_op): Use same type in expression.
5360 (gfc_conv_procedure_call): Likewise.
5361 (fill_with_spaces): Comment out memset() block due to spurious
5362 -Wstringop-overflow warnings.
5363 (gfc_trans_string_copy): Use gfc_charlen_type_node.
5364 (alloc_scalar_allocatable_for_subcomponent_assignment):
5365 fold_convert to right type.
5366 (gfc_trans_subcomponent_assign): Likewise.
5367 (trans_class_vptr_len_assignment): Build const of correct type.
5368 (gfc_trans_pointer_assignment): Likewise.
5369 (alloc_scalar_allocatable_for_assignment): fold_convert to right
5371 (trans_class_assignment): Build const of correct type.
5372 * trans-intrinsic.c (gfc_conv_associated): Likewise.
5373 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
5374 * trans-io.c (gfc_build_io_library_fndecls): Use
5375 gfc_charlen_type_node for character lengths.
5376 (set_string): Convert to right type in assignment.
5377 * trans-stmt.c (gfc_trans_label_assign): Build const of
5378 gfc_charlen_type_node.
5379 (trans_associate_var): Likewise.
5380 (gfc_trans_character_select): Likewise.
5381 (gfc_trans_allocate): Likewise, don't typecast strlen result.
5382 (gfc_trans_deallocate): Don't typecast strlen result.
5383 * trans-types.c (gfc_size_kind): New variable.
5384 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
5385 from size_type_node.
5386 * trans-types.h: Fix comment.
5388 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
5392 * check.c (gfc_check_eoshift): Check for string length and
5393 for conformance of boundary.
5394 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
5395 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
5396 * simplify.c (gfc_simplify_eoshift): New function.
5398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5399 Alan Hayward <alan.hayward@arm.com>
5400 David Sherwood <david.sherwood@arm.com>
5402 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
5404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5405 Alan Hayward <alan.hayward@arm.com>
5406 David Sherwood <david.sherwood@arm.com>
5408 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
5410 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
5413 * check.c (gfc_check_eoshift): Error for missing boundary if array
5414 is not one of the standard types.
5416 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5418 Update copyright years.
5420 * gfortranspec.c (lang_specific_driver): Update copyright notice
5422 * gfc-internals.texi: Bump @copying's copyright year.
5423 * gfortran.texi: Ditto.
5424 * intrinsic.texi: Ditto.
5425 * invoke.texi: Ditto.
5427 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5430 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
5431 gfc_simplify_minloc to maxloc and minloc, respectively.
5432 * intrinsic.h: Add prototypes for gfc_simplify_minloc
5433 and gfc_simplify_maxloc.
5434 * simplify.c (min_max_chose): Adjust prototype. Modify function
5435 to have a return value which indicates if the extremum was found.
5436 (is_constant_array_expr): Fix typo in comment.
5437 (simplify_minmaxloc_to_scalar): New function.
5438 (simplify_minmaxloc_nodim): New function.
5439 (new_array): New function.
5440 (simplify_minmaxloc_to_array): New function.
5441 (gfc_simplify_minmaxloc): New function.
5442 (simplify_minloc): New function.
5443 (simplify_maxloc): New function.
5445 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5449 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
5452 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
5455 * resolve.c (resolve_fl_derived0): Add caf_token fields for
5456 allocatable and pointer scalars, when -fcoarray selected.
5457 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
5458 field as well as the backend_decl.
5459 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
5460 derived types that are not vtypes. Components with caf_token
5461 attribute are pvoid types. For a component requiring it, find
5462 the caf_token field and have the component token field point to
5466 *trans-types.c (gfc_get_array_descriptor_base): Add the token
5467 field to the descriptor even when codimen not set.
5469 Copyright (C) 2018 Free Software Foundation, Inc.
5471 Copying and distribution of this file, with or without modification,
5472 are permitted in any medium without royalty provided the copyright
5473 notice and this notice are preserved.