diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C b/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C new file mode 100644 index 0000000..7873889 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C @@ -0,0 +1,17 @@ +// { dg-do compile } + +// Copyright (C) 2002 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 14 Aug 2002 <nathan@codesourcery.com> + +// PR c++ 7598, offsetof broke +// PR c++ 11072, DR 273's solution is broken + +#include <cstddef> + +struct F +{ + char i; + char j; +}; + +static int ary[offsetof(F, j)]; |