This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
combine.c accesses uninitialized variable :-(
- To: gcc-patches at gcc dot gnu dot org
- Subject: combine.c accesses uninitialized variable :-(
- From: Andreas Jaeger <aj at suse dot de>
- Date: 12 Jan 2001 09:43:11 +0100
The last patch to combine accesses uninitialized memory. I noticed
this since compilation of glibc produced an ICE.
Here's a patch that also fixes another problem (a prototype declared
with static but the function doesn't have static).
Ok to install if it passes bootstrap and checking?
Andreas
2001-01-12 Andreas Jaeger <aj@suse.de>
* combine.c (reversed_comparison): Fix typo in last patch.
(combine_reversed_comparison_code): Make static to follow
prototype declaration.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.174
diff -u -r1.174 combine.c
--- combine.c 2001/01/11 23:10:30 1.174
+++ combine.c 2001/01/12 08:42:28
@@ -11123,7 +11123,7 @@
/* Like jump.c' reversed_comparison_code, but use combine infrastructure for
searching backward. */
-enum rtx_code
+static enum rtx_code
combine_reversed_comparison_code (exp)
rtx exp;
{
@@ -11135,7 +11135,7 @@
return code1;
/* Otherwise try and find where the condition codes were last set and
use that. */
- x = get_last_value (XEXP (x, 0));
+ x = get_last_value (XEXP (exp, 0));
if (GET_CODE (x) != COMPARE)
return UNKNOWN;
return reversed_comparison_code_parts (GET_CODE (exp),
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj