aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c
new file mode 100644
index 000000000..458158cc6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61923.c
@@ -0,0 +1,36 @@
+/* PR debug/61923 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+typedef struct
+{
+ struct
+ {
+ struct
+ {
+ char head;
+ } tickets;
+ };
+} arch_spinlock_t;
+struct ext4_map_blocks
+{
+ int m_lblk;
+ int m_len;
+ int m_flags;
+};
+int ext4_da_map_blocks_ei_0;
+void fn1 (int p1, struct ext4_map_blocks *p2)
+{
+ int ret;
+ if (p2->m_flags)
+ {
+ ext4_da_map_blocks_ei_0++;
+ arch_spinlock_t *lock;
+ switch (sizeof *&lock->tickets.head)
+ case 1:
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
+ __asm__("");
+ ret = 0;
+ }
+ fn2 (p2->m_lblk, p2->m_len);
+}