mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// compile-flags: -O
 | 
						|
#![crate_type = "lib"]
 | 
						|
 | 
						|
// Test that LLVM can eliminate the impossible `i == 0` check.
 | 
						|
 | 
						|
// CHECK-LABEL: @issue_75546
 | 
						|
#[no_mangle]
 | 
						|
pub fn issue_75546() {
 | 
						|
    let mut i = 1u32;
 | 
						|
    while i < u32::MAX {
 | 
						|
        // CHECK-NOT: panic
 | 
						|
        if i == 0 { panic!(); }
 | 
						|
        i += 1;
 | 
						|
    }
 | 
						|
}
 |