From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs (limited to 'src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs') diff --git a/src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs b/src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs new file mode 100644 index 000000000..2f2d9d010 --- /dev/null +++ b/src/test/mir-opt/dataflow-const-prop/inherit_overflow.rs @@ -0,0 +1,8 @@ +// compile-flags: -Zunsound-mir-opts + +// EMIT_MIR inherit_overflow.main.DataflowConstProp.diff +fn main() { + // After inlining, this will contain a `CheckedBinaryOp`. The overflow + // must be ignored by the constant propagation to avoid triggering a panic. + let _ = ::add(255, 1); +} -- cgit v1.2.3