(root)/
gcc-13.2.0/
gcc/
testsuite/
rust/
execute/
torture/
operator_overload_5.rs
/* { dg-output "not\r*\n" } */
extern "C" {
    fn printf(s: *const i8, ...);
}

#[lang = "not"]
pub trait Not {
    type Output;

    fn not(self) -> Self::Output;
}

impl Not for i32 {
    type Output = i32;

    fn not(self) -> i32 {
        unsafe {
            let a = "not\n\0";
            let b = a as *const str;
            let c = b as *const i8;

            printf(c);
        }
        !self
    }
}

fn main() -> i32 {
    let a: i32 = 1;
    let _b = !a;

    0
}