summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr27301.c
blob: 3b5a8f55b5d533b39c36b2477d8ad9ee1441598a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR c/27301 */
/* { dg-do compile } */
/* { dg-options "-O2 -std=gnu89" } */

void
foo (void *ptr, long n)
{
  __asm__ __volatile__ ("" :: "m" (({ struct { char x[n]; } *p = ptr; *p; })));
}

void
bar (void *ptr, long n)
{
  __asm__ __volatile__ ("" :: "m" (*({ struct { char x[n]; } *p = ptr; p; })));
}