summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-06-12 01:08:09 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-06-12 01:08:22 +0200
commit1f6b02e9f0059932da4a9c05fdfc26f473a89cde (patch)
treec63764e848ec1920000279a7210491a359fb8875
parent0af1840892fd5c8d49ff2935b7169556a5e4a4d1 (diff)
downloadmariadb-git-1f6b02e9f0059932da4a9c05fdfc26f473a89cde.tar.gz
MDEV-19709 Workaround "internal compiler bug" on GCC v 4.9
GCC crashes during compilation, on a code fragment that was added to workaround code generation bug on GCC. To fix, I randomly moved pragmas around, which seems to make GCC happy.
-rw-r--r--sql/sql_bitmap.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h
index b37905e205b..cce80ce2bc8 100644
--- a/sql/sql_bitmap.h
+++ b/sql/sql_bitmap.h
@@ -27,6 +27,10 @@
#include <my_bitmap.h>
#include <my_bit.h>
+
+template <uint width> class Bitmap
+{
+
/*
Workaround GCC optimizer bug (generating SSE instuctions on unaligned data)
*/
@@ -39,8 +43,6 @@
#pragma GCC target ("no-sse")
#endif
-template <uint width> class Bitmap
-{
uint32 buffer[(width + 31) / 32];
public:
Bitmap()
@@ -276,13 +278,15 @@ public:
}
enum { BITMAP_END = width };
};
-};
#ifdef NEED_GCC_NO_SSE_WORKAROUND
#pragma GCC pop_options
#undef NEED_GCC_NO_SSE_WORKAROUND
#endif
+};
+
+
/* An iterator to quickly walk over bits in ulonglong bitmap. */
class Table_map_iterator
{