summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/asm-1.c
blob: fecac780f6958955553f42046f63b5f9f64112e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-require-effective-target int32plus } */

struct x {
  int selector;
};

void f()
{
  struct x* addr;
  __asm__("mov %%gs,%0":"=r" ((unsigned short)addr->selector)); /* { dg-error "lvalue" "casts make rvalues" } */
}