1 // Require a gdb that can read DW_TAG_variant_part.
2 // min-gdb-version: 8.2
4 // compile-flags:-g -Z thinlto
6 // === GDB TESTS ===================================================================================
10 // gdb-command:print *abc
11 // gdbr-check:$1 = enum_thinlto::ABC::TheA{x: 0, y: 8970181431921507452}
13 // === LLDB TESTS ==================================================================================
17 // lldb-command:print *abc
18 // lldbg-check:(enum_thinlto::ABC) $0 =
19 // lldbr-check:(enum_thinlto::ABC) *abc = (x = 0, y = 8970181431921507452)
21 #![allow(unused_variables)]
22 #![feature(omit_gdb_pretty_printer_section)]
23 #![omit_gdb_pretty_printer_section]
25 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
26 // the size of the discriminant value is machine dependent, this has be taken into account when
27 // datatype layout should be predictable as in this case.
30 TheA { x: i64, y: i64 },
35 let abc = ABC::TheA { x: 0, y: 0x7c7c_7c7c_7c7c_7c7c };
43 println!("{:?}", abc);