old-cross-binutils/gdb/testsuite/gdb.cp/pr10728-y.cc
Chris Moller 83b10087f4 PR gdb/10728
* valarith.c (value_ptrdiff): Added a test for a zero type length,
	warn if found, and assume length = 1.
* gdb.cp/pr10728-x.h: New file.
* gdb.cp/pr10728-x.cc: New file.
* gdb.cp/pr10728-y.cc: New file.
* gdb.cp/pr10728.exp: New file.
* gdb.cp/Makefile.in (EXECUTABLES): Add pr10728
2010-02-08 18:27:53 +00:00

11 lines
125 B
C++

#include "pr10728-x.h"
struct Y{};
X* y()
{
static X xx;
static Y yy;
xx.y1 = &yy;
xx.y2 = xx.y1+1;
return &xx;
}