Skip to content

Commit

Permalink
MDEV-26467: GCC 4.8.5 internal compiler error on ARMv8
Browse files Browse the repository at this point in the history
We will disable some optimizations, because the function
row_ins_clust_index_entry_low() would fail to compile
ever since commit a73eedb
changed the definition of srw_mutex::wr_unlock() to use
fetch_sub() instead of fetch_and().

For some reason, applying this work-around does not fix the
"could not split insn" error for that commit,
while it does work for
commit 277ba13.
  • Loading branch information
dr-m committed Sep 6, 2021
1 parent 277ba13 commit 2e39987
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions storage/innobase/row/row0ins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,13 @@ extern "C" int thd_is_slave(const MYSQL_THD thd);
# define thd_is_slave(thd) 0
#endif

#if defined __aarch64__&&defined __GNUC__&&__GNUC__==4&&!defined __clang__
/* Avoid GCC 4.8.5 internal compiler error due to srw_mutex::wr_unlock().
We would only need this for row_ins_clust_index_entry_low(),
but GCC 4.8.5 does not support pop_options. */
# pragma GCC optimize ("no-expensive-optimizations")
#endif

/***************************************************************//**
Tries to insert an entry into a clustered index, ignoring foreign key
constraints. If a record with the same unique key is found, the other
Expand Down

0 comments on commit 2e39987

Please sign in to comment.