Skip to content

Commit 3c2f626

Browse files
committed
Fix error in libgccjit12 while creating an array type
1 parent 0cbf2b9 commit 3c2f626

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/type_.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ impl<'gcc, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
212212
}
213213
}*/
214214

215+
// NOTE: see note above. Some other test uses usize::MAX.
216+
#[cfg(not(feature="master"))]
217+
if len == u64::MAX {
218+
len = 0;
219+
}
220+
215221
self.context.new_array_type(None, ty, len)
216222
}
217223
}

0 commit comments

Comments
 (0)