blob: 6950374643c022e1e94b5a0b5ebf5be9b0c71075 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* { dg-do compile } */
/* { dg-options "-std=gnu++17" } */
/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
#include <string>
constexpr std::string_view genfoo ()
{
return "foo %1,%0";
}
constexpr std::string_view genoutput ()
{
return "=r";
}
constexpr std::string_view geninput ()
{
return "r";
}
constexpr std::string_view genclobber ()
{
return "memory";
}
void f()
{
int a;
asm(genfoo () : /* { dg-error "expected string-literal or constexpr in parentheses" } */
genoutput() (a) :
geninput() (1) :
genclobber());
}
|