Index: test/cctest/test-ostreams.cc |
diff --git a/test/cctest/test-ostreams.cc b/test/cctest/test-ostreams.cc |
index c83f96d4665eb67e1fbdc8bb9c201d3283b86ed1..eab062e818ce01534d334796cb65d2ffcc585d31 100644 |
--- a/test/cctest/test-ostreams.cc |
+++ b/test/cctest/test-ostreams.cc |
@@ -103,6 +103,10 @@ TEST(NumericFormatting) { |
} |
+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ <= 4) |
+// Work around bad optimization by GCC 4.4.6 on PPC Linux |
+#pragma GCC optimize "O0" |
+#endif |
TEST(CharacterOutput) { |
check<char>("a a", 'a'); |
check<signed char>("B B", 'B'); |
@@ -113,6 +117,9 @@ TEST(CharacterOutput) { |
os.put('H').write("ello", 4); |
CHECK_EQ("Hello", os.c_str()); |
} |
+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ <= 4) |
+#pragma GCC reset_options |
+#endif |
TEST(Manipulators) { |