aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c')
-rw-r--r--gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c b/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c
new file mode 100644
index 0000000..c404e5b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pointer-counted-by-4-char.c
@@ -0,0 +1,6 @@
+/* Test the attribute counted_by for pointer field and its usage in
+ * __builtin_dynamic_object_size. */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+#define PTR_TYPE char
+#include "pointer-counted-by-4.c"