+2015-11-13 Yao Qi <yao.qi@linaro.org>
+
+ * gdb.base/gnu_vector.exp: Check the return value by "p res".
+ * gdb.base/gnu_vector.c: Don't include stdio.h.
+ (main): Don't print res and call add_some_intvecs.
+
2015-11-11 Marcin KoĆcielnicki <koriakin@0x04.net>
* gdb.trace/change-loc.h: include "trace-common.h", remove SYMBOL
Contributed by Ken Werner <ken.werner@de.ibm.com> */
#include <stdarg.h>
-#include <stdio.h>
#define VECTOR(n, type) \
type __attribute__ ((vector_size (n * sizeof(type))))
int4 res;
res = add_some_intvecs (i4a, i4a + i4b, i4b);
- printf ("%d %d %d %d\n", res[0], res[1], res[2], res[3]);
res = add_some_intvecs (i4a, i4a + i4b, i4b);
- printf ("%d %d %d %d\n", res[0], res[1], res[2], res[3]);
+
+ add_some_intvecs (i4a, i4a + i4b, i4b);
return 0;
}
}
}
-# Test "return" from vector-valued function.
gdb_continue "add_some_intvecs"
+gdb_test "up" ""
+gdb_test "p res" "\\{10, 20, 48, 72\\}.*"
+gdb_test "down" ""
+
+
+# Test "return" from vector-valued function.
set test "return from vector-valued function"
set should_kfail 0
gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
exp_continue
}
}
-set test "verify vector return value"
-gdb_test_multiple "continue" $test {
- -re "4 2 7 6\r\n.*$gdb_prompt $" {
- pass $test
- }
- -re "10 20 48 72\r\n.*$gdb_prompt $" {
- if { $should_kfail } {
- kfail "gdb/8549" $test
- } else {
- fail $test
- }
- }
-}
+
+gdb_test "next" ""
+gdb_test "p res" "\\{4, 2, 7, 6\\}.*" "verify vector return value"