2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
accessing its components.
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* gfortran.dg/pr83149_b.f90: New test.
* gfortran.dg/pr83149_a.f90: Additional source for previous.
From-SVN: r257938
+2018-02-23 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83149
+ * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
+ accessing its components.
+
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
if (sym->attr.result
&& sym->ts.type == BT_CHARACTER
&& sym->ts.u.cl->backend_decl == NULL_TREE
+ && sym->ns->proc_name
&& sym->ns->proc_name->ts.u.cl->backend_decl != NULL_TREE)
sym->ts.u.cl->backend_decl = sym->ns->proc_name->ts.u.cl->backend_decl;
+2018-02-23 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83149
+ * gfortran.dg/pr83149_b.f90: New test.
+ * gfortran.dg/pr83149_a.f90: Additional source for previous.
+
2018-02-23 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3-runnable.c: Move tests for vec_float2,
--- /dev/null
+! Compiled with pr83149_b.f90
+!
+module mod
+ character(8) string
+contains
+ function get_string() result(s)
+ character(len_trim(string)) s
+ s = string
+ end function
+end module
+
--- /dev/null
+! Compiled with pr83149_a.f90
+! { dg-do run }
+! { dg-options "-fno-whole-file" }
+! { dg-compile-aux-modules "pr83149_a.f90" }
+! { dg-additional-sources pr83149_a.f90 }
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+ use mod
+ string = 'fubar'
+ select case (get_string())
+ case ('fubar')
+ case default
+ stop 1
+ end select
+end