• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // ignore-lldb
2 
3 // GDB changed the way that it formatted Foreign types
4 // min-gdb-version: 9.2
5 
6 // compile-flags:-g
7 
8 // === GDB TESTS ===================================================================================
9 
10 // gdb-command:run
11 
12 // STRUCTS
13 // gdb-command:whatis simple_struct
14 // gdb-check:type = type_names::Struct1
15 
16 // gdb-command:whatis generic_struct1
17 // gdb-check:type = type_names::GenericStruct<type_names::mod1::Struct2, type_names::mod1::mod2::Struct3>
18 
19 // gdb-command:whatis generic_struct2
20 // gdb-check:type = type_names::GenericStruct<type_names::Struct1, extern "fastcall" fn(isize) -> usize>
21 
22 // gdb-command:whatis mod_struct
23 // gdb-check:type = type_names::mod1::Struct2
24 
25 // ENUMS
26 // gdb-command:whatis simple_enum_1
27 // gdb-check:type = type_names::Enum1
28 
29 // gdb-command:whatis simple_enum_2
30 // gdb-check:type = type_names::Enum1
31 
32 // gdb-command:whatis simple_enum_3
33 // gdb-check:type = type_names::mod1::Enum2
34 
35 // gdb-command:whatis generic_enum_1
36 // gdb-check:type = type_names::mod1::mod2::Enum3<type_names::mod1::Struct2>
37 
38 // gdb-command:whatis generic_enum_2
39 // gdb-check:type = type_names::mod1::mod2::Enum3<type_names::Struct1>
40 
41 // TUPLES
42 // gdb-command:whatis tuple1
43 // gdb-check:type = (u32, type_names::Struct1, type_names::mod1::mod2::Enum3<type_names::mod1::Struct2>)
44 
45 // gdb-command:whatis tuple2
46 // gdb-check:type = ((type_names::Struct1, type_names::mod1::mod2::Struct3), type_names::mod1::Enum2, char)
47 
48 // BOX
49 // gdb-command:whatis box1
50 // gdb-check:type = (alloc::boxed::Box<f32, alloc::alloc::Global>, i32)
51 
52 // gdb-command:whatis box2
53 // gdb-check:type = (alloc::boxed::Box<type_names::mod1::mod2::Enum3<f32>, alloc::alloc::Global>, i32)
54 
55 // REFERENCES
56 // gdb-command:whatis ref1
57 // gdb-check:type = (&type_names::Struct1, i32)
58 
59 // gdb-command:whatis ref2
60 // gdb-check:type = (&type_names::GenericStruct<char, type_names::Struct1>, i32)
61 
62 // gdb-command:whatis mut_ref1
63 // gdb-check:type = (&mut type_names::Struct1, i32)
64 
65 // gdb-command:whatis mut_ref2
66 // gdb-check:type = (&mut type_names::GenericStruct<type_names::mod1::Enum2, f64>, i32)
67 
68 // RAW POINTERS
69 // gdb-command:whatis mut_ptr1
70 // gdb-check:type = (*mut type_names::Struct1, isize)
71 
72 // gdb-command:whatis mut_ptr2
73 // gdb-check:type = (*mut isize, isize)
74 
75 // gdb-command:whatis mut_ptr3
76 // gdb-check:type = (*mut type_names::mod1::mod2::Enum3<type_names::Struct1>, isize)
77 
78 // gdb-command:whatis const_ptr1
79 // gdb-check:type = (*const type_names::Struct1, isize)
80 
81 // gdb-command:whatis const_ptr2
82 // gdb-check:type = (*const isize, isize)
83 
84 // gdb-command:whatis const_ptr3
85 // gdb-check:type = (*const type_names::mod1::mod2::Enum3<type_names::Struct1>, isize)
86 
87 // VECTORS
88 // gdb-command:whatis fixed_size_vec1
89 // gdb-check:type = ([type_names::Struct1; 3], i16)
90 
91 // gdb-command:whatis fixed_size_vec2
92 // gdb-check:type = ([usize; 3], i16)
93 
94 // gdb-command:whatis slice1
95 // gdb-check:type = &[usize]
96 
97 // gdb-command:whatis slice2
98 // gdb-check:type = &mut [type_names::mod1::Enum2]
99 
100 // TRAITS
101 // gdb-command:whatis box_trait
102 // gdb-check:type = alloc::boxed::Box<dyn type_names::Trait1, alloc::alloc::Global>
103 
104 // gdb-command:whatis ref_trait
105 // gdb-check:type = &dyn type_names::Trait1
106 
107 // gdb-command:whatis mut_ref_trait
108 // gdb-check:type = &mut dyn type_names::Trait1
109 
110 // gdb-command:whatis generic_box_trait
111 // gdb-check:type = alloc::boxed::Box<dyn type_names::Trait2<i32, type_names::mod1::Struct2>, alloc::alloc::Global>
112 
113 // gdb-command:whatis generic_ref_trait
114 // gdb-check:type = &dyn type_names::Trait2<type_names::Struct1, type_names::Struct1>
115 
116 // gdb-command:whatis generic_mut_ref_trait
117 // gdb-check:type = &mut dyn type_names::Trait2<type_names::mod1::mod2::Struct3, type_names::GenericStruct<usize, isize>>
118 
119 // gdb-command:whatis no_principal_trait
120 // gdb-check:type = alloc::boxed::Box<(dyn core::marker::Send + core::marker::Sync), alloc::alloc::Global>
121 
122 // gdb-command:whatis has_associated_type_trait
123 // gdb-check:type = &(dyn type_names::Trait3<u32, AssocType=isize> + core::marker::Send)
124 
125 // gdb-command:whatis has_associated_type_but_no_generics_trait
126 // gdb-check:type = &dyn type_names::TraitNoGenericsButWithAssocType<Output=isize>
127 
128 // BARE FUNCTIONS
129 // gdb-command:whatis rust_fn
130 // gdb-check:type = (fn(core::option::Option<isize>, core::option::Option<&type_names::mod1::Struct2>), usize)
131 
132 // gdb-command:whatis extern_c_fn
133 // gdb-check:type = (extern "C" fn(isize), usize)
134 
135 // gdb-command:whatis unsafe_fn
136 // gdb-check:type = (unsafe fn(core::result::Result<char, f64>), usize)
137 
138 // gdb-command:whatis rust_fn_with_return_value
139 // gdb-check:type = (fn(f64) -> usize, usize)
140 
141 // gdb-command:whatis extern_c_fn_with_return_value
142 // gdb-check:type = (extern "C" fn() -> type_names::Struct1, usize)
143 
144 // gdb-command:whatis unsafe_fn_with_return_value
145 // gdb-check:type = (unsafe fn(type_names::GenericStruct<u16, u8>) -> type_names::mod1::Struct2, usize)
146 
147 // gdb-command:whatis generic_function_int
148 // gdb-check:type = (fn(isize) -> isize, usize)
149 
150 // gdb-command:whatis generic_function_struct3
151 // gdb-check:type = (fn(type_names::mod1::mod2::Struct3) -> type_names::mod1::mod2::Struct3, usize)
152 
153 // gdb-command:whatis variadic_function
154 // gdb-check:type = (unsafe extern "C" fn(*const u8, ...) -> isize, usize)
155 
156 // CLOSURES
157 // gdb-command:whatis closure1
158 // gdb-check:type = (type_names::main::{closure_env#0}, usize)
159 
160 // gdb-command:whatis closure2
161 // gdb-check:type = (type_names::main::{closure_env#1}, usize)
162 
163 // FOREIGN TYPES
164 // gdb-command:whatis foreign1
165 // gdb-check:type = *mut type_names::{extern#0}::ForeignType1
166 
167 // gdb-command:whatis foreign2
168 // gdb-check:type = *mut type_names::mod1::{extern#0}::ForeignType2
169 
170 // === CDB TESTS ==================================================================================
171 
172 // cdb-command: g
173 
174 // STRUCTS
175 // 0-sized structs appear to be optimized away in some cases, so only check the structs that do
176 // actually appear.
177 // cdb-command:dv /t *_struct
178 
179 // ENUMS
180 // cdb-command:dv /t *_enum_*
181 // cdb-check:union enum2$<type_names::Enum1> simple_enum_1 = [...]
182 // cdb-check:union enum2$<type_names::Enum1> simple_enum_2 = [...]
183 // cdb-check:union enum2$<type_names::mod1::Enum2> simple_enum_3 = [...]
184 // cdb-check:union enum2$<type_names::mod1::mod2::Enum3<type_names::mod1::Struct2> > generic_enum_1 = [...]
185 // cdb-check:union enum2$<type_names::mod1::mod2::Enum3<type_names::Struct1> > generic_enum_2 = [...]
186 
187 // TUPLES
188 // cdb-command:dv /t tuple*
189 // cdb-check:struct tuple$<u32,type_names::Struct1,enum2$<type_names::mod1::mod2::Enum3<type_names::mod1::Struct2> > > tuple1 = [...]
190 // cdb-check:struct tuple$<tuple$<type_names::Struct1,type_names::mod1::mod2::Struct3>,enum2$<type_names::mod1::Enum2>,char> tuple2 = [...]
191 
192 // BOX
193 // cdb-command:dv /t box*
194 // cdb-check:struct tuple$<alloc::boxed::Box<f32,alloc::alloc::Global>,i32> box1 = [...]
195 // cdb-check:struct tuple$<alloc::boxed::Box<enum2$<type_names::mod1::mod2::Enum3<f32> >,alloc::alloc::Global>,i32> box2 = [...]
196 
197 // REFERENCES
198 // cdb-command:dv /t *ref*
199 // cdb-check:struct tuple$<ref$<type_names::Struct1>,i32> ref1 = [...]
200 // cdb-check:struct tuple$<ref$<type_names::GenericStruct<char,type_names::Struct1> >,i32> ref2 = [...]
201 // cdb-check:struct tuple$<ref_mut$<type_names::Struct1>,i32> mut_ref1 = [...]
202 // cdb-check:struct tuple$<ref_mut$<type_names::GenericStruct<enum2$<type_names::mod1::Enum2>,f64> >,i32> mut_ref2 = [...]
203 
204 // RAW POINTERS
205 // cdb-command:dv /t *_ptr*
206 // cdb-check:struct tuple$<ptr_mut$<type_names::Struct1>,isize> mut_ptr1 = [...]
207 // cdb-check:struct tuple$<ptr_mut$<isize>,isize> mut_ptr2 = [...]
208 // cdb-check:struct tuple$<ptr_mut$<enum2$<type_names::mod1::mod2::Enum3<type_names::Struct1> > >,isize> mut_ptr3 = [...]
209 // cdb-check:struct tuple$<ptr_const$<type_names::Struct1>,isize> const_ptr1 = [...]
210 // cdb-check:struct tuple$<ptr_const$<isize>,isize> const_ptr2 = [...]
211 // cdb-check:struct tuple$<ptr_const$<enum2$<type_names::mod1::mod2::Enum3<type_names::Struct1> > >,isize> const_ptr3 = [...]
212 
213 // VECTORS
214 // cdb-command:dv /t *vec*
215 // cdb-check:struct tuple$<array$<type_names::Struct1,3>,i16> fixed_size_vec1 = [...]
216 // cdb-check:struct tuple$<array$<usize,3>,i16> fixed_size_vec2 = [...]
217 // cdb-check:struct alloc::vec::Vec<usize,alloc::alloc::Global> vec1 = [...]
218 // cdb-check:struct alloc::vec::Vec<enum2$<type_names::mod1::Enum2>,alloc::alloc::Global> vec2 = [...]
219 // cdb-command:dv /t slice*
220 // cdb-check:struct ref$<slice2$<usize> > slice1 = [...]
221 // cdb-check:struct ref_mut$<slice2$<enum2$<type_names::mod1::Enum2> > > slice2 = [...]
222 
223 // TRAITS
224 // cdb-command:dv /t *_trait
225 // cdb-check:struct ref_mut$<dyn$<type_names::Trait2<type_names::mod1::mod2::Struct3,type_names::GenericStruct<usize,isize> > > > generic_mut_ref_trait = [...]
226 // cdb-check:struct ref$<dyn$<type_names::Trait2<type_names::Struct1,type_names::Struct1> > > generic_ref_trait = [...]
227 // cdb-check:struct alloc::boxed::Box<dyn$<type_names::Trait2<i32,type_names::mod1::Struct2> >,alloc::alloc::Global> generic_box_trait = [...]
228 // cdb-check:struct alloc::boxed::Box<dyn$<type_names::Trait1>,alloc::alloc::Global> box_trait = [...]
229 // cdb-check:struct ref$<dyn$<type_names::Trait1> > ref_trait = [...]
230 // cdb-check:struct ref_mut$<dyn$<type_names::Trait1> > mut_ref_trait = [...]
231 // cdb-check:struct alloc::boxed::Box<dyn$<core::marker::Send,core::marker::Sync>,alloc::alloc::Global> no_principal_trait = [...]
232 // cdb-check:struct ref$<dyn$<type_names::Trait3<u32,assoc$<AssocType,isize> >,core::marker::Send> > has_associated_type_trait = struct ref$<dyn$<type_names::Trait3<u32,assoc$<AssocType,isize> >,core::marker::Send> >
233 // cdb-check:struct ref$<dyn$<type_names::TraitNoGenericsButWithAssocType<assoc$<Output,isize> > > > has_associated_type_but_no_generics_trait = struct ref$<dyn$<type_names::TraitNoGenericsButWithAssocType<assoc$<Output,isize> > > >
234 
235 // BARE FUNCTIONS
236 // cdb-command:dv /t *_fn*
237 // cdb-check:struct tuple$<type_names::mod1::Struct2 (*)(type_names::GenericStruct<u16,u8>),usize> unsafe_fn_with_return_value = [...]
238 // cdb-check:struct tuple$<type_names::Struct1 (*)(),usize> extern_c_fn_with_return_value = [...]
239 // cdb-check:struct tuple$<usize (*)(f64),usize> rust_fn_with_return_value = [...]
240 // cdb-check:struct tuple$<void (*)(enum2$<core::result::Result<char,f64> >),usize> unsafe_fn = [...]
241 // cdb-check:struct tuple$<void (*)(isize),usize> extern_c_fn = [...]
242 // cdb-check:struct tuple$<void (*)(enum2$<core::option::Option<isize> >,enum2$<core::option::Option<ref$<type_names::mod1::Struct2> > >),usize> rust_fn = [...]
243 // cdb-command:dv /t *_function*
244 // cdb-check:struct tuple$<isize (*)(ptr_const$<u8>, ...),usize> variadic_function = [...]
245 // cdb-check:struct tuple$<type_names::mod1::mod2::Struct3 (*)(type_names::mod1::mod2::Struct3),usize> generic_function_struct3 = [...]
246 // cdb-check:struct tuple$<isize (*)(isize),usize> generic_function_int = [...]
247 // cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn")
248 // cdb-check:Return Type: void
249 // cdb-check:Parameter Types: enum2$<core::option::Option<isize> >,enum2$<core::option::Option<ref$<type_names::mod1::Struct2> > >
250 // cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("rust_fn_with_return_value")
251 // cdb-check:Return Type: usize
252 // cdb-check:Parameter Types: f64
253 // cdb-command:dx Debugger.State.Scripts.@"type-names.cdb".Contents.getFunctionDetails("extern_c_fn_with_return_value")
254 // cdb-check:Return Type: type_names::Struct1
255 // cdb-check:Parameter Types:
256 
257 // CLOSURES
258 // cdb-command:dv /t closure*
259 // cdb-check:struct tuple$<type_names::main::closure_env$1,usize> closure2 = [...]
260 // cdb-check:struct tuple$<type_names::main::closure_env$0,usize> closure1 = [...]
261 
262 // FOREIGN TYPES
263 // cdb-command:dv /t foreign*
264 // cdb-check:struct type_names::mod1::extern$0::ForeignType2 * foreign2 = [...]
265 // cdb-check:struct type_names::extern$0::ForeignType1 * foreign1 = [...]
266 
267 #![allow(unused_variables)]
268 #![feature(omit_gdb_pretty_printer_section)]
269 #![omit_gdb_pretty_printer_section]
270 #![feature(extern_types)]
271 
272 use self::Enum1::{Variant1, Variant2};
273 use std::marker::PhantomData;
274 use std::ptr;
275 
276 pub struct Struct1;
277 struct GenericStruct<T1, T2>(PhantomData<(T1, T2)>);
278 
279 enum Enum1 {
280     Variant1,
281     Variant2(isize),
282 }
283 
284 extern "C" {
285     type ForeignType1;
286 }
287 
288 mod mod1 {
289     pub struct Struct2;
290 
291     pub enum Enum2 {
292         Variant1,
293         Variant2(super::Struct1),
294     }
295 
296     pub mod mod2 {
297         pub use self::Enum3::{Variant1, Variant2};
298         pub struct Struct3;
299 
300         pub enum Enum3<T> {
301             Variant1,
302             Variant2(T),
303         }
304     }
305 
306     extern "C" {
307         pub type ForeignType2;
308     }
309 }
310 
311 trait Trait1 {
dummy(&self)312     fn dummy(&self) {}
313 }
314 trait Trait2<T1, T2> {
dummy(&self, _: T1, _: T2)315     fn dummy(&self, _: T1, _: T2) {}
316 }
317 trait Trait3<T> {
318     type AssocType;
dummy(&self) -> T319     fn dummy(&self) -> T {
320         panic!()
321     }
322 }
323 trait TraitNoGenericsButWithAssocType {
324     type Output;
foo(&self) -> Self::Output325     fn foo(&self) -> Self::Output;
326 }
327 
328 impl Trait1 for isize {}
329 impl<T1, T2> Trait2<T1, T2> for isize {}
330 impl<T> Trait3<T> for isize {
331     type AssocType = isize;
332 }
333 impl TraitNoGenericsButWithAssocType for isize {
334     type Output = isize;
foo(&self) -> Self::Output335     fn foo(&self) -> Self::Output {
336         *self
337     }
338 }
339 
rust_fn(_: Option<isize>, _: Option<&mod1::Struct2>)340 fn rust_fn(_: Option<isize>, _: Option<&mod1::Struct2>) {}
extern_c_fn(_: isize)341 extern "C" fn extern_c_fn(_: isize) {}
unsafe_fn(_: Result<char, f64>)342 unsafe fn unsafe_fn(_: Result<char, f64>) {}
343 
rust_fn_with_return_value(_: f64) -> usize344 fn rust_fn_with_return_value(_: f64) -> usize {
345     4
346 }
extern_c_fn_with_return_value() -> Struct1347 extern "C" fn extern_c_fn_with_return_value() -> Struct1 {
348     Struct1
349 }
unsafe_fn_with_return_value(_: GenericStruct<u16, u8>) -> mod1::Struct2350 unsafe fn unsafe_fn_with_return_value(_: GenericStruct<u16, u8>) -> mod1::Struct2 {
351     mod1::Struct2
352 }
353 
generic_function<T>(x: T) -> T354 fn generic_function<T>(x: T) -> T {
355     x
356 }
357 
358 #[allow(improper_ctypes)]
359 extern "C" {
printf(_: *const u8, ...) -> isize360     fn printf(_: *const u8, ...) -> isize;
361 }
362 
363 // In many of the cases below, the type that is actually under test is wrapped
364 // in a tuple, e.g., Box<T>, references, raw pointers, fixed-size vectors, ...
365 // This is because GDB will not print the type name from DWARF debuginfo for
366 // some kinds of types (pointers, arrays, functions, ...)
367 // Since tuples are structs as far as GDB is concerned, their name will be
368 // printed correctly, so the tests below just construct a tuple type that will
369 // then *contain* the type name that we want to see.
main()370 fn main() {
371     // Structs
372     let simple_struct = Struct1;
373     let generic_struct1: GenericStruct<mod1::Struct2, mod1::mod2::Struct3> =
374         GenericStruct(PhantomData);
375     let generic_struct2: GenericStruct<Struct1, extern "fastcall" fn(isize) -> usize> =
376         GenericStruct(PhantomData);
377     let mod_struct = mod1::Struct2;
378 
379     // Enums
380     let simple_enum_1 = Variant1;
381     let simple_enum_2 = Variant2(0);
382     let simple_enum_3 = mod1::Enum2::Variant2(Struct1);
383 
384     let generic_enum_1: mod1::mod2::Enum3<mod1::Struct2> = mod1::mod2::Variant1;
385     let generic_enum_2 = mod1::mod2::Variant2(Struct1);
386 
387     // Tuples
388     let tuple1 = (8u32, Struct1, mod1::mod2::Variant2(mod1::Struct2));
389     let tuple2 = ((Struct1, mod1::mod2::Struct3), mod1::Enum2::Variant1, 'x');
390 
391     // Box
392     let box1 = (Box::new(1f32), 0i32);
393     let box2 = (Box::new(mod1::mod2::Variant2(1f32)), 0i32);
394 
395     // References
396     let ref1 = (&Struct1, 0i32);
397     let ref2 = (&GenericStruct::<char, Struct1>(PhantomData), 0i32);
398 
399     let mut mut_struct1 = Struct1;
400     let mut mut_generic_struct = GenericStruct::<mod1::Enum2, f64>(PhantomData);
401     let mut_ref1 = (&mut mut_struct1, 0i32);
402     let mut_ref2 = (&mut mut_generic_struct, 0i32);
403 
404     // Raw Pointers
405     let mut_ptr1: (*mut Struct1, isize) = (ptr::null_mut(), 0);
406     let mut_ptr2: (*mut isize, isize) = (ptr::null_mut(), 0);
407     let mut_ptr3: (*mut mod1::mod2::Enum3<Struct1>, isize) = (ptr::null_mut(), 0);
408 
409     let const_ptr1: (*const Struct1, isize) = (ptr::null(), 0);
410     let const_ptr2: (*const isize, isize) = (ptr::null(), 0);
411     let const_ptr3: (*const mod1::mod2::Enum3<Struct1>, isize) = (ptr::null(), 0);
412 
413     // Vectors
414     let fixed_size_vec1 = ([Struct1, Struct1, Struct1], 0i16);
415     let fixed_size_vec2 = ([0_usize, 1, 2], 0i16);
416 
417     let vec1 = vec![0_usize, 2, 3];
418     let slice1 = &*vec1;
419     let mut vec2 = vec![mod1::Enum2::Variant2(Struct1)];
420     let slice2 = &mut *vec2;
421 
422     // Trait Objects
423     let box_trait = Box::new(0_isize) as Box<dyn Trait1>;
424     let ref_trait = &0_isize as &dyn Trait1;
425     let mut mut_int1 = 0_isize;
426     let mut_ref_trait = (&mut mut_int1) as &mut dyn Trait1;
427     let no_principal_trait = Box::new(0_isize) as Box<(dyn Send + Sync)>;
428     let has_associated_type_trait = &0_isize as &(dyn Trait3<u32, AssocType = isize> + Send);
429     let has_associated_type_but_no_generics_trait =
430         &0_isize as &dyn TraitNoGenericsButWithAssocType<Output = isize>;
431 
432     let generic_box_trait = Box::new(0_isize) as Box<dyn Trait2<i32, mod1::Struct2>>;
433     let generic_ref_trait = (&0_isize) as &dyn Trait2<Struct1, Struct1>;
434 
435     let mut generic_mut_ref_trait_impl = 0_isize;
436     let generic_mut_ref_trait = (&mut generic_mut_ref_trait_impl)
437         as &mut dyn Trait2<mod1::mod2::Struct3, GenericStruct<usize, isize>>;
438 
439     // Bare Functions
440     let rust_fn = (rust_fn, 0_usize);
441     let extern_c_fn = (extern_c_fn, 0_usize);
442     let unsafe_fn = (unsafe_fn, 0_usize);
443 
444     let rust_fn_with_return_value = (rust_fn_with_return_value, 0_usize);
445     let extern_c_fn_with_return_value = (extern_c_fn_with_return_value, 0_usize);
446     let unsafe_fn_with_return_value = (unsafe_fn_with_return_value, 0_usize);
447 
448     let generic_function_int = (generic_function::<isize>, 0_usize);
449     let generic_function_struct3 = (generic_function::<mod1::mod2::Struct3>, 0_usize);
450 
451     let variadic_function = (printf, 0_usize);
452 
453     // Closures
454     // I (mw) am a bit unclear about the current state of closures, their
455     // various forms (boxed, unboxed, proc, capture-by-ref, by-val, once) and
456     // how that maps to rustc's internal representation of these forms.
457     // Once closures have reached their 1.0 form, the tests below should
458     // probably be expanded.
459     let closure1 = (|x: isize| {}, 0_usize);
460     let closure2 = (|x: i8, y: f32| (x as f32) + y, 0_usize);
461 
462     // Foreign Types
463     let foreign1 = unsafe { 0 as *const ForeignType1 };
464     let foreign2 = unsafe { 0 as *const mod1::ForeignType2 };
465 
466     zzz(); // #break
467 }
468 
469 #[inline(never)]
zzz()470 fn zzz() {
471     ()
472 }
473