aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel1@de.ibm.com>2006-04-19 11:45:41 +0000
committerAndreas Krebbel <krebbel1@de.ibm.com>2006-04-19 11:45:41 +0000
commit66e5e13f2d1d58252261666273af66e6762c6cf6 (patch)
tree2260174418b14113abb50883007c90cf82b10d68 /gcc/testsuite/gcc.c-torture
parent99d9889f5e38311fa7fa6c4adc6dcf95512c1d8d (diff)
2006-04-19 Andreas Krebbel <krebbel1@de.ibm.com>
* ifcvt.c (noce_emit_move_insn): Call store_bit_field if the resulting move would be an INSV insn. (noce_process_if_block): Don't optimize if the destination is a ZERO_EXTRACT which can't be handled by noce_emit_move_insn. 2006-04-19 Andreas Krebbel <krebbel1@de.ibm.com> * gcc.c-torture/compile/20060419-1.c: Added. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@113072 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20060419-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20060419-1.c b/gcc/testsuite/gcc.c-torture/compile/20060419-1.c
new file mode 100644
index 00000000000..dc346ae02a1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20060419-1.c
@@ -0,0 +1,21 @@
+/* This failed because if conversion didn't handle insv patterns properly. */
+
+union y
+{
+ int a;
+ unsigned short b;
+};
+
+extern void bar (unsigned short u, union y v);
+
+void
+foo (int check)
+{
+ union y x;
+
+ if (check != 0)
+ x.b = 1;
+ else
+ x.b = 2;
+ bar (x.b, x);
+}