aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>2000-09-12 19:06:05 +0000
committerJim Wilson <wilson@gcc.gnu.org>2000-09-12 12:06:05 -0700
commitcc2999aaf6d6661c2ffa3443b84c0d665f2a1d04 (patch)
treedd696bf575c93971cc1dc5e9a20aea0864816d0a /gcc
parent3e80ddc74200fb7c9c3a0e18321051dd9fd6c9ca (diff)
downloadgcc-cc2999aaf6d6661c2ffa3443b84c0d665f2a1d04.zip
gcc-cc2999aaf6d6661c2ffa3443b84c0d665f2a1d04.tar.gz
gcc-cc2999aaf6d6661c2ffa3443b84c0d665f2a1d04.tar.bz2
Fix ia64-linux glibc intl/loadmsgcat.c miscompilation.
* ifcvt.c (noce_process_if_block): If A and B are the same, and no else block, and X has side-effects, then fail. From-SVN: r36373
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ifcvt.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1520949..19e9f54 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-12 Jim Wilson <wilson@cygnus.com>
+
+ * ifcvt.c (noce_process_if_block): If A and B are the same, and no
+ else block, and X has side-effects, then fail.
+
2000-09-12 Greg McGary <greg@mcgary.org>
* config/mips/mips-protos.h
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 901bd42..3ca0e6c 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1247,6 +1247,11 @@ noce_process_if_block (test_bb, then_bb, else_bb, join_bb)
reorder_insns (insn_b, insn_b, PREV_INSN (if_info.cond_earliest));
insn_b = NULL_RTX;
}
+ /* If we have "x = b; if (...) x = a;", and x has side-effects, then
+ x must be executed twice. */
+ else if (insn_b && side_effects_p (orig_x))
+ return FALSE;
+
x = orig_x;
goto success;
}