summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr23200.c
blob: 56bf59c861ae1cdc53e56f4d4d9c912ef50795ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR inline-asm/23200 */
/* { dg-do compile { target nonpic } } */
/* { dg-options "-O0" } */

static char var;

void
foo (void)
{
  asm volatile ("" :: "i" (&var + 1));
}

typedef int T[];
typedef T *P;

int var2;

void
bar (void)
{
  asm volatile ("" :: "i"(&(*(P)&var2)[1]));
}