This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
patch that caused regression PR c/8730
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc at gcc dot gnu dot org, kenner at nyu dot edu
- Date: Tue, 24 Dec 2002 12:31:49 -0800
- Subject: patch that caused regression PR c/8730
The regression reported in PR c/8730 showed up starting
with this large patch from long, long ago:
Sat Nov 27 08:38:26 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* fold-const.c (negate_expr, associate_trees, extract_muldiv): New.
(split_tree): Completely rework to make more general.
(make_range, fold): Call negate_expr.
(fold, case NEGATE_EXPR): Simplify -(a-b) is -ffast-math.
(fold, associate): Call new split_tree and associate_trees.
(fold, case MULT_EXPR, case *_{DIV,MOD}_EXPR): Call extract_muldiv.
Here's a small test case that causes the compiler to ICE when compiled
on i686-linux with the mainline:
-------------------
void foo() {
void *bar (int i, int A[1][i]) { return A[0]; };
};
-------------------
The same patch causes the behavior to change with the
submitter's larger test case.
Output from the the mainline:
8730.c: In function `bar':
8730.c:2: internal compiler error: in expand_expr, at expr.c:6823
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I've added this information to the PR.
Janis