summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20040217-1.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-17 22:07:51 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-17 22:07:51 +0000
commited869d6569bc24ab5007b946d3e2be6f8fec1761 (patch)
tree89b22e8b379997542e1eaaf88a11e7c7254da0c8 /gcc/testsuite/gcc.dg/20040217-1.c
parent1ce7df12fc46339f7b3ae914bbb7f719320cb13b (diff)
downloadgcc-ed869d6569bc24ab5007b946d3e2be6f8fec1761.tar.gz
ChangeLog:
* combine.c (simplify_if_then_else): Do not replace (if_then_else (ne reg 0) (0) (const_int)) by (reg) if the modes differ. testsuite/ChangeLog: * gcc.dg/20040217-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77988 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20040217-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20040217-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20040217-1.c b/gcc/testsuite/gcc.dg/20040217-1.c
new file mode 100644
index 00000000000..7ca7388fe7c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20040217-1.c
@@ -0,0 +1,19 @@
+/* This used to ICE on s390x due to a bug in simplify_if_then_else. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern void use (int);
+void test (void)
+{
+ union
+ {
+ unsigned long ul;
+ signed char sc;
+ } u;
+
+ u.sc = 8;
+ u.sc &= 25;
+
+ use (u.sc);
+}
+