aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2019-11-10 18:33:00 +0000
committerPaul Thomas <pault@gcc.gnu.org>2019-11-10 18:33:00 +0000
commit0313a84a2faa8f685eb489fa787f1ea969f68560 (patch)
tree3f4a01ea876388bd1334b361f0a96304fc93ff8b /gcc/fortran/trans-stmt.c
parent4b77a3806c4f2e27d149da326a689286043e433c (diff)
downloadgcc-0313a84a2faa8f685eb489fa787f1ea969f68560.zip
gcc-0313a84a2faa8f685eb489fa787f1ea969f68560.tar.gz
gcc-0313a84a2faa8f685eb489fa787f1ea969f68560.tar.bz2
re PR fortran/92123 ([F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported)
2019-11-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/92123 *decl.c (gfc_verify_c_interop_param): Remove error asserting that pointer or allocatable variables in a bind C procedure are not supported. Delete some trailing spaces. * trans-stmt.c (trans_associate_var): Correct the attempt to treat scalar pointer or allocatable temporaries as if they are array descriptors. 2019-11-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/92123 * gfortran.dg/bind_c_procs_3.f90 : New test. * gfortran.dg/ISO_Fortran_binding_15.c : New test. * gfortran.dg/ISO_Fortran_binding_15.f90 : Additional source. From-SVN: r278025
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index e3ea38a..bce353e 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -1841,10 +1841,7 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block)
if (rank > 0)
copy_descriptor (&se.post, se.expr, desc, rank);
else
- {
- tmp = gfc_conv_descriptor_data_get (desc);
- gfc_conv_descriptor_data_set (&se.post, se.expr, tmp);
- }
+ gfc_conv_descriptor_data_set (&se.post, se.expr, desc);
/* The dynamic type could have changed too. */
if (sym->ts.type == BT_CLASS)