2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
Backport of r250734 from mainline
PR fortran/80768
* check.c (gfc_check_num_images): Fix typo.
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80768
* gfortran.dg/num_images_1.f90: New test that tests fix in r250734.
From-SVN: r256907
2018-01-18 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/83864
* expr.c (gfc_apply_init): Do not dereference NULL pointer.
2018-01-18 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/83864
* gfortran.dg/pr83864.f90: New test.
From-SVN: r256857
2018-01-17 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/83874
* decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2018-01-17 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/83874
* gfortran.dg/pr83874.f90: New test.
From-SVN: r256829
2012-01-13 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/78814
* interface.c (symbol_rank): Check for NULL pointer.
2012-01-13 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/78814
* gfortran.dg/interface_40.f90: New testcase.
From-SVN: r256646
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82367
* resolve.c (resolve_allocate_expr): Check for NULL pointer.
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82367
* gfortran.dg/deferred_character_18.f90: New test.
From-SVN: r256466
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/83093
* resolve.c (resolve_charlen): Check the type of cl->length
after resolution.
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/83093
* gfortran.dg/allocate_with_typespec_7.f90: New test.
From-SVN: r256459
2018-01-10 Steven G. Kargl <kargl@kgcc.gnu.org>
Backport r254555 from trunk
PR Fortran/82841
* gfortran.dg/transfer_simplify_11.f90: New test.
2018-01-10 Steven G. Kargl <kargl@kgcc.gnu.org>
Backport r254555 from trunk
PR Fortran/82841
* simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
Unwrap a short line.
From-SVN: r256445
2018-01-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR Fortran/83679
* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
array. Update Copyright year while here.
From-SVN: r256263
2017-12-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR Fortran/83548
* match.c (gfc_match_type_spec): Check for LOGICAL conflict in
type-spec versus LOGICAL intrinsic subprogram.
2017-12-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR Fortran/83548
* gfortran.dg/array_constructor_type_22.f03: New test.
From-SVN: r256025
Backported from mainline
2017-11-24 Jakub Jelinek <jakub@redhat.com>
PR fortran/81304
* trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
attr.implicit_type in intrinsic_sym to avoid undesirable warning.
* testsuite/libgomp.fortran/pr81304.f90: New test.
From-SVN: r255716
2017-11-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83021
* resolve.c (resolve_component): Only escape for use assciated
vtypes if the current namespace has no proc_name and is most
particularly block data.
From-SVN: r255205
2017-11-23 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/79072
* trans-expr.c (trans_class_vptr_len_assignment): Set from_len
if the temporary is unlimited polymorphic.
* trans-stmt.c (trans_associate_var): Use the fake result decl
to obtain the 'len' field from an explicit function result when
in that function scope.
2017-11-23 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/79072
* gfortran.dg/class_result_5.f90: New test.
* gfortran.dg/class_result_6.f90: New test.
From-SVN: r255120
2017-11-21 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk fix for PR82586
PR fortran/78686
* resolve.c (resolve_generic_f): Check usage of derived type by
calling gfc_use_derived.
2017-11-21 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk fix for PR82586
PR fortran/78686
* gfortran.dg/pr78686.f90: New test.
From-SVN: r255029
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/82934
* trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
null string length for assumed length typespec and set
expr3_esize to NULL_TREE;
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/82934
* gfortran.dg/allocate_assumed_charlen_1.f90: New test.
From-SVN: r254709
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/78619
* check.c (same_type_check): Introduce a new argument 'assoc'
with default value false. If this is true, use the symbol type
spec of BT_PROCEDURE expressions.
(gfc_check_associated): Set 'assoc' true in the call to
'same_type_check'.
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/78619
* gfortran.dg/pr78619.f90: New test.
From-SVN: r254708
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/78641
* resolve.c (resolve_ordinary_assign): Do not add the _data
component for class valued array constructors being assigned
to derived type arrays.
* trans-array.c (gfc_trans_array_ctor_element): Take the _data
of class valued elements for assignment to derived type arrays.
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/78641
* gfortran.dg/class_66.f90: New test.
From-SVN: r254444
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69739
* trans-expr.c (gfc_map_intrinsic_function): Return false for
bounds without the DIM argument instead of ICEing.
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69739
* gfortran.dg/pr69739.f90: New test.
From-SVN: r254442
2017-11-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82796
* resolve.c (resolve_equivalence): An entity in a common block within
a module cannot appear in an equivalence statement if the entity is
with a pure procedure.
2017-11-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82796
* gfortran.dg/equiv_pure.f90: New test.
From-SVN: r254409
gcc/fortran/ChangeLog:
2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
create a loop variant temporary, too.
* trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
not as scalars.
* trans.c (get_array_span): Take the character kind into account when
doing pointer arithmetic.
gcc/testsuite/ChangeLog:
2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray/send_char_array_1.f90: New test.
From-SVN: r254408
2017-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81735
* trans-decl.c (gfc_trans_deferred_vars): Correct case where
'tmp' can be used unititialized.
2017-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81735
* gfortran.dg/pr81735.f90: New test.
From-SVN: r254389
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* gfortran.dg/class_64_f90 : New test.
From-SVN: r254299
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* gfortran.dg/class_64_f90 : New test.
From-SVN: r254293
2017-10-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81758
* trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
must only be set if the right hand side expression is of type
class.
2017-10-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81758
* gfortran.dg/class_63.f90: New test.
From-SVN: r254196
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* resolve.c (gfc_resolve_code): Simplify condition for class
pointer assignments becoming regular assignments by asserting
that only class valued targets are permitted.
* trans-expr.c (trans_class_pointer_fcn): New function using a
block of code from gfc_trans_pointer_assignment.
(gfc_trans_pointer_assignment): Call the new function. Tidy up
a minor whitespace issue.
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* gfortran.dg/typebound_proc_36.f90 : New test.
From-SVN: r253976
2017-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52832
* match.c (gfc_match_associate): Before failing the association
try again, allowing a proc pointer selector.
PR fortran/80120
PR fortran/81903
PR fortran/82121
* primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
points to the associate selector, if any. Go through selector
references, after resolution for variables, to catch any full
or section array references. If a class associate name does
not have the same declared type as the selector, resolve the
selector and copy the declared type to the associate name.
Before throwing a no implicit type error, resolve all allowed
selector expressions, and copy the resulting typespec.
PR fortran/67543
* resolve.c (resolve_assoc_var): Selector must cannot be the
NULL expression and it must have a type.
PR fortran/78152
* resolve.c (resolve_symbol): Allow associate names to be
coarrays.
2017-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78512
* gfortran.dg/associate_9.f03 : Remove XFAIL.
* gfortran.dg/associate_26.f90 : New test.
PR fortran/80120
* gfortran.dg/associate_27.f90 : New test.
PR fortran/81903
* gfortran.dg/associate_28.f90 : New test.
PR fortran/82121
* gfortran.dg/associate_29.f90 : New test.
PR fortran/67543
* gfortran.dg/associate_30.f90 : New test.
From-SVN: r253794
2017-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81048
* resolve.c (resolve_symbol): Ensure that derived type array
results get default initialization.
2017-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81048
* gfortran.dg/derived_init_4.f90 : New test.
From-SVN: r253793
2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/80118
* expr.c (gfc_get_full_arrayspec_from_expr): If there is
no symtree, set array spec to NULL.
2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/80118
* gfortran.dg/zero_sized_7.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r253383
2017-08-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.
* gfortran.dg/dtio_12.f90: Update test.
From-SVN: r251301
2017-08-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.
* gfortran.dg/array_temporaries_4.f90: New test.
From-SVN: r251189
2017-06-09 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/70601
* trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
function results.
2017-06-09 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/70601
* gfortran.dg/proc_ptr_comp_50.f90: New test.
From-SVN: r249066
2017-06-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80766
* resolve.c (resolve_fl_derived): Make sure that vtype symbols are
properly resolved.
2017-06-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80766
* gfortran.dg/typebound_call_28.f90: New test.
From-SVN: r248873
2017-05-23 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/80333
* trans-io.c (nml_get_addr_expr): If we are dealing with class
type data set tmp tree to get that address.
(transfer_namelist_element): Set the array spec to point to the
the class data.
* gfortran.dg/dtio_30.f03: New test.
* list_read.c (nml_read_obj): Compute pointer into class/type
arrays from the nl->dim information. Update it for each iteration
of the loop for the given object.
From-SVN: r248388
2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/78659
* io.c (dtio_procs_present): Add new function to check for DTIO
procedures relative to I/O statement READ or WRITE.
(gfc_resolve_dt): Add namelist checks using the new function.
* resolve.c (dtio_procs_present): Remove function and related
namelist checks. (resolve_fl_namelist): Add check specific to
Fortran 95 restriction on namelist objects.
* gfortran.dg/namelist_91.f90: New test.
* gfortran.dg/namelist_92.f90: New test.
* gfortran.dg/namelist_93.f90: New test.
* gfortran.dg/namelist_94.f90: New test.
From-SVN: r248166
2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80752
* expr.c (gfc_generate_initializer): If type conversion fails,
check for error and return NULL.
2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80752
gfortran.dg/pr80752.f90: New test.
From-SVN: r248076
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80121
* trans-expr.c (gfc_conv_procedure_call): Deallocate the components
of allocatable intent(out) arguments.
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80121
* gfortran.dg/intent_out_9.f90: New test case.
From-SVN: r247662
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80392
* trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
building a derived type that includes a procedure pointer component
with a polymorphic result.
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80392
* gfortran.dg/proc_ptr_comp_49.f90: New test case.
From-SVN: r247655
2017-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk.
PR fortran/80484
* io.c (format_lex): Check for '/' and set token to FMT_SLASH.
(check_format): Move FMT_DT checking code to data_desc section.
* module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
Backport from mainline
PR fortran/80484
* gfortran.dg/dtio_29.f03: New test.
From-SVN: r247615
2017-04-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80440
* module.c (find_symtree_for_symbol): Delete.
(read_module): Remove the call to the above.
From-SVN: r246952
2017-04-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/80361
* class.c (generate_finalization_wrapper): Give the finalization wrapper
the recursive attribute.
2017-04-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/80361
* gfortran.dg/class_62.f90: New test case.
From-SVN: r246934