diff options
author | Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com> | 2017-05-13 11:57:16 +0000 |
---|---|---|
committer | Pekka Jääskeläinen <visit0r@gcc.gnu.org> | 2017-05-13 11:57:16 +0000 |
commit | c7488b4ffb7b91c9fe9b2eeddda30f818351f535 (patch) | |
tree | c9f807a994e56ca7b8a0ae7b17fd54bfd6d81117 /gcc/brig | |
parent | f96bf49a02464e07526289799c14c1333a71a02b (diff) | |
download | gcc-c7488b4ffb7b91c9fe9b2eeddda30f818351f535.zip gcc-c7488b4ffb7b91c9fe9b2eeddda30f818351f535.tar.gz gcc-c7488b4ffb7b91c9fe9b2eeddda30f818351f535.tar.bz2 |
BRIG FE: Fix an assertion when doing an 'lda' of
a private array offset.
From-SVN: r248006
Diffstat (limited to 'gcc/brig')
-rw-r--r-- | gcc/brig/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/brig/brigfrontend/brig-code-entry-handler.cc | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog index 338873e..3c563b1 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,4 +1,11 @@ -2017-05-03 Pekka Jääskeläinen <visit0r@kamu> +2017-05-13 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com> + + * brigfrontend/brig-code-entry-handler.cc + (brig_code_entry_handler::build_address_operand): Fix + an assertion when doing an 'lda' of a private array + offset. + +2017-05-03 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com> * brigfrontend/brig-code-entry-handler.cc (brig_code_entry_handler::build_address_operand): Fix a bug diff --git a/gcc/brig/brigfrontend/brig-code-entry-handler.cc b/gcc/brig/brigfrontend/brig-code-entry-handler.cc index 3abd80e..906f47e 100644 --- a/gcc/brig/brigfrontend/brig-code-entry-handler.cc +++ b/gcc/brig/brigfrontend/brig-code-entry-handler.cc @@ -486,8 +486,10 @@ brig_code_entry_handler::build_address_operand addr = const_offset_2; else addr = build2 (POINTER_PLUS_EXPR, ptr_type_node, - addr, convert (size_type_node, const_offset_2)); - + /* Addr can be a constant offset in case this is + a private array access. */ + convert (ptr_type_node, addr), + convert (size_type_node, const_offset_2)); } gcc_assert (addr != NULL_TREE); |