From 8954db33ac73962ac337cc456a782db7e9539c06 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 25 Jan 2013 17:16:43 +0000 Subject: http://sourceware.org/ml/gdb-patches/2012-11/msg00312.html gdb/ChangeLog * valarith.c (value_vector_widen): New function for replicating a scalar into a vector. (value_binop): Use value_vector_widen to widen scalar to vector rather than casting, this better matches gcc C behaviour. * valops.c (value_casst): Update logic for casting between vector types, and for casting from scalar to vector, try to match gcc C behaviour. * value.h (value_vector_widen): Declare. * opencl-lang.c (opencl_value_cast): New opencl specific casting function, handle special case for casting scalar to vector. (opencl_relop): Use opencl_value_cast. (evaluate_subexp_opencl): Use opencl_value_cast instead of value_cast, and handle BINOP_ASSIGN, UNOP_CAST, and UNOP_CAST_TYPE in order to use opencl_value_cast. gdb/testsuite/ChangeLog * gdb.base/gnu_vector.c: New variable for use in tests. * gdb.base/gnu_vector.exp: Update and extend tests to reflect changes in scalar to vector casting and widening. * gdb.python/py-type.c: New variables for use in tests. * gdb.python/py-type.exp: Update vector related tests to reflect changes in scalar to vector casting and widening. --- gdb/testsuite/gdb.base/gnu_vector.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/testsuite/gdb.base/gnu_vector.c') diff --git a/gdb/testsuite/gdb.base/gnu_vector.c b/gdb/testsuite/gdb.base/gnu_vector.c index 76eefed..062aadb 100644 --- a/gdb/testsuite/gdb.base/gnu_vector.c +++ b/gdb/testsuite/gdb.base/gnu_vector.c @@ -31,6 +31,7 @@ int ia = 2; int ib = 1; float fa = 2; float fb = 1; +long long lla __attribute__ ((mode(DI))) = 0x0000000100000001ll; char4 c4 = {1, 2, 3, 4}; int4 i4a = {2, 4, 8, 16}; int4 i4b = {1, 2, 8, 4}; -- cgit v1.1