]> gcc.gnu.org Git - gcc.git/commit
Fortran: Fix an assortment of bugs
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 16 May 2023 05:35:40 +0000 (06:35 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Tue, 16 May 2023 05:36:48 +0000 (06:36 +0100)
commit6c95fe9bc0553743098eeaa739f14b885050fa42
tree09c84526255be12917976b667835c8b2036854f0
parent1c6ebfdf033d17db80d3723883f02dfaf612c29e
Fortran: Fix an assortment of bugs

2023-05-16  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/105152
* interface.cc (gfc_compare_actual_formal): Emit an error if an
unlimited polymorphic actual is not matched either to an
unlimited or assumed type formal argument.

PR fortran/100193
* resolve.cc (resolve_ordinary_assign): Emit an error if the
var expression of an ordinary assignment is a proc pointer
component.

PR fortran/87496
* trans-array.cc (gfc_walk_array_ref): Provide assumed shape
arrays coming from interface mapping with a viable arrayspec.

PR fortran/103389
* trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
of unlimited polymorphic 'class_ts'.
(gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
polymorphic and should accept any actual type.

PR fortran/104429
(gfc_conv_procedure_call): Replace dreadful kludge with a call
to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
by giving it the pointer type of the actual argument.

PR fortran/82774
(alloc_scalar_allocatable_subcomponent): Shorten the function
name and replace the symbol argument with the se string length.
If a deferred length character length is either not present or
is not a variable, give the typespec a variable and assign the
string length to that. Use gfc_deferred_strlen to find the
hidden string length component.
(gfc_trans_subcomponent_assign): Convert the expression before
the call to alloc_scalar_allocatable_subcomponent so that a
good string length is provided.
(gfc_trans_structure_assign): Remove the unneeded derived type
symbol from calls to gfc_trans_subcomponent_assign.

gcc/testsuite/
PR fortran/105152
* gfortran.dg/pr105152.f90 : New test

PR fortran/100193
* gfortran.dg/pr100193.f90 : New test

PR fortran/87946
* gfortran.dg/pr87946.f90 : New test

PR fortran/103389
* gfortran.dg/pr103389.f90 : New test

PR fortran/104429
* gfortran.dg/pr104429.f90 : New test

PR fortran/82774
* gfortran.dg/pr82774.f90 : New test
gcc/fortran/interface.cc
gcc/fortran/resolve.cc
gcc/fortran/trans-array.cc
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/pr100193.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr103389.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr104429.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr105152.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr82774.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr87946.f90 [new file with mode: 0644]
This page took 0.059747 seconds and 5 git commands to generate.