aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c b/gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c
new file mode 100644
index 000000000..937fb64f5
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/bitfld-8.c
@@ -0,0 +1,7 @@
+/* Test that too wide bit-fields are hard errors. PR c/3347. */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk>, from PR c/3347 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct { int i : 1999; } x; /* { dg-bogus "warning" "warning in place of error" } */
+/* { dg-error "width" "bit-field too wide" { target *-*-* } 6 } */