Fix MSAN errors
[alexxy/gromacs.git] / src / testutils / testinit.cpp
index cf3a108ae8caa7a3263efeb3b94f982fe0997821..ed71926fff1957d7b2f19064b02aecc6dddb22f9 100644 (file)
@@ -161,7 +161,9 @@ std::unique_ptr<TestProgramContext> g_testContext;
 void initTestUtils(const char *dataPath, const char *tempPath, bool usesMpi,
                    bool usesHardwareDetection, int *argc, char ***argv)
 {
-#ifndef NDEBUG
+#if !defined NDEBUG &&                                                  \
+    !((defined __clang__ || (defined(__GNUC__) && !defined(__ICC) && __GNUC__ == 7)) \
+    && defined __OPTIMIZE__)
     gmx_feenableexcept();
 #endif
     const CommandLineProgramContext &context = initForCommandLine(argc, argv);