@@ -40,45 +40,47 @@ static mut foo: *mut ::core::ffi::c_char =
4040 b " mystring\0 " as *const u8 as *const ::core ::ffi ::c_char as *mut ::core ::ffi ::c_char ;
4141#[no_mangle ]
4242pub unsafe extern " C" fn entry () {
43- let mut arr : [[::core ::ffi ::c_int ; 1 ]; 1 ] = [[1 as ::core ::ffi ::c_int ]];
44- arr [0 as ::core ::ffi ::c_int as usize ][0 as ::core ::ffi ::c_int as usize ] +=
43+ let mut int_2d : [[::core ::ffi ::c_int ; 1 ]; 1 ] = [[1 as ::core ::ffi ::c_int ]];
44+ int_2d [0 as ::core ::ffi ::c_int as usize ][0 as ::core ::ffi ::c_int as usize ] +=
4545 9 as ::core ::ffi ::c_int ;
46- let mut arr2: [::core ::ffi ::c_int ; 16 ] = [0 ; 16 ];
47- arr2 [15 as ::core ::ffi ::c_int as usize ] += 9 as ::core ::ffi ::c_int ;
48- let mut arr3: [C2RustUnnamed_0 ; 1 ] = [C2RustUnnamed_0 {
46+ let mut int_empty_init: [::core ::ffi ::c_int ; 16 ] = [0 ; 16 ];
47+ int_empty_init [15 as ::core ::ffi ::c_int as usize ] += 9 as ::core ::ffi ::c_int ;
48+ let mut int_too_long: [::core ::ffi ::c_int ; 2 ] =
49+ [1 as ::core ::ffi ::c_int , 2 as ::core ::ffi ::c_int ];
50+ let mut int_zero: [::core ::ffi ::c_int ; 0 ] = [0 ; 0 ];
51+ let mut int_too_short: [::core ::ffi ::c_int ; 16 ] = [0 as ::core ::ffi ::c_int ; 16 ];
52+ int_too_short [15 as ::core ::ffi ::c_int as usize ] += 9 as ::core ::ffi ::c_int ;
53+ let mut struct_init_too_short: [C2RustUnnamed_0 ; 1 ] = [C2RustUnnamed_0 {
4954 x: 0 as *mut ::core ::ffi ::c_char ,
5055 y: 0 ,
5156 }; 1 ];
52- arr3 [0 as ::core ::ffi ::c_int as usize ].y += 9 as ::core ::ffi ::c_int ;
53- let mut arr4: [::core ::ffi ::c_int ; 16 ] = [0 as ::core ::ffi ::c_int ; 16 ];
54- arr4 [15 as ::core ::ffi ::c_int as usize ] += 9 as ::core ::ffi ::c_int ;
55- let mut arr5: [C2RustUnnamed ; 1 ] = [{
57+ struct_init_too_short [0 as ::core ::ffi ::c_int as usize ].y += 9 as ::core ::ffi ::c_int ;
58+ let mut struct_init_too_long: [C2RustUnnamed ; 1 ] = [{
5659 let mut init = C2RustUnnamed {
5760 y: 1 as ::core ::ffi ::c_int ,
5861 };
5962 init
6063 }];
61- arr5 [0 as ::core ::ffi ::c_int as usize ].y += 9 as ::core ::ffi ::c_int ;
62- let mut arr6: [::core ::ffi ::c_int ; 2 ] = [1 as ::core ::ffi ::c_int , 2 as ::core ::ffi ::c_int ];
63- let mut arr7: [::core ::ffi ::c_int ; 0 ] = [0 ; 0 ];
64- let mut abc: [::core ::ffi ::c_char ; 4 ] =
64+ struct_init_too_long [0 as ::core ::ffi ::c_int as usize ].y += 9 as ::core ::ffi ::c_int ;
65+ let mut char_with_string: [::core ::ffi ::c_char ; 4 ] =
6566 ::core ::mem ::transmute ::< [u8 ; 4 ], [::core ::ffi ::c_char ; 4 ]> (* b " abc\0 " );
66- let mut def : [::core ::ffi ::c_char ; 3 ] = [
67+ let mut char_with_chars : [::core ::ffi ::c_char ; 3 ] = [
6768 ' d' as i32 as ::core ::ffi ::c_char ,
6869 ' e' as i32 as ::core ::ffi ::c_char ,
6970 ' f' as i32 as ::core ::ffi ::c_char ,
7071 ];
71- let mut part: [::core ::ffi ::c_char ; 2 ] = [1 as ::core ::ffi ::c_int as ::core ::ffi ::c_char , 0 ];
72- let mut abcptr: *mut ::core ::ffi ::c_char =
73- b " abc\0 " as *const u8 as *const ::core ::ffi ::c_char as *mut ::core ::ffi ::c_char ;
74- let mut init: [::core ::ffi ::c_char ; 5 ] =
72+ let mut char_with_ints: [::core ::ffi ::c_char ; 2 ] =
73+ [1 as ::core ::ffi ::c_int as ::core ::ffi ::c_char , 0 ];
74+ let mut char_with_init: [::core ::ffi ::c_char ; 5 ] =
7575 ::core ::mem ::transmute ::< [u8 ; 5 ], [::core ::ffi ::c_char ; 5 ]> (* b " abcd\0 " );
76- let mut too_long : [::core ::ffi ::c_char ; 3 ] =
76+ let mut char_too_long : [::core ::ffi ::c_char ; 3 ] =
7777 ::core ::mem ::transmute ::< [u8 ; 3 ], [::core ::ffi ::c_char ; 3 ]> (* b " abc" );
78- let mut too_short: [::core ::ffi ::c_char ; 20 ] = ::core ::mem ::transmute ::<
79- [u8 ; 20 ],
80- [::core ::ffi ::c_char ; 20 ],
81- > (* b " abc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 " );
78+ let mut char_too_short: [::core ::ffi ::c_char ; 20 ] =
79+ ::core ::mem ::transmute ::< [u8 ; 20 ], [::core ::ffi ::c_char ; 20 ]> (
80+ * b " abc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 " ,
81+ );
82+ let mut char_ptr: *mut ::core ::ffi ::c_char =
83+ b " abc\0 " as *const u8 as *const ::core ::ffi ::c_char as *mut ::core ::ffi ::c_char ;
8284 let mut past_end: *mut ::core ::ffi ::c_char = & mut * simple
8385 .as_mut_ptr ()
8486 .offset (::core ::mem ::size_of ::< [::core ::ffi ::c_char ; 9 ]> () as isize )
0 commit comments