1 2019-03-03 Harald Anlauf <anlauf@gmx.de>
2 Steven G. Kargl <kargl@gcc.gnu.org>
5 * symbol.c (check_conflict): Check for valid procedure name
6 passed to error reporting routine.
8 2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
11 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
13 2019-03-02 Harald Anlauf <anlauf@gmx.de>
16 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
17 where storage size of elements of MOLD is 0.
19 2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
20 Cesar Philippidis <cesar@codesourcery.com>
24 * openmp.c (gfc_match_oacc_routine): Handle repeated use of the
25 Fortran OpenACC 'routine' directive.
28 * gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
29 * openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
30 * trans-decl.c (add_attributes_to_decl): Likewise.
34 * openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
36 2019-02-26 Harald Anlauf <anlauf@gmx.de>
39 * check.c (gfc_calculate_transfer_sizes): Handle cases where
40 storage size of elements of MOLD is 0.
42 2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
45 * trans-types.c (get_formal_from_actual_arglist): If
46 the actual arglist has no expression, the corresponding
47 formal arglist is an alternate return.
49 2019-02-26 Jakub Jelinek <jakub@redhat.com>
52 * trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
53 of duplicating the initializer possibly many times.
55 2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
58 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
59 to arguments. If we are dealing with a MOLD, call
60 gfc_expr_to_initialize().
61 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
62 to gfc_find_and_cut_at_last_class_ref.
63 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
64 argument is_mold with default false.
66 2019-02-24 Harald Anlauf <anlauf@gmx.de>
70 * target-memory.c (gfc_element_size): Return false if element size
71 cannot be determined; element size is returned separately.
72 (gfc_target_expr_size): Return false if expression size cannot be
73 determined; expression size is returned separately.
74 * target-memory.h: Adjust prototypes.
75 * check.c (gfc_calculate_transfer_sizes): Adjust references to
76 gfc_target_expr_size, gfc_element_size.
77 * arith.c (hollerith2representation): Likewise.
78 * class.c (find_intrinsic_vtab): Likewise.
79 * simplify.c (gfc_simplify_sizeof): Likewise.
81 2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
84 * trans-io.c (transfer_expr): Do not return if there are no
85 components to the derived type or class.
87 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
90 * resolve.c (deferred_op_assign): Return if the lhs expression
91 has the pointer attribute.
92 * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
93 length if the lhs expression has the pointer attribute.
95 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
99 * decl.c (gfc_verify_c_interop_param): Restriction on string
100 length being one is lifted for F2018.
101 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
102 characters with intent in, make a temporary and copy the result
103 of the expression evaluation into it.
104 (gfc_conv_procedure_call): Set a flag for character formal args
105 having a character length that is not unity. If the procedure
106 is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
107 Also, extend bind C calls to unconditionally convert both
108 pointers and allocatable expressions.
110 2019-02-23 David Malcolm <dmalcolm@redhat.com>
111 Jakub Jelinek <jakub@redhat.com>
114 * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
115 mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
116 (norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
118 2019-02-22 Harald Anlauf <anlauf@gmx.de>
121 * io.c (gfc_match_open): Fix logic in checks of OPEN statement
122 when NEWUNIT= is specified.
124 2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
127 * gfortran.texi: Fix documentation to match the implementation.
129 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
130 Cesar Philippidis <cesar@codesourcery.com>
133 * gfortran.h (oacc_routine_lop): New enum.
134 (symbol_attribute): Use it.
135 * openmp.c (gfc_oacc_routine_dims): Replace with...
136 (gfc_oacc_routine_lop): ... this new function.
137 (gfc_match_oacc_routine): Adjust.
138 * trans-decl.c (add_attributes_to_decl): Likewise.
140 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
142 * openmp.c (gfc_match_oacc_declare): Revert earlier changes.
144 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
146 * dump-parse-tree.c (debug): Implement for gfc_expr *,
147 gfc_typespec *, gfc_typespec and gfc_symbol *.
149 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
152 * class.c (gfc_get_len_component): Add argument k for kind.
153 If the kind of the resulting expression is not equal to k,
155 * gfortran.h (gfc_len_component): Adjust prototype.
156 * simplify.c (gfc_simplify_len): Pass kind to
157 gfc_get_len_component.
159 2019-02-20 Martin Liska <mliska@suse.cz>
161 * gfortran.texi: Change singular to plural.
163 2019-02-20 Martin Liska <mliska@suse.cz>
165 * gfortran.texi: Document Fortran header directive.
167 2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
170 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
171 argument is contiguous and the actual argument may not be,
172 use gfc_conv_subref_array_arg.
174 2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
177 * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
178 without argument as 'wait (GOMP_ASYNC_NOVAL)'.
180 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
183 * trans-decl.c (gfc_get_extern_function_decl): Add argument
184 actual_args and pass it through to gfc_get_function_type.
185 * trans-expr.c (conv_function_val): Add argument actual_args
186 and pass it on to gfc_get_extern_function_decl.
187 (conv_procedure_call): Pass actual arguments to conv_function_val.
188 * trans-types.c (get_formal_from_actual_arglist): New function.
189 (gfc_get_function_type): Add argument actual_args. Generate
190 formal args from actual args if necessary.
191 * trans-types.h (gfc_get_function_type): Add optional argument.
192 * trans.h (gfc_get_extern_function_decl): Add optional argument.
194 2019-02-18 Martin Liska <mliska@suse.cz>
196 * decl.c (gfc_match_gcc_builtin): Add support for filtering
197 of builtin directive based on multilib ABI name.
199 2019-02-17 Harald Anlauf <anlauf@gmx.de>
202 * resolve.c (resolve_common_blocks,resolve_common_vars): Move
203 check for obsolent COMMON feature in F2018 to better place.
205 2019-02-17 Harald Anlauf <anlauf@gmx.de>
208 * decl.c (gfc_set_constant_character_len): Clear original string
209 representation after padding has been performed to target length.
211 2019-02-16 Jakub Jelinek <jakub@redhat.com>
214 * simplify.c (simplify_transformation_to_array): Run post_op
215 immediately after processing corresponding row, rather than at the
217 (norm2_scale): New variable.
218 (add_squared): Rename to ...
219 (norm2_add_squared): ... this. Scale down operand and/or result
221 (do_sqrt): Rename to ...
222 (norm2_do_sqrt): ... this. Handle the result == e case. Scale up
223 result and clear norm2_scale.
224 (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
225 norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
226 and clear norm2_scale again.
228 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
231 * trans-decl.c (generate_coarray_sym_init): For an array
232 constructor in a DATA statement of a coarray variable, set the
233 rank to 1 to avoid confusion later on. If the constructor
234 contains only one value, use that for initiailizig.
236 2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
239 * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
240 * options.c (gfc_handle_option): Use strtol instead of atoi.
241 * invoke.texi: Document -finit-integer behavior in more detail.
243 2019-02-14 Harald Anlauf <anlauf@gmx.de>
246 * symbol.c: Move check for labeled DO statement from
247 gfc_define_st_label to gfc_reference_st_label.
249 2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
252 * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
255 2019-02-13 Martin Liska <mliska@suse.cz>
258 * resolve.c (resolve_operator): Initialize 't' right
259 after function entry. Skip switch (e->value.op.op)
260 for -fdec operands that become function calls.
262 2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
265 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
266 looking at an init expression, issue error if the target is not a
267 TARGET and we are not looking at a procedure pointer.
268 * gfortran.h (gfc_check_assign): Add optional argument
271 2019-02-09 Harald Anlauf <anlauf@gmx.de>
274 * resolve.c (gfc_resolve_substring_charlen): Check substring
275 length for constantness prior to general calculation of length.
277 2019-02-09 Paul Thomas <pault@gcc.gnu.org>
280 * trans-array.c (gfc_trans_create_temp_array): Set the 'span'
281 field for derived types.
283 2019-02-04 Harald Anlauf <anlauf@gmx.de>
286 * decl.c (add_init_expr_to_sym): Copy length of string initializer
289 2019-02-04 Martin Liska <mliska@suse.cz>
292 * resolve.c (resolve_ref): Remove breakout variable as
293 we need to prevent prev = &(*prev)->next to happen
296 2019-02-04 Martin Liska <mliska@suse.cz>
299 * scanner.c (load_file): Report error for -fpre-include
302 2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
305 * invoke.texi: Document the behavior of repeated -ffpe-trap
308 2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
311 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
312 * gfortran.h (gfc_expr): Add flag do_not_warn.
313 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
314 no warning is desired.
316 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
319 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
320 passed in parentheses to class formals, invert the order of
321 copying allocatable components to taking the _data of the
324 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
327 * trans-array.c (gfc_array_init_size): Add element_size to the
329 (gfc_array_allocate): Remove the recalculation of the size of
330 the element and use element_size from the call to the above.
331 Unconditionally set the span field of the descriptor.
333 2019-02-02 Paul Thomas <pault@gcc.gnu.org>
336 * expr.c (is_subref_array): Move the check for class pointer
337 dummy arrays to after the reference check. If we haven't seen
338 an array reference other than an element and a component is not
339 class or derived, return false.
341 2019-02-01 Jakub Jelinek <jakub@redhat.com>
345 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
346 if sym->ns->construct_entities rather than if
347 sym->ns->parent->code->op == EXEC_BLOCK.
349 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
352 * resolve.c (resolve_component): If the reference is a BT_CLASS,
353 copy the contiguous attribute from the reference and use the
356 2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
359 * io.c (match_io): Add check for comma after '*' without subsequent
362 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
365 * invoke.texi: Document the promotion of double precision
368 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
371 * interface.c (gfc_compare_types): If a derived type and an
372 integer both have a derived type, and they are identical,
373 this is a C binding type and compares equal.
375 2019-01-26 Harald Anlauf <anlauf@gmx.de>
378 * expr.c (check_inquiry): Add list of inquiry functions allowed in
379 constant expressions for F2008+.
381 2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
384 * decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
385 and alternative return.
387 2019-01-24 Paul Thomas <pault@gcc.gnu.org>
390 * trans-array.c (gfc_conv_descriptor_elem_len): New function.
391 * trans-array.h : Add prototype for above.
392 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
393 assumed rank arrays being flagged by rank = -1 in expressions.
394 Intent in arrays need a pointer to a copy of the data to be
395 assigned to the descriptor passed for conversion. This should
396 then be freed, together with the CFI descriptor on return from
399 2019-01-22 Harald Anlauf <anlauf@gmx.de>
402 * trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
403 and (- 2**e) ** integer.
405 2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
408 * resolve.c (resolve_types): Add !flag_automatic.
409 * symbol.c (gfc_add_save): Silence warnings.
411 2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
414 * io.c (match_io_element): input-item cannot be an external function.
416 2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
417 Paul Thomas <pault@gcc.gnu.org>
420 * trans-expr.c (gfc_conv_procedure_call): Call
421 gfc_conv_subref_array_arg if the formal arg is contiguous
422 and the actual arg may not be.
424 2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
427 * resolve.c (resolve_ref): Fix logic for removal of
430 2019-01-19 Jakub Jelinek <jakub@redhat.com>
433 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
434 or parent function if it has been added there already.
436 2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
439 * resolve.c (resolve_array_ref): Add equal_length argument; set it
440 if the length of the substring equals that of the orignal
442 (resolve_ref): Remove the substring if it is equal in length to
443 the original variable, unless it is an EXPR_SUBSTRING).
445 2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
448 * resolve.c (resolve_symbol): Host associated varaibles can appear
449 in the specification statement of a RESULT array.
451 2019-01-15 Paul Thomas <pault@gcc.gnu.org>
453 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
454 that are indirect references; ie. dummy arguments.
456 2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
459 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
461 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
464 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
465 functions with contiguous results.
467 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
470 * trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
471 pack/unpack results of functions which return an explicit-shaped
472 or allocatable array.
474 2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
477 * resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
478 structure into independent if's with a return to simplify logic.
479 Avoid a check for ENTRY name with bind(c).
481 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
483 * gfortran.texi: Add description in sections on TS 29113 and
484 further interoperability with C.
485 * trans-array.c (gfc_conv_descriptor_attribute): New function.
486 (gfc_get_dataptr_offset): Remove static function attribute.
487 * trans-array.h: Add prototypes for above functions.
488 * trans-decl.c: Add declarations for the library functions
489 cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
490 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
491 (gfc_conv_procedure_call): Call it for scalar and array actual
492 arguments, when the formal arguments are bind_c with assumed
493 shape or assumed rank.
494 * trans.h: External declarations for gfor_fndecl_cfi_to_gfc
495 and gfor_fndecl_gfc_to_cfi.
497 2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
500 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
503 2019-01-11 Jakub Jelinek <jakub@redhat.com>
507 * trans-openmp.c: Include attribs.h.
508 (gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
509 VAR_DECL max bound with "omp dummy var" attribute like NULL or
510 error_mark_node - recompute number of elts independently.
512 2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
515 * trans-array.c (gfc_conv_parameter_array): Temporary
516 arrays generated for expressions do not need to be repacked.
518 2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
521 * decl.c (top_var_list): Set locus of expr.
522 (gfc_match_data): Detect pointer on non-rightmost part-refs.
524 2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
527 * resolve.c (is_illegal_recursion): Remove an assert().
529 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
532 * expr.c: Change "can not" to "cannot".
534 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
537 * class.c: Mechanically replace "can not" with "cannot".
540 * gfc-internals.texi: Likewise.
541 * intrinsic.texi: Likewise.
542 * invoke.texi: Likewise.
546 * primary.c: Likewise.
547 * resolve.c: Likewise.
548 * symbol.c: Likewise.
549 * trans-array.c: Likewise.
550 * trans-decl.c: Likewise.
551 * trans-intrinsic.c: Likewise.
552 * trans-stmt.c: Likewise.
554 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
557 * simplify.c (gfc_simplify_spread): Also simplify if the
558 type of source is an EXPR_STRUCTURE.
560 2019-01-08 Janus Weil <janus@gcc.gnu.org>
563 * class.c (gfc_find_vtab): For polymorphic typespecs, the components of
564 the class container may not be available (in case of invalid code).
566 2019-01-08 Richard Biener <rguenther@suse.de>
569 * trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
570 directly build the expected GENERIC tree.
572 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
573 Harald Anlauf <anlauf@gmx.de>
574 Tobias Burnus <burnus@gcc.gnu.org>
577 * check.c (gfc_check_is_contiguous): New function.
578 * expr.c (gfc_is_not_contiguous): New function.
579 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
580 Add prototype for gfc_is_not_contiguous.
581 * intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
582 (add_function): Add is_contiguous.
583 * intrinsic.h: Add prototypes for gfc_check_is_contiguous,
584 gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
585 * intrinsic.texi: Add IS_CONTIGUOUS.
586 * iresolve.c (gfc_resolve_is_contiguous): New function.
587 * simplify.c (gfc_simplify_is_contiguous): New function.
588 * trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
589 (gfc_build_intrinsic_function_decl): Add it.
590 * trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
592 (gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
594 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
597 * gfortran.h: Add macro gfc_real_4_kind
598 * simplify.c (simplify_min_max): Special case for the types of
599 AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
602 2019-01-05 Janus Weil <janus@gcc.gnu.org>
605 * class.c (gfc_find_derived_vtab): Mark the _final component as
607 (find_intrinsic_vtab): Ditto. Also add an extra check to avoid
608 dereferencing a null pointer and adjust indentation.
609 * resolve.c (resolve_fl_variable): Add extra check to avoid
610 dereferencing a null pointer. Move variable declarations to local scope.
611 (resolve_fl_procedure): Add extra check to avoid dereferencing a null
613 * symbol.c (check_conflict): Suppress errors for artificial symbols.
615 2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
617 * parse.c (decode_statement): Suppress "Unclassifiable statement"
618 error if previous error messages were emittes.
620 2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
623 * primary.c (gfc_convert_to_structure_constructor): If a character
624 in a constructor is too long, add a warning with
625 -Wcharacter-truncation.
627 2019-01-01 Jakub Jelinek <jakub@redhat.com>
629 Update copyright years.
631 * gfortranspec.c (lang_specific_driver): Update copyright notice
633 * gfc-internals.texi: Bump @copying's copyright year.
634 * gfortran.texi: Ditto.
635 * intrinsic.texi: Ditto.
636 * invoke.texi: Ditto.
638 Copyright (C) 2019 Free Software Foundation, Inc.
640 Copying and distribution of this file, with or without modification,
641 are permitted in any medium without royalty provided the copyright
642 notice and this notice are preserved.