summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c
diff options
context:
space:
mode:
authorjconner <jconner@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 16:44:50 +0000
committerjconner <jconner@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 16:44:50 +0000
commit61ab55fa4a07001828ade78127075e2e355c77ca (patch)
tree39b67be03c215eba0ecd4a3f4ff6459cc36ed03e /gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c
parentfa4b183bf8ce1fbed9f61691e2697ed556958497 (diff)
downloadgcc-61ab55fa4a07001828ade78127075e2e355c77ca.tar.gz
2007-01-18 Josh Conner <jconner@apple.com>
PR target/30485 * gcc.dg/vect/vect.exp: Add support for no-trapping-math tests. * gcc.dg/vect/no-trapping-math-1: New. * gcc.dg/vect/no-trapping-math-2: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c b/gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c
new file mode 100644
index 00000000000..e9d9570146b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-trapping-math-1.c
@@ -0,0 +1,12 @@
+/* Test for pr30485. */
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_condition } */
+void
+foo (float a[32], float b[2][32])
+{
+ int i;
+ for (i = 0; i < 32; i++)
+ a[i] = (b[0][i] > b[1][i]) ? b[0][i] : b[1][i];
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */