This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] OpenCL datatypes test fixes


On Wed, 16 Feb 2011 11:08:54 +0100, Ken Werner wrote:
> On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote:
> > Ken Werner wrote:
> > > -gdb_test "whatis c2" "type = char \\\[2\\\]"
> > > +gdb_test "whatis c2" "type = char2|char \\\[2\\\]"
> > 
> > Don't we need some parentheses here (and everywere you've
> > introduced alternatives via |)?  Otherwise, it seems that
> > this would stop working with the older compilers ...
> 
> Hi Ulrich,
> 
> Thanks for looking into this patch. Sometimes the GDB testsuite is a mystery 
> to me. This time it seems to work without parentheses: 
> 
> old compiler:
>   whatis c2
>   type = char [2]
>   (gdb) PASS: gdb.opencl/datatypes.exp: whatis c2
> 
> new compiler:
>   whatis c2
>   type = char2
>   (gdb) PASS: gdb.opencl/datatypes.exp: whatis c2

But if it prints:
whatis c2
type = const char [2]

it will also PASS.  It should not.  That is currently the line
	gdb_test "whatis c2" "type = char2|char \\\[2\\\]"
means:
	gdb_test "whatis c2" "(type = char2|char \\\[2\\\])"
which also means:
	gdb_test "whatis c2" ".*(type = char2|char \\\[2\\\])"
which is not right.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]