This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.0.1 PATCH]: Fix ICE in duplicate_eh_regions (java/3596)
- To: gcc-patches at gcc dot gnu dot org
- Subject: [3.0.1 PATCH]: Fix ICE in duplicate_eh_regions (java/3596)
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 30 Jul 2001 23:23:30 -0400 (EDT)
In duplicate_eh_regions we have
if (!cur || cur->region_number != i)
continue;
n_array[i] = duplicate_eh_region_1 (cur, map);
followed by
for (i = 1; i <= ifun_last_region_number; ++i)
if (n_array[i]->outer == NULL)
n_array[i]->outer = cur;
The first loop suggests n_array[i] may be null; the latter doesn't test
this. A null element causes an ICE when inlining methods with exception
handling. See java/3596 for a test case.
Bootstrapped on 3.0 branch with alphaev56-unknown-linux-gnu.
2001-07-30 Jeff Sturm <jsturm@one-point.com>
* except.c (duplicate_eh_regions): Test n_array[i] for NULL.
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.143.2.13
diff -u -r1.143.2.13 except.c
--- except.c 2001/06/08 22:55:33 1.143.2.13
+++ except.c 2001/07/31 03:22:00
@@ -1448,7 +1448,7 @@
cur->inner = root;
for (i = 1; i <= ifun_last_region_number; ++i)
- if (n_array[i]->outer == NULL)
+ if (n_array[i] && n_array[i]->outer == NULL)
n_array[i]->outer = cur;
}
else