This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54134] [OOP] ICE overriding derived type bound function with allocatable character as result
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jul 2012 10:13:29 +0000
- Subject: [Bug fortran/54134] [OOP] ICE overriding derived type bound function with allocatable character as result
- Auto-submitted: auto-generated
- References: <bug-54134-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54134
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-07-31
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from janus at gcc dot gnu.org 2012-07-31 10:13:29 UTC ---
Patch:
Index: gcc/fortran/dependency.c
===================================================================
--- gcc/fortran/dependency.c (revision 189984)
+++ gcc/fortran/dependency.c (working copy)
@@ -261,6 +261,9 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2)
n1 = NULL;
n2 = NULL;
+ if (e1 == NULL && e2 == NULL)
+ return 0;
+
/* Remove any integer conversion functions to larger types. */
if (e1->expr_type == EXPR_FUNCTION && e1->value.function.isym
&& e1->value.function.isym->id == GFC_ISYM_CONVERSION
With this, the test case compiles without error and produces the expected
result. Will commit as obvious after regtesting.