about summary refs log tree commit diff
path: root/tests/ui/asm/global-asm-with-error.rs
blob: c2253e3cb8747a4d46fdc31b189c8d0ad82b05a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Ensure that we don't ICE when constructing the fake MIR body for a global
// asm when the body has errors. See #137470.

//@ needs-asm-support

use std::arch::global_asm;

global_asm!("/* {} */", sym a);
//~^ ERROR cannot find value `a` in this scope

fn main() {}