aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/class.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2016-11-12 10:25:47 +0100
committerJanus Weil <janus@gcc.gnu.org>2016-11-12 10:25:47 +0100
commitb93d8a3f16bc7582254edf988b14009587fe00a6 (patch)
treea92471f741422298fc072b9fce90e59618cc8d65 /gcc/fortran/class.c
parent330cc73d9838aa51c162f29ed1e5ccf659b440d3 (diff)
downloadgcc-b93d8a3f16bc7582254edf988b14009587fe00a6.zip
gcc-b93d8a3f16bc7582254edf988b14009587fe00a6.tar.gz
gcc-b93d8a3f16bc7582254edf988b14009587fe00a6.tar.bz2
re PR fortran/77501 ([F03] ICE in gfc_match_generic, at fortran/decl.c:9429)
2016-11-12 Janus Weil <janus@gcc.gnu.org> PR fortran/77501 * class.c (gfc_find_typebound_intrinsic_op): Remove an unnecessary assert and nullification. * decl.c (gfc_match_decl_type_spec): Use gfc_get_tbp_symtree, fix indentation. (gfc_match_generic): Remove an unnecessary assert. Use gfc_get_tbp_symtree to avoid ICE. 2016-11-12 Janus Weil <janus@gcc.gnu.org> PR fortran/77501 * gfortran.dg/typebound_generic_16.f90: New test. From-SVN: r242335
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r--gcc/fortran/class.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index b7f68d2..b42ec40 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -2963,15 +2963,6 @@ gfc_find_typebound_intrinsic_op (gfc_symbol* derived, bool* t,
gfc_symtree*
gfc_get_tbp_symtree (gfc_symtree **root, const char *name)
{
- gfc_symtree *result;
-
- result = gfc_find_symtree (*root, name);
- if (!result)
- {
- result = gfc_new_symtree (root, name);
- gcc_assert (result);
- result->n.tb = NULL;
- }
-
- return result;
+ gfc_symtree *result = gfc_find_symtree (*root, name);
+ return result ? result : gfc_new_symtree (root, name);
}