This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
- From: "bdavis at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Nov 2011 22:49:33 +0000
- Subject: [Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
- Auto-submitted: auto-generated
- References: <bug-51338-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338
--- Comment #5 from Bud Davis <bdavis at gcc dot gnu.org> 2011-11-28 22:49:33 UTC ---
Index: gcc/gcc/fortran/dependency.c
===================================================================
--- gcc/gcc/fortran/dependency.c (revision 181789)
+++ gcc/gcc/fortran/dependency.c (working copy)
@@ -245,6 +245,10 @@
int i;
gfc_expr *n1, *n2;
+ /* nothing to do here, move along */
+ if (e1 == NULL && e2 == NULL)
+ return 0;
+
n1 = NULL;
n2 = NULL;