diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/array3.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/other/array3.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/array3.C b/gcc-4.9/gcc/testsuite/g++.dg/other/array3.C new file mode 100644 index 000000000..ce3641e8c --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/other/array3.C @@ -0,0 +1,14 @@ +// PR C++/28906: new on an array causes incomplete arrays to +// become complete with the wrong size. + +// the bounds of xvalue_store was being set to include want +// which was incorrect. + +// { dg-do compile } + +extern unsigned char xvalue_store[]; +bool reserve (int want) +{ + new unsigned char[want]; +} +unsigned char xvalue_store[257]; |