This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]