From af9d84634709fa53c1f1f759de6a156d7391dd2f Mon Sep 17 00:00:00 2001 From: NUCLEAR-BOMB <61628949+NUCLEAR-BOMB@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:16:46 +0500 Subject: [PATCH] Update expected codegen for gcc 10 [@optional_int_return_default_ctor] (codegen) --- test/codegen/sample.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/codegen/sample.cpp b/test/codegen/sample.cpp index f2ebcb3..ba98f51 100644 --- a/test/codegen/sample.cpp +++ b/test/codegen/sample.cpp @@ -424,11 +424,19 @@ opt::option option_int_return_none() { //$ mov rax, qword ptr [rsp - 0x8] //$ ret -//$ @optional_int_return_default_ctor {gcc <11}: +//$ @optional_int_return_default_ctor {gcc 10..<11}: //$ mov dword ptr [rsp - 0xc], 0x0 //$ mov rax, qword ptr [rsp - 0x10] //$ ret +//$ @optional_int_return_default_ctor {gcc <9}: +//$ xor eax, eax +//$ mov byte ptr [rsp - 0x9], 0x0 +//$ mov word ptr [rsp - 0xb], ax +//$ mov byte ptr [rsp - 0xc], 0x0 +//$ mov rax, qword ptr [rsp - 0x10] +//$ ret + //$ @optional_int_return_default_ctor {msvc}: //$ mov byte ptr [rcx + 0x4], 0x0 //$ mov rax, rcx