+2013-01-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55983
+ * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
+ asserting it.
+
2013-01-16 Jakub Jelinek <jakub@redhat.com>
Tobias Burnus <burnus@net-b.de>
gfc_symtree* res;
gfc_symtree* root;
- /* Set correct symbol-root. */
- gcc_assert (derived->f2k_derived);
- root = (uop ? derived->f2k_derived->tb_uop_root
- : derived->f2k_derived->tb_sym_root);
-
/* Set default to failure. */
if (t)
*t = FAILURE;
+ if (derived->f2k_derived)
+ /* Set correct symbol-root. */
+ root = (uop ? derived->f2k_derived->tb_uop_root
+ : derived->f2k_derived->tb_sym_root);
+ else
+ return NULL;
+
/* Try to find it in the current type's namespace. */
res = gfc_find_symtree (root, name);
if (res && res->n.tb && !res->n.tb->error)
--- /dev/null
+! { dg-do compile }
+!
+! PR 55983: [4.7/4.8 Regression] ICE in find_typebound_proc_uop, at fortran/class.c:2711
+!
+! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
+
+ type :: mpdata_t
+ class(bcd_t), pointer :: bcx, bcy ! { dg-error "is a type that has not been declared" }
+ end type
+ type(mpdata_t) :: this
+ call this%bcx%fill_halos() ! { dg-error "is being used before it is defined" }
+end