about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-29 19:39:47 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2024-04-14 11:18:23 +0200
commit98dd566033a95ab641cd30e96df0fae4f4d92c50 (patch)
tree8f84f552d8001423d28760354396b2d058b1dcf2
parenta5932b15074ac6c526446eb60d13a0c20e438835 (diff)
downloadrust-98dd566033a95ab641cd30e96df0fae4f4d92c50.tar.gz
rust-98dd566033a95ab641cd30e96df0fae4f4d92c50.zip
add .rs crashes from https://github.com/rust-lang/glacier
-rw-r--r--tests/crashes/100041.rs17
-rw-r--r--tests/crashes/101962.rs11
-rw-r--r--tests/crashes/102047.rs45
-rw-r--r--tests/crashes/102252.rs14
-rw-r--r--tests/crashes/103899.rs27
-rw-r--r--tests/crashes/105238-1.rs31
-rw-r--r--tests/crashes/105238-2.rs31
-rw-r--r--tests/crashes/105488.rs39
-rw-r--r--tests/crashes/108814.rs9
-rw-r--r--tests/crashes/109681.rs9
-rw-r--r--tests/crashes/110378.rs15
-rw-r--r--tests/crashes/110630.rs28
-rw-r--r--tests/crashes/111742.rs12
-rw-r--r--tests/crashes/112201.rs19
-rw-r--r--tests/crashes/113280.rs15
-rw-r--r--tests/crashes/113379.rs7
-rw-r--r--tests/crashes/122909.rs2
-rw-r--r--tests/crashes/34127.rs6
-rw-r--r--tests/crashes/54888.rs21
-rw-r--r--tests/crashes/57276.rs11
-rw-r--r--tests/crashes/74299.rs24
-rw-r--r--tests/crashes/74451.rs42
-rw-r--r--tests/crashes/79409.rs16
-rw-r--r--tests/crashes/79590.rs19
-rw-r--r--tests/crashes/87577.rs4
-rw-r--r--tests/crashes/88296.rs27
-rw-r--r--tests/crashes/90110.rs57
-rw-r--r--tests/crashes/91985.rs42
-rw-r--r--tests/crashes/96304.rs6
-rw-r--r--tests/crashes/97501.rs22
-rw-r--r--tests/crashes/98322.rs37
31 files changed, 664 insertions, 1 deletions
diff --git a/tests/crashes/100041.rs b/tests/crashes/100041.rs
new file mode 100644
index 00000000000..4d113cbe9ed
--- /dev/null
+++ b/tests/crashes/100041.rs
@@ -0,0 +1,17 @@
+//@ known-bug: #100041
+
+pub trait WellUnformed {
+    type RequestNormalize;
+}
+
+impl<T: ?Sized> WellUnformed for T {
+    type RequestNormalize = ();
+}
+
+pub fn latent(_: &[<[[()]] as WellUnformed>::RequestNormalize; 0]) {}
+
+pub fn bang() {
+    latent(&[]);
+}
+
+fn main() {}
diff --git a/tests/crashes/101962.rs b/tests/crashes/101962.rs
new file mode 100644
index 00000000000..b6a78ce053a
--- /dev/null
+++ b/tests/crashes/101962.rs
@@ -0,0 +1,11 @@
+//@ known-bug: #101962
+
+#![feature(core_intrinsics)]
+
+pub fn wrapping<T: Copy>(a: T, b: T) {
+    let _z = core::intrinsics::wrapping_mul(a, b);
+}
+
+fn main() {
+    wrapping(1,2);
+}
diff --git a/tests/crashes/102047.rs b/tests/crashes/102047.rs
new file mode 100644
index 00000000000..61976f51273
--- /dev/null
+++ b/tests/crashes/102047.rs
@@ -0,0 +1,45 @@
+//@ known-bug: #102047
+
+struct Ty1;
+struct Ty2;
+
+pub trait Trait<T> {}
+
+pub trait WithAssoc1<'a> {
+    type Assoc;
+}
+pub trait WithAssoc2<'a> {
+    type Assoc;
+}
+
+impl<T, U> Trait<for<'a> fn(<T as WithAssoc1<'a>>::Assoc, <U as WithAssoc2<'a>>::Assoc)> for (T, U)
+where
+    T: for<'a> WithAssoc1<'a> + for<'a> WithAssoc2<'a, Assoc = i32>,
+    U: for<'a> WithAssoc2<'a>,
+{
+}
+
+impl WithAssoc1<'_> for Ty1 {
+    type Assoc = ();
+}
+impl WithAssoc2<'_> for Ty1 {
+    type Assoc = i32;
+}
+impl WithAssoc1<'_> for Ty2 {
+    type Assoc = ();
+}
+impl WithAssoc2<'_> for Ty2 {
+    type Assoc = u32;
+}
+
+fn foo<T, U, V>()
+where
+    T: for<'a> WithAssoc1<'a>,
+    U: for<'a> WithAssoc2<'a>,
+    (T, U): Trait<V>,
+{
+}
+
+fn main() {
+    foo::<Ty1, Ty2, _>();
+}
diff --git a/tests/crashes/102252.rs b/tests/crashes/102252.rs
new file mode 100644
index 00000000000..200782f95c8
--- /dev/null
+++ b/tests/crashes/102252.rs
@@ -0,0 +1,14 @@
+//@ known-bug: #102252
+
+#![feature(min_specialization, rustc_attrs)]
+
+#[rustc_specialization_trait]
+pub trait Trait {}
+
+struct Struct
+where
+    Self: Iterator<Item = <Self as Iterator>::Item>, {}
+
+impl Trait for Struct {}
+
+fn main() {}
diff --git a/tests/crashes/103899.rs b/tests/crashes/103899.rs
new file mode 100644
index 00000000000..39c2d72bd35
--- /dev/null
+++ b/tests/crashes/103899.rs
@@ -0,0 +1,27 @@
+//@ known-bug: #103899
+
+trait BaseWithAssoc {
+    type Assoc;
+}
+
+trait WrapperWithAssoc {
+    type BaseAssoc: BaseWithAssoc;
+}
+
+struct Wrapper<B> {
+    inner: B,
+}
+
+struct ProjectToBase<T: BaseWithAssoc> {
+    data_type_h: T::Assoc,
+}
+
+struct DoubleProject<L: WrapperWithAssoc> {
+    buffer: Wrapper<ProjectToBase<L::BaseAssoc>>,
+}
+
+fn trigger<L: WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L> {
+    loop {}
+}
+
+fn main() {}
diff --git a/tests/crashes/105238-1.rs b/tests/crashes/105238-1.rs
new file mode 100644
index 00000000000..dd44a0f1d77
--- /dev/null
+++ b/tests/crashes/105238-1.rs
@@ -0,0 +1,31 @@
+//@ known-bug: #105238
+
+#![allow(incomplete_features)]
+#![feature(generic_const_exprs)]
+
+trait Ret {
+    type R;
+}
+
+struct Cond<const PRED: bool, U, V>(std::marker::PhantomData<U>, std::marker::PhantomData<V>);
+
+impl<U, V> Ret for Cond<true, U, V> {
+    type R = U;
+}
+
+impl<U, V> Ret for Cond<false, U, V> {
+    type R = V;
+}
+
+struct RobinHashTable<const MAX_LENGTH: usize, CellIdx = Cond<{ MAX_LENGTH < 65535 }, u16, u32>>
+where
+    CellIdx: Ret,
+{
+    _idx: CellIdx::R,
+}
+
+fn main() {
+    use std::mem::size_of;
+    println!("{}", size_of::<RobinHashTable<1024>>());
+    println!("{}", size_of::<RobinHashTable<65536>>());
+}
diff --git a/tests/crashes/105238-2.rs b/tests/crashes/105238-2.rs
new file mode 100644
index 00000000000..368595c6a2a
--- /dev/null
+++ b/tests/crashes/105238-2.rs
@@ -0,0 +1,31 @@
+//@ known-bug: #105238
+
+#![allow(incomplete_features)]
+#![feature(generic_const_exprs)]
+
+trait Ret {
+    type R;
+}
+
+struct Cond<const PRED: bool, U, V>(std::marker::PhantomData<U>, std::marker::PhantomData<V>);
+
+impl<U, V> Ret for Cond<true, U, V> {
+    type R = U;
+}
+
+impl<U, V> Ret for Cond<false, U, V> {
+    type R = V;
+}
+
+struct RobinHashTable<
+    const MAX_LENGTH: usize,
+    CellIdx = <Cond<{ MAX_LENGTH < 65535 }, u16, u32> as Ret>::R,
+> {
+    _idx: CellIdx,
+}
+
+fn main() {
+    use std::mem::size_of;
+    println!("{}", size_of::<RobinHashTable<1024>>());
+    println!("{}", size_of::<RobinHashTable<65536>>());
+}
diff --git a/tests/crashes/105488.rs b/tests/crashes/105488.rs
new file mode 100644
index 00000000000..75fe899f173
--- /dev/null
+++ b/tests/crashes/105488.rs
@@ -0,0 +1,39 @@
+//@ known-bug: #105488
+
+pub trait MyFnOnce {
+    type Output;
+
+    fn call_my_fn_once(self) -> Self::Output;
+}
+
+pub struct WrapFnOnce<F>(F);
+
+impl<F: FnOnce() -> D, D: MyFnOnce> MyFnOnce for WrapFnOnce<F> {
+    type Output = D::Output;
+
+    fn call_my_fn_once(self) -> Self::Output {
+        D::call_my_fn_once(self.0())
+    }
+}
+
+impl<F: FnOnce() -> D, D: MyFnOnce> MyFnOnce for F {
+    type Output = D::Output;
+
+    fn call_my_fn_once(self) -> Self::Output {
+        D::call_my_fn_once(self())
+    }
+}
+
+pub fn my_fn_1() -> impl MyFnOnce {
+    my_fn_2
+}
+
+pub fn my_fn_2() -> impl MyFnOnce {
+    WrapFnOnce(my_fn_1)
+}
+
+fn main() {
+    let v = my_fn_1();
+
+    let _ = v.call_my_fn_once();
+}
diff --git a/tests/crashes/108814.rs b/tests/crashes/108814.rs
new file mode 100644
index 00000000000..c8db848f2e1
--- /dev/null
+++ b/tests/crashes/108814.rs
@@ -0,0 +1,9 @@
+//@ known-bug: #108814
+
+#![feature(non_lifetime_binders)]
+
+fn take(_: impl for<T> FnOnce(T) -> T) {}
+
+fn main() {
+    take(|x| x)
+}
diff --git a/tests/crashes/109681.rs b/tests/crashes/109681.rs
new file mode 100644
index 00000000000..73ff1007094
--- /dev/null
+++ b/tests/crashes/109681.rs
@@ -0,0 +1,9 @@
+//@ known-bug: #109681
+
+#![crate_type="lib"]
+#![feature(linkage)]
+
+#[linkage = "common"]
+pub static TEST3: bool = true;
+
+fn main() {}
diff --git a/tests/crashes/110378.rs b/tests/crashes/110378.rs
new file mode 100644
index 00000000000..93de62d4139
--- /dev/null
+++ b/tests/crashes/110378.rs
@@ -0,0 +1,15 @@
+//@ known-bug: #110378
+// ignore-tidy-linelength
+
+#![feature(generic_const_exprs)]
+
+fn foo<const L: usize>(_a: [u8; L], _b: [u8; L]) -> [u8; L + 1] {
+    [0_u8; L + 1]
+}
+
+fn main() {
+    let baz = [[0_u8; 1]; 8];
+
+    let _: [u8; 4] = foo(foo(foo(baz[0], baz[1]), foo(baz[2], baz[3])), foo(foo(baz[4], baz[5]), foo(baz[6], baz[7])));
+    //let _: [u8; 3] = foo(foo(baz[0], baz[1]), foo(baz[2], baz[3]));
+}
diff --git a/tests/crashes/110630.rs b/tests/crashes/110630.rs
new file mode 100644
index 00000000000..f17f6f0781f
--- /dev/null
+++ b/tests/crashes/110630.rs
@@ -0,0 +1,28 @@
+//@ known-bug: #110630
+
+#![feature(generic_const_exprs)]
+
+use std::ops::Mul;
+
+pub trait Indices<const N: usize> {
+    const NUM_ELEMS: usize = I::NUM_ELEMS * N;
+}
+
+pub trait Concat<J> {
+    type Output;
+}
+
+pub struct Tensor<I: Indices<N>, const N: usize>
+where
+    [u8; I::NUM_ELEMS]: Sized, {}
+
+impl<I: Indices<N>, J: Indices<N>, const N: usize> Mul<Tensor<J, N>> for Tensor<I, N>
+where
+    I: Concat<T>,
+    <I as Concat<J>>::Output: Indices<N>,
+    [u8; I::NUM_ELEMS]: Sized,
+    [u8; J::NUM_ELEMS]: Sized,
+    [u8; <I as Concat<J>>::Output::NUM_ELEMS]: Sized,
+{
+    type Output = Tensor<<I as Concat<J>>::Output, N>;
+}
diff --git a/tests/crashes/111742.rs b/tests/crashes/111742.rs
new file mode 100644
index 00000000000..fda2a96836f
--- /dev/null
+++ b/tests/crashes/111742.rs
@@ -0,0 +1,12 @@
+//@ known-bug: #111742
+// ignore-tidy-linelength
+
+#![allow(incomplete_features)]
+#![feature(generic_const_exprs)]
+
+const CONST: u32 = 0;
+struct Test<const N: u32, const M: u32 = { CONST/* Must be a const and not a Literal */ }> where [(); N as usize]: , ([u32; N as usize]);
+
+fn main() {
+    let _: Test<1>;
+}
diff --git a/tests/crashes/112201.rs b/tests/crashes/112201.rs
new file mode 100644
index 00000000000..5d363403b8a
--- /dev/null
+++ b/tests/crashes/112201.rs
@@ -0,0 +1,19 @@
+//@ known-bug: #112201
+
+pub fn compose(
+    f1: impl FnOnce(f64) -> f64 + Clone,
+    f2: impl FnOnce(f64) -> f64 + Clone,
+) -> impl FnOnce(f64) -> f64 + Clone {
+    move |x| f1(f2(x))
+}
+
+fn repeat_helper(
+    f: impl FnOnce(f64) -> f64 + Clone,
+    res: impl FnOnce(f64) -> f64 + Clone,
+    times: usize,
+) -> impl FnOnce(f64) -> f64 + Clone {
+    return res;
+    repeat_helper(f.clone(), compose(f, res), times - 1)
+}
+
+fn main() {}
diff --git a/tests/crashes/113280.rs b/tests/crashes/113280.rs
new file mode 100644
index 00000000000..6a04b50c0c8
--- /dev/null
+++ b/tests/crashes/113280.rs
@@ -0,0 +1,15 @@
+//@ known-bug: #113280
+
+#![feature(dyn_star, pointer_like_trait)]
+#![allow(incomplete_features)]
+
+use std::fmt::Debug;
+use std::marker::PointerLike;
+
+fn make_dyn_star<'a>(t: impl PointerLike + Debug + 'a) -> dyn* Debug + 'a {
+    f32::from_bits(0x1) as f64
+}
+
+fn main() {
+    println!("{:?}", make_dyn_star(Box::new(1i32)));
+}
diff --git a/tests/crashes/113379.rs b/tests/crashes/113379.rs
new file mode 100644
index 00000000000..7163cbc3934
--- /dev/null
+++ b/tests/crashes/113379.rs
@@ -0,0 +1,7 @@
+//@ known-bug: #113379
+
+async fn f999() -> Vec<usize> {
+    'b: {
+        continue 'b;
+    }
+}
diff --git a/tests/crashes/122909.rs b/tests/crashes/122909.rs
index 344fcd88010..90bba772b91 100644
--- a/tests/crashes/122909.rs
+++ b/tests/crashes/122909.rs
@@ -1,5 +1,5 @@
 //@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes
