about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/tests/run/array.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-10 13:25:26 +0000
committerbors <bors@rust-lang.org>2024-07-10 13:25:26 +0000
commitb215beb567857000fdaa868cbb78702bc5ee0ee9 (patch)
tree28464130bb207069bbf89b4fccedf9f16e1a670d /compiler/rustc_codegen_gcc/tests/run/array.rs
parentd81987661a06ae8d49a5f014f81824c655e87768 (diff)
parent8bf65c69f7d84a3be4c8278b611dbc1e5a3e2acd (diff)
downloadrust-b215beb567857000fdaa868cbb78702bc5ee0ee9.tar.gz
rust-b215beb567857000fdaa868cbb78702bc5ee0ee9.zip
Auto merge of #127566 - GuillaumeGomez:sync-cg_gcc, r=GuillaumeGomez
Sync rustc_codegen_gcc

Follow-up of https://github.com/rust-lang/rustc_codegen_gcc/pull/535.

cc `@antoyo`
Diffstat (limited to 'compiler/rustc_codegen_gcc/tests/run/array.rs')
-rw-r--r--compiler/rustc_codegen_gcc/tests/run/array.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_gcc/tests/run/array.rs b/compiler/rustc_codegen_gcc/tests/run/array.rs
index afd0eed8200..3fe8917c9a3 100644
--- a/compiler/rustc_codegen_gcc/tests/run/array.rs
+++ b/compiler/rustc_codegen_gcc/tests/run/array.rs
@@ -205,6 +205,17 @@ impl Sub for i16 {
     }
 }
 
+#[track_caller]
+#[lang = "panic_const_add_overflow"]
+pub fn panic_const_add_overflow() -> ! {
+    panic("attempt to add with overflow");
+}
+
+#[track_caller]
+#[lang = "panic_const_sub_overflow"]
+pub fn panic_const_sub_overflow() -> ! {
+    panic("attempt to subtract with overflow");
+}
 
 /*
  * Code