summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr43165.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr43165.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr43165.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr43165.c b/gcc/testsuite/gcc.dg/torture/pr43165.c
new file mode 100644
index 000000000..637fb4646
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr43165.c
@@ -0,0 +1,17 @@
+/* PR debug/43165 */
+/* { dg-options "-g" } */
+
+struct __attribute__((packed)) S
+{
+ unsigned char a;
+ unsigned short b;
+ unsigned short c;
+ unsigned d : 24;
+};
+
+void
+foo (struct S p)
+{
+ for (; p.c; p.c++)
+ ;
+}