From 9c53f040cb3c3bc0b86f702af5bd73d904d6cf0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Henry=20Linjam=C3=A4ki?= Date: Tue, 3 Oct 2017 15:16:34 +0000 Subject: [PATCH] [BRIGFE] Fix (more) crash with calls with more than 4 args. It missed a reference which is required because vector expansion can move the object to another location. From-SVN: r253382 --- gcc/brig/ChangeLog | 6 ++++++ gcc/brig/brigfrontend/brig-branch-inst-handler.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog index c66b16fba98..bdb70188240 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,3 +1,9 @@ +2017-10-03 Henry Linjamäki + + * brigfrontend/brig-branch-inst-handler.cc: Fix (more) crash with + calls with more than 4 args. It missed a reference which is required + because vector expansion can move the object to another location. + 2017-09-29 Henry Linjamäki * brigfrontend/brig-branch-inst-handler.cc: Fix crash with diff --git a/gcc/brig/brigfrontend/brig-branch-inst-handler.cc b/gcc/brig/brigfrontend/brig-branch-inst-handler.cc index a32dd996044..30aec373732 100644 --- a/gcc/brig/brigfrontend/brig-branch-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-branch-inst-handler.cc @@ -70,7 +70,7 @@ brig_branch_inst_handler::operator () (const BrigBase *base) const BrigOperandOffset32_t *operand_ptr = (const BrigOperandOffset32_t *) data->bytes; - vec *args = i == 0 ? out_args : in_args; + vec *&args = i == 0 ? out_args : in_args; while (bytes > 0) { -- 2.30.2