summaryrefslogtreecommitdiff
path: root/gcc/fortran
AgeCommit message (Collapse)Author
2018-01-25Update ChangeLog and version files for releaserguenth
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257041 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-202018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>kargl
PR fortran/83900 * simplify.c (gfc_simplify_matmul): Set return type correctly. 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/83900 * gfortran.dg/matmul_18.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256920 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-202018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>kargl
PR fortran/83900 * simplify.c (gfc_simplify_matmul): Delete bogus assertion. 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/83900 * gfortran.dg/matmul_17.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256913 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-192018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256907 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-182018-01-18 Harald Anlauf <anlauf@gmx.de>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256857 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-182018-01-17 Harald Anlauf <anlauf@gmx.de>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256829 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-132012-01-13 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256646 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-102018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256466 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-102018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256459 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-102018-01-10 Steven G. Kargl <kargl@kgcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256445 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-042018-01-04 Steven G. Kargl <kargl@gcc.gnu.org>kargl
PR Fortran/83679 * simplify.c (gfc_simplify_cshift): Restore early return for zero-sized array. Update Copyright year while here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256263 138bc75d-0d04-0410-961f-82ee72b054a4
2018-01-022018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig
PR fortran/83650 * simplify.c (gfc_simplify_cshift): Correct contition for negative shifts. 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/83650 * gfortran.dg/simplify_cshift_1.f90: Correct condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256085 138bc75d-0d04-0410-961f-82ee72b054a4
2017-12-282017-12-28 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256025 138bc75d-0d04-0410-961f-82ee72b054a4
2017-12-15 Backported from mainlinejakub
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255716 138bc75d-0d04-0410-961f-82ee72b054a4
2017-12-15 Backported from mainlinejakub
2017-11-23 Dirk Broemmel <d.broemmel@fz-juelich.de> Jakub Jelinek <jakub@redhat.com> PR fortran/81841 * parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of BLOCK DATA. * libgomp.fortran/pr81841.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255712 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-282017-11-28 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255205 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-232017-11-23 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255120 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-212017-11-21 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@255029 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-132017-11-13 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254709 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-132017-11-13 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254708 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-13Introduce logical_type_node and use itjb
Backport from trunk. Earlier GFortran used to redefine boolean_type_node, which in the rest of the compiler means the C/C++ _Bool/bool type, to the Fortran default logical type. When this redefinition was removed, a few issues surfaced. Namely, 1) PR 82869, where we created a boolean tmp variable, and passed it to the runtime library as a Fortran logical variable of a different size. 2) Fortran specifies that logical operations should be done with the default logical kind, not in any other kind. 3) Using 8-bit variables have some issues, such as - on x86, partial register stalls and length prefix changes. - s390 has a compare with immediate and jump instruction which works with 32-bit but not 8-bit quantities. This patch addresses these issues by introducing a type logical_type_node which is a Fortran LOGICAL variable of default kind. It is then used in places were the Fortran standard mandates, as well as for compiler generated temporary variables. For x86-64, using the Polyhedron benchmark suite, no performance or code size difference worth mentioning was observed. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2017-11-13 Janne Blomqvist <jb@gcc.gnu.org> PR 82869 * convert.c (truthvalue_conversion): Use logical_type_node. * trans-array.c (gfc_trans_allocate_array_storage): Likewise. (gfc_trans_create_temp_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (trans_array_constructor): Likewise. (trans_array_bound_check): Likewise. (gfc_conv_array_ref): Likewise. (gfc_trans_scalarized_loop_end): Likewise. (gfc_conv_array_extent_dim): Likewise. (gfc_array_init_size): Likewise. (gfc_array_allocate): Likewise. (gfc_trans_array_bounds): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (duplicate_allocatable): Likewise. (duplicate_allocatable_coarray): Likewise. (structure_alloc_comps): Likewise (get_std_lbound): Likewise (gfc_alloc_allocatable_for_assignment): Likewise * trans-decl.c (add_argument_checking): Likewise (gfc_generate_function_code): Likewise * trans-expr.c (gfc_copy_class_to_class): Likewise (gfc_trans_class_array_init_assign): Likewise (gfc_trans_class_init_assign): Likewise (gfc_conv_expr_present): Likewise (gfc_conv_substring): Likewise (gfc_conv_cst_int_power): Likewise (gfc_conv_expr_op): Likewise (gfc_conv_procedure_call): Likewise (fill_with_spaces): Likewise (gfc_trans_string_copy): Likewise (gfc_trans_alloc_subarray_assign): Likewise (gfc_trans_pointer_assignment): Likewise (gfc_trans_scalar_assign): Likewise (fcncall_realloc_result): Likewise (alloc_scalar_allocatable_for_assignment): Likewise (trans_class_assignment): Likewise (gfc_trans_assignment_1): Likewise * trans-intrinsic.c (build_fixbound_expr): Likewise (gfc_conv_intrinsic_aint): Likewise (gfc_trans_same_strlen_check): Likewise (conv_caf_send): Likewise (trans_this_image): Likewise (conv_intrinsic_image_status): Likewise (trans_image_index): Likewise (gfc_conv_intrinsic_bound): Likewise (conv_intrinsic_cobound): Likewise (gfc_conv_intrinsic_mod): Likewise (gfc_conv_intrinsic_dshift): Likewise (gfc_conv_intrinsic_dim): Likewise (gfc_conv_intrinsic_sign): Likewise (gfc_conv_intrinsic_ctime): Likewise (gfc_conv_intrinsic_fdate): Likewise (gfc_conv_intrinsic_ttynam): Likewise (gfc_conv_intrinsic_minmax): Likewise (gfc_conv_intrinsic_minmax_char): Likewise (gfc_conv_intrinsic_anyall): Likewise (gfc_conv_intrinsic_arith): Likewise (gfc_conv_intrinsic_minmaxloc): Likewise (gfc_conv_intrinsic_minmaxval): Likewise (gfc_conv_intrinsic_btest): Likewise (gfc_conv_intrinsic_bitcomp): Likewise (gfc_conv_intrinsic_shift): Likewise (gfc_conv_intrinsic_ishft): Likewise (gfc_conv_intrinsic_ishftc): Likewise (gfc_conv_intrinsic_leadz): Likewise (gfc_conv_intrinsic_trailz): Likewise (gfc_conv_intrinsic_mask): Likewise (gfc_conv_intrinsic_spacing): Likewise (gfc_conv_intrinsic_rrspacing): Likewise (gfc_conv_intrinsic_size): Likewise (gfc_conv_intrinsic_sizeof): Likewise (gfc_conv_intrinsic_transfer): Likewise (gfc_conv_allocated): Likewise (gfc_conv_associated): Likewise (gfc_conv_same_type_as): Likewise (gfc_conv_intrinsic_trim): Likewise (gfc_conv_intrinsic_repeat): Likewise (conv_isocbinding_function): Likewise (conv_intrinsic_ieee_is_normal): Likewise (conv_intrinsic_ieee_is_negative): Likewise (conv_intrinsic_ieee_copy_sign): Likewise (conv_intrinsic_move_alloc): Likewise * trans-io.c (set_parameter_value_chk): Likewise (set_parameter_value_inquire): Likewise (set_string): Likewise * trans-openmp.c (gfc_walk_alloc_comps): Likewise (gfc_omp_clause_default_ctor): Likewise (gfc_omp_clause_copy_ctor): Likewise (gfc_omp_clause_assign_op): Likewise (gfc_omp_clause_dtor): Likewise (gfc_omp_finish_clause): Likewise (gfc_trans_omp_clauses): Likewise (gfc_trans_omp_do): Likewise * trans-stmt.c (gfc_trans_goto): Likewise (gfc_trans_sync): Likewise (gfc_trans_arithmetic_if): Likewise (gfc_trans_simple_do): Likewise (gfc_trans_do): Likewise (gfc_trans_forall_loop): Likewise (gfc_trans_where_2): Likewise (gfc_trans_allocate): Likewise (gfc_trans_deallocate): Likewise * trans-types.c (gfc_init_types): Initialize logical_type_node and their true/false trees. (gfc_get_array_descr_info): Use logical_type_node. * trans-types.h (logical_type_node): New tree. (logical_true_node): Likewise. (logical_false_node): Likewise. * trans.c (gfc_trans_runtime_check): Use logical_type_node. (gfc_call_malloc): Likewise (gfc_allocate_using_malloc): Likewise (gfc_allocate_allocatable): Likewise (gfc_add_comp_finalizer_call): Likewise (gfc_add_finalizer_call): Likewise (gfc_deallocate_with_status): Likewise (gfc_deallocate_scalar_with_status): Likewise (gfc_call_realloc): Likewise gcc/testsuite/ChangeLog: 2017-11-13 Janne Blomqvist <jb@gcc.gnu.org> PR 82869 * gfortran.dg/logical_temp_io.f90: New test. * gfortran.dg/logical_temp_io_kind8.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254706 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-062017-11-06 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254444 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-06 2017-11-06 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254442 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-052017-11-05 Paul Thomas <pault@gcc.gnu.org>pault
PR fortran/81447 PR fortran/82783 * resolve.c (resolve_component): There is no need to resolve the components of a use associated vtype. (resolve_fl_derived): Unconditionally generate a vtable for any module derived type, as long as the standard is F2003 or later and it is not a vtype or a PDT template. 2017-11-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/81447 * gfortran.dg/class_65.f90: New test. * gfortran.dg/alloc_comp_basics_1.f90: Increase builtin_free count from 18 to 21. * gfortran.dg/allocatable_scalar_9.f90: Increase builtin_free count from 32 to 54. * gfortran.dg/auto_dealloc_1.f90: Increase builtin_free count from 4 to 10. * gfortran.dg/coarray_lib_realloc_1.f90: Increase builtin_free count from 3 to 6. Likewise _gfortran_caf_deregister from 2 to 3, builtin_malloc from 1 to 4 and builtin_memcpy|= MEM from 2 to 5. * gfortran.dg/finalize_28.f90: Increase builtin_free count from 3 to 6. * gfortran.dg/move_alloc_15.f90: Increase builtin_free and builtin_malloc counts from 11 to 14. * gfortran.dg/typebound_proc_27.f03: Increase builtin_free count from 7 to 10. Likewise builtin_malloc from 12 to 15. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254429 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-042017-11-04 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254409 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-04gcc/fortran/ChangeLog:vehre
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254408 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-032017-11-03 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254389 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-012017-11-01 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254299 138bc75d-0d04-0410-961f-82ee72b054a4
2017-11-012017-11-01 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254293 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-28gcc/fortran/ChangeLog:vehre
2017-10-28 Andre Vehreschild <vehre@gcc.gnu.org> * check.c (gfc_check_co_reduce): Clarify error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254198 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-282017-10-28 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@254196 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-212017-10-21 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253976 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-202017-10-20 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig
Backport from trunk PR fortran/79795 * resolve.c (resovle_symbol): Change gcc_assert to sensible error message. 2017-10-20 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk PR fortran/79795 * gfortran.dg/assumed_size_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253951 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-162017-10-16 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253794 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-162017-10-16 Paul Thomas <pault@gcc.gnu.org>pault
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253793 138bc75d-0d04-0410-961f-82ee72b054a4
2017-10-032017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253383 138bc75d-0d04-0410-961f-82ee72b054a4
2017-09-022017-09-02 Janus Weil <janus@gcc.gnu.org>janus
Backport from trunk PR fortran/81770 * expr.c (gfc_check_pointer_assign): Improve the check whether pointer may outlive pointer target. 2017-09-02 Janus Weil <janus@gcc.gnu.org> Backport from trunk PR fortran/81770 * gfortran.dg/warn_target_lifetime_3.f90: Fix a typo. * gfortran.dg/warn_target_lifetime_4.f90: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@251618 138bc75d-0d04-0410-961f-82ee72b054a4
2017-08-232017-08-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@251301 138bc75d-0d04-0410-961f-82ee72b054a4
2017-08-182017-08-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@251189 138bc75d-0d04-0410-961f-82ee72b054a4
2017-08-14Update ChangeLog and version files for releaserguenth
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@251081 138bc75d-0d04-0410-961f-82ee72b054a4
2017-06-092017-06-09 Janus Weil <janus@gcc.gnu.org>janus
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@249066 138bc75d-0d04-0410-961f-82ee72b054a4
2017-06-052017-06-05 Janus Weil <janus@gcc.gnu.org>janus
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248873 138bc75d-0d04-0410-961f-82ee72b054a4
2017-06-022017-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig
PR fortran/80904 * frontend-passes.c (matmul_lhs_realloc): Correct allocation size for case A1B2. 2017-06-02 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/80904 * gfortran.dg/matmul_bounds_12.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248842 138bc75d-0d04-0410-961f-82ee72b054a4
2017-06-02 PR fortran/80918jakub
* openmp.c (resolve_omp_clauses): Fix a typo. * gfortran.dg/gomp/pr80918.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248813 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-232017-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
Backport from trunk PR libgfortran/80741 * transfer.c (finalize_transfer): Reset last_char to 'empty'. * file_pos.c (formatted_backspace): Likewise. (st_endfile): Likewise. (st_rewind): Likewise. (st_flush): Likewise. * trans-io.c (transfer_namelist_element): Change check from NULL_TREE to null_pointer_node. * gfortran.dg/read_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248390 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-232017-05-23 Paul Thomas <pault@gcc.gnu.org>jvdelisle
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248388 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-172017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248166 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-152017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>kargl
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@248076 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-052017-05-05 Janus Weil <janus@gcc.gnu.org>janus
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@247662 138bc75d-0d04-0410-961f-82ee72b054a4
2017-05-052017-05-05 Janus Weil <janus@gcc.gnu.org>janus
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@247655 138bc75d-0d04-0410-961f-82ee72b054a4