Files
rust/tests/ui/autodiff/flag_nott.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
397 B
Rust
Raw Normal View History

//@ compile-flags: -Zautodiff=Enable,NoTT
//@ needs-enzyme
//@ check-pass
#![feature(autodiff)]
use std::autodiff::autodiff_reverse;
// Test that NoTT flag is accepted and doesn't cause compilation errors
#[autodiff_reverse(d_square, Duplicated, Active)]
fn square(x: &f64) -> f64 {
x * x
}
fn main() {
let x = 2.0;
let mut dx = 0.0;
let result = d_square(&x, &mut dx, 1.0);
2025-08-23 23:10:48 +00:00
}