1 // compile-flags: --target hexagon-unknown-linux-musl
2 // needs-llvm-components: hexagon
4 // Verify that the hexagon targets implement the repr(C) for enums correctly.
7 #![feature(never_type, rustc_attrs, no_core, lang_items)]
14 #[rustc_layout(debug)]
16 enum A { Apple }
//~ ERROR: layout_of
18 #[rustc_layout(debug)]
20 enum B { Banana = 255, }
//~ ERROR: layout_of
22 #[rustc_layout(debug)]
24 enum C { Chaenomeles = 256, }
//~ ERROR: layout_of
26 #[rustc_layout(debug)]
28 enum P { Peach = 0x1000_0000isize, }
//~ ERROR: layout_of
30 const TANGERINE
: usize = 0x8100_0000; // hack to get negative numbers without negation operator!
32 #[rustc_layout(debug)]
34 enum T { Tangerine = TANGERINE as isize }
//~ ERROR: layout_of