summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/convert.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/convert-vec-1.c3
4 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ab280adb647..4946ec4f9b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -10,6 +10,9 @@
2004-09-10 James E Wilson <wilson@specifixinc.com>
+ * convert.c (convert_to_vector): Replace recursive call with
+ error_mark_node.
+
* emit-rtl.c (gen_const_vector): Renamed from gen_const_vector_0.
Add integer argument named constant. Use const_tiny_rtx instead of
CONST0_RTX.
diff --git a/gcc/convert.c b/gcc/convert.c
index ceefbf24906..36bae1c7793 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -761,6 +761,6 @@ convert_to_vector (tree type, tree expr)
default:
error ("can't convert value to a vector");
- return convert_to_vector (type, integer_zero_node);
+ return error_mark_node;
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d899403219e..5257ba5e068 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-10 James E Wilson <wilson@specifixinc.com>
+
+ * gcc.dg/convert-vec-1.c: New test.
+
2004-09-10 Roger Sayle <roger@eyesopen.com>
PR middle-end/17024
diff --git a/gcc/testsuite/gcc.dg/convert-vec-1.c b/gcc/testsuite/gcc.dg/convert-vec-1.c
new file mode 100644
index 00000000000..49872984073
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/convert-vec-1.c
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+typedef float v2sf __attribute__ ((vector_size (8)));
+v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */