Skip to content

Commit 1f6b02e

Browse files
committed
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.
1 parent 0af1840 commit 1f6b02e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sql/sql_bitmap.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
#include <my_bitmap.h>
2828
#include <my_bit.h>
2929

30+
31+
template <uint width> class Bitmap
32+
{
33+
3034
/*
3135
Workaround GCC optimizer bug (generating SSE instuctions on unaligned data)
3236
*/
@@ -39,8 +43,6 @@
3943
#pragma GCC target ("no-sse")
4044
#endif
4145

42-
template <uint width> class Bitmap
43-
{
4446
uint32 buffer[(width + 31) / 32];
4547
public:
4648
Bitmap()
@@ -276,13 +278,15 @@ template <uint width> class Bitmap
276278
}
277279
enum { BITMAP_END = width };
278280
};
279-
};
280281

281282
#ifdef NEED_GCC_NO_SSE_WORKAROUND
282283
#pragma GCC pop_options
283284
#undef NEED_GCC_NO_SSE_WORKAROUND
284285
#endif
285286

287+
};
288+
289+
286290
/* An iterator to quickly walk over bits in ulonglong bitmap. */
287291
class Table_map_iterator
288292
{

0 commit comments

Comments
 (0)