Debian Codegraph @

gcc/testsuite/g++.dg/ext/asm10.C

raw
1 // PR inline-asm/32109
2 // { dg-do compile }
3 // { dg-options "-O2" }
4
5 struct A { int i[3]; ~A (); };
6 struct A a;
7 struct B { struct A c; int i; B (); } b;
8
9 B::B ()
10 {
11 __asm ("" : : "r" (a)); // { dg-error "impossible constraint|non-memory input" }
12 __asm ("" : : "r" (b.c)); // { dg-error "impossible constraint|non-memory input" }
13 __asm ("" : : "r" (c)); // { dg-error "impossible constraint|non-memory input" }
14 }