mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
19 lines
413 B
D
19 lines
413 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail327.d(11): Error: executing an `asm` statement without `@trusted` annotation is not allowed in a `@safe` function
|
|
fail_compilation/fail327.d(12): Deprecation: `asm` statement cannot be marked `@safe`, use `@system` or `@trusted` instead
|
|
---
|
|
*/
|
|
|
|
@safe void* foo()
|
|
{
|
|
asm { xor EAX,EAX; }
|
|
asm @safe
|
|
{
|
|
mov [RIP], 0;
|
|
}
|
|
void* p;
|
|
RIP:
|
|
return p;
|
|
}
|