-//@ known-bug: #12345
+//@ known-bug: #122909
 
 
 use std::sync::{Arc, Context, Weak};
diff --git a/tests/crashes/34127.rs b/tests/crashes/34127.rs
new file mode 100644
index 00000000000..82504486be5
--- /dev/null
+++ b/tests/crashes/34127.rs
@@ -0,0 +1,6 @@
+//@ compile-flags: -g -Copt-level=0
+//@ known-bug: #34127
+
+pub fn main() {
+let _a = [(); 1 << 63];
+}
diff --git a/tests/crashes/54888.rs b/tests/crashes/54888.rs
new file mode 100644
index 00000000000..2c87d7ee9e4
--- /dev/null
+++ b/tests/crashes/54888.rs
@@ -0,0 +1,21 @@
+//@ known-bug: #54888
+
+#![feature(unsize, coerce_unsized)]
+
+use std::{
+    ops::CoerceUnsized,
+    marker::Unsize,
+};
+
+#[repr(C)]
+struct Ptr<T: ?Sized>(Box<T>);
+
+impl<T: ?Sized, U: ?Sized> CoerceUnsized<Ptr<U>> for Ptr<T>
+where
+    T: Unsize<U>,
+{}
+
+
+fn main() {
+    let foo = Ptr(Box::new(5)) as Ptr<dyn std::any::Any>;
+}
diff --git a/tests/crashes/57276.rs b/tests/crashes/57276.rs
new file mode 100644
index 00000000000..f70be4fba6d
--- /dev/null
+++ b/tests/crashes/57276.rs
@@ -0,0 +1,11 @@
+//@ known-bug: #57276
+
+#![feature(arbitrary_self_types, dispatch_from_dyn)]
+
+use std::ops::{Deref, DispatchFromDyn};
+
+trait Trait<T: Deref<Target = Self> + DispatchFromDyn<T>> {
+    fn foo(self: T) -> dyn Trait<T>;
+}
+
+fn main() {}
diff --git a/tests/crashes/74299.rs b/tests/crashes/74299.rs
new file mode 100644
index 00000000000..0e2ddce1c5b
--- /dev/null
+++ b/tests/crashes/74299.rs
@@ -0,0 +1,24 @@
+//@ known-bug: #74299
+#![feature(specialization)]
+
+trait X {
+    type U;
+    fn f(&self) -> Self::U {
+        loop {}
+    }
+}
+
+impl<T> X for T {
+    default type U = ();
+}
+
+trait Y {
+    fn g(&self) {}
+}
+
+impl Y for <() as X>::U {}
+impl Y for <i32 as X>::U {}
+
+fn main() {
+    ().f().g();
+}
diff --git a/tests/crashes/74451.rs b/tests/crashes/74451.rs
new file mode 100644
index 00000000000..8f936994678
--- /dev/null
+++ b/tests/crashes/74451.rs
@@ -0,0 +1,42 @@
+//@ known-bug: #74451
+//@ compile-flags: -Copt-level=0
+
+#![feature(specialization)]
+#![feature(unsize, coerce_unsized)]
+#![allow(incomplete_features)]
+#![crate_type = "lib"]
+
+use std::ops::CoerceUnsized;
+
+pub struct SmartassPtr<A: Smartass+?Sized>(A::Data);
+
+pub trait Smartass {
+    type Data;
+    type Data2: CoerceUnsized<*const [u8]>;
+}
+
+pub trait MaybeObjectSafe {}
+
+impl MaybeObjectSafe for () {}
+
+impl<T> Smartass for T {
+    type Data = <Self as Smartass>::Data2;
+    default type Data2 = *const [u8; 0];
+}
+
+impl Smartass for () {
+    type Data2 = *const [u8; 1];
+}
+
+impl Smartass for dyn MaybeObjectSafe {
+    type Data = *const [u8];
+    type Data2 = *const [u8; 0];
+}
+
+impl<U: Smartass+?Sized, T: Smartass+?Sized> CoerceUnsized<SmartassPtr<T>> for SmartassPtr<U>
+    where <U as Smartass>::Data: std::ops::CoerceUnsized<<T as Smartass>::Data>
+{}
+
+pub fn conv(s: SmartassPtr<()>) -> SmartassPtr<dyn MaybeObjectSafe> {
+    s // This shouldn't coerce
+}
diff --git a/tests/crashes/79409.rs b/tests/crashes/79409.rs
new file mode 100644
index 00000000000..98b5f606336
--- /dev/null
+++ b/tests/crashes/79409.rs
@@ -0,0 +1,16 @@
+//@ known-bug: #79409
+
+#![feature(extern_types)]
+#![feature(unsized_locals)]
+
+extern {
+    type Device;
+}
+
+unsafe fn make_device() -> Box<Device> {
+    Box::from_raw(0 as *mut _)
+}
+
+fn main() {
+    let d: Device = unsafe { *make_device() };
+}
diff --git a/tests/crashes/79590.rs b/tests/crashes/79590.rs
new file mode 100644
index 00000000000..b73864cce23
--- /dev/null
+++ b/tests/crashes/79590.rs
@@ -0,0 +1,19 @@
+//@ known-bug: #79590
+
+trait Database: Restriction<Inner = u32> {}
+
+trait Restriction {
+    type Inner;
+}
+
+struct Test {}
+
+impl Database for Test {}
+impl Restriction for Test {
+    type Inner = u32;
+}
+
+fn main() {
+    let t = Test {};
+    let x: &dyn Database<Inner = _> = &t;
+}
diff --git a/tests/crashes/87577.rs b/tests/crashes/87577.rs
new file mode 100644
index 00000000000..c632b72c147
--- /dev/null
+++ b/tests/crashes/87577.rs
@@ -0,0 +1,4 @@
+//@ known-bug: #87577
+
+#[derive(Debug)]
+struct S<#[cfg(feature = "alloc")] N: A<T>> {}
diff --git a/tests/crashes/88296.rs b/tests/crashes/88296.rs
new file mode 100644
index 00000000000..999834f5bde
--- /dev/null
+++ b/tests/crashes/88296.rs
@@ -0,0 +1,27 @@
+//@ known-bug: #88296
+
+#![feature(specialization)]
+
+trait Foo {
+    type Bar;
+}
+
+impl<T> Foo for T {
+    default type Bar = u32;
+}
+
+impl Foo for i32 {
+    type Bar = i32;
+}
+
+extern "C" {
+    #[allow(unused)]
+    // OK as Foo::Bar is explicitly defined for i32
+    static OK: <i32 as Foo>::Bar;
+
+    #[allow(unused)]
+    // ICE in the improper_ctypes lint
+    //  as Foo::Bar is only default implemented for ()
+    static ICE: <() as Foo>::Bar;
+}
+pub fn main()  {}
diff --git a/tests/crashes/90110.rs b/tests/crashes/90110.rs
new file mode 100644
index 00000000000..a27a1f42b7a
--- /dev/null
+++ b/tests/crashes/90110.rs
@@ -0,0 +1,57 @@
+//@ known-bug: #90110
+
+use std::fs::File;
+use std::io::{BufReader, BufRead};
+use std::str::Split;
+use std::path::Path;
+
+pub trait Parser<D>
+where dyn Parser<D>: Sized
+{
+    fn new(split_header: Split<&str>) -> Self where Self: Sized;
+    fn parse_line(&self, split_line: &Split<&str>) -> D;
+}
+
+
+pub struct CsvReader<D> {
+    parser: Box<dyn Parser<D>>,
+
+    reader: BufReader<File>,
+    buf: String,    // Buffer we will read into. Avoids re-allocation on each line.
+    path: String,   // Record this so we can return more informative error messages.
+    line: usize,    // Same motivation for this.
+}
+
+impl<D> CsvReader<D>
+where dyn Parser<D>: Sized
+{
+    fn new<F>(path: &str, make_parser: F) -> CsvReader<D>
+    where F: Fn(Split<char>) -> dyn Parser<D> {
+        let file = match File::open(Path::new(path)) {
+            Err(err) => panic!("Couldn't read {}: {}", path, err),
+            Ok(file) => file,
+        };
+
+        let mut reader = BufReader::new(file);
+
+        let mut buf = String::new();
+
+        let parser = Box::new(match reader.read_line(&mut buf) {
+            Err(err) => panic!("Failed to read the header line from {}: {}", path, err),
+            Ok(_) => {
+                let split_header = buf.split(',');
+                make_parser(split_header)
+            },
+        });
+
+        CsvReader {
+            parser: parser,
+            reader,
+            buf,
+            path: path.to_string(),
+            line: 2,
+        }
+    }
+}
+
+pub fn main() {}
diff --git a/tests/crashes/91985.rs b/tests/crashes/91985.rs
new file mode 100644
index 00000000000..338550430e1
--- /dev/null
+++ b/tests/crashes/91985.rs
@@ -0,0 +1,42 @@
+//@ known-bug: #91985
+
+#![feature(generic_associated_types)]
+
+pub trait Trait1 {
+    type Associated: Ord;
+}
+
+pub trait Trait2 {
+    type Associated: Clone;
+}
+
+pub trait GatTrait {
+    type Gat<T: Clone>;
+}
+
+pub struct GatStruct;
+
+impl GatTrait for GatStruct {
+    type Gat<T: Clone> = Box<T>;
+}
+
+pub struct OuterStruct<T1: Trait1, T2: Trait2> {
+    inner: InnerStruct<T2, GatStruct>,
+    t1:    T1,
+}
+
+pub struct InnerStruct<T: Trait2, G: GatTrait> {
+    pub gat: G::Gat<T::Associated>,
+}
+
+impl<T1, T2> OuterStruct<T1, T2>
+where
+    T1: Trait1,
+    T2: Trait2<Associated = T1::Associated>,
+{
+    pub fn new() -> Self {
+        todo!()
+    }
+}
+
+pub fn main() {}
diff --git a/tests/crashes/96304.rs b/tests/crashes/96304.rs
new file mode 100644
index 00000000000..637012f4585
--- /dev/null
+++ b/tests/crashes/96304.rs
@@ -0,0 +1,6 @@
+//@ known-bug: #96304
+
+#![feature(asm_sym)]
+core::arch::global_asm!("/* {} */", sym<&'static ()>::clone);
+
+pub fn main() {}
diff --git a/tests/crashes/97501.rs b/tests/crashes/97501.rs
new file mode 100644
index 00000000000..51a83d8be16
--- /dev/null
+++ b/tests/crashes/97501.rs
@@ -0,0 +1,22 @@
+//@ known-bug: #97501
+
+#![feature(core_intrinsics)]
+use std::intrinsics::wrapping_add;
+
+#[derive(Clone, Copy)]
+struct WrapInt8 {
+    value: u8
+}
+
+impl std::ops::Add for WrapInt8 {
+    type Output = WrapInt8;
+    fn add(self, other: WrapInt8) -> WrapInt8 {
+        wrapping_add(self, other)
+    }
+}
+
+fn main() {
+    let p = WrapInt8 { value: 123 };
+    let q = WrapInt8 { value: 234 };
+    println!("{}", (p + q).value);
+}
diff --git a/tests/crashes/98322.rs b/tests/crashes/98322.rs
new file mode 100644
index 00000000000..57b34916029
--- /dev/null
+++ b/tests/crashes/98322.rs
@@ -0,0 +1,37 @@
+//@ known-bug: #98322
+
+#![feature(generic_const_exprs)]
+
+// Main function seems irrelevant
+fn main() {}
+
+// Constant must be provided via an associated constant in a trait
+pub trait ConstTrait {
+    const ASSOC_CONST: usize;
+}
+
+// For some reason I find it's necessary to have an implementation of this trait that recurses
+pub trait OtherTrait
+{
+    fn comm(self);
+}
+
+// There must be a blanket impl here
+impl<T> OtherTrait for T where
+    T: ConstTrait,
+    [();T::ASSOC_CONST]: Sized,
+{
+    fn comm(self) {
+        todo!()
+    }
+}
+
+// The struct must be recursive
+pub struct RecursiveStruct(Box<RecursiveStruct>);
+
+// This implementation must exist, and it must recurse into its child
+impl OtherTrait for RecursiveStruct {
+    fn comm(self) {
+        (self.0).comm();
+    }
+}