2017-11-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/79072
* trans-stmt.c (trans_associate_var): Weaken the over strong
condition for using the fake result decl.
2017-11-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/79072
* gfortran.dg/class_result_6.f90: New test for comment 10 of
the PR.
From-SVN: r255053
+2017-11-22 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/79072
+ * trans-stmt.c (trans_associate_var): Weaken the over strong
+ condition for using the fake result decl.
+
2017-11-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/79072
tmp = e->symtree->n.sym->ts.u.cl->backend_decl;
}
else if (e->symtree->n.sym->attr.function
- && e->symtree->n.sym == e->symtree->n.sym->result
- && e->symtree->n.sym == e->symtree->n.sym->ns->proc_name)
+ && e->symtree->n.sym == e->symtree->n.sym->result)
{
tmp = gfc_get_fake_result_decl (e->symtree->n.sym, 0);
tmp = gfc_class_len_get (tmp);
+2017-11-22 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/79072
+ * gfortran.dg/class_result_6.f90: New test for comment 10 of
+ the PR.
+
2017-11-22 Jakub Jelinek <jakub@redhat.com>
PR debug/83084
--- /dev/null
+! { dg-do run }
+!
+! Test the fix for PR79072 comment #12. A description of the problem
+! is to be found in class_result_5.f90.
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+ character(3), target :: a = 'foo'
+ class(*), pointer :: b
+ b => ptr()
+ select type (b)
+ type is (character(*))
+ if (a .ne. "bar") call abort
+ end select
+contains
+ function ptr()
+ class(*), pointer :: ptr
+ ptr => a
+ select type (ptr)
+ type is (character(*))
+ ptr = "bar"
+ end select
+ end function
+end