aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C
diff options
context:
space:
mode:
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.C17
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 000000000..78738892a
--- /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)];