+2014-09-20 Mark Wielaard <mjw@redhat.com>
+
+ * lib/gcc-gdb-test.exp (gdb-test): Transform gdb types "short int"
+ and "long int" to plain "short" and "long".
+ * gcc.dg/guality/const-volatile.c (struct bar): New struct
+ containing short and long long fields.
+ (bar): New variable to test the type.
+
2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62155
const signed char csc;
};
+struct bar
+{
+ short s;
+ const short cs;
+ volatile short vs;
+ const volatile short cvs;
+ volatile long long vll;
+};
+
+struct bar bar __attribute__((used));
struct foo foo;
const struct foo cfoo;
volatile struct foo vfoo;
/* { dg-final { gdb-test 50 "type:cvip" "int * const volatile" } } */
+/* { dg-final { gdb-test 50 "type:bar" "struct bar { short s; const short cs; volatile short vs; const volatile short cvs; volatile long long vll; }" } } */
/* { dg-final { gdb-test 50 "type:foo" "struct foo { const long cli; const signed char csc; }" } } */
/* { dg-final { gdb-test 50 "type:cfoo" "const struct foo { const long cli; const signed char csc; }" } } */
/* { dg-final { gdb-test 50 "type:vfoo" "volatile struct foo { const long cli; const signed char csc; }" } } */
# Squash all extra whitespace/newlines that gdb might use for
# "pretty printing" into one so result is just one line.
regsub -all {[\n\r\t ]+} $type " " type
+ # Old gdb might output "long int" instead of just "long"
+ # and "short int" instead of just "short". Canonicalize.
+ regsub -all {\mlong int\M} $type "long" type
+ regsub -all {\mshort int\M} $type "short" type
set expected [lindex $args 2]
if { $type == $expected } {
pass "$testname"