Fix internal compiler error with GCC 7

Here is the error message:
PX4/Firmware/src/systemcmds/tests/test_matrix.cpp:641:1: internal compiler error: in trunc_int_for_mode, at explow.c:55
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
This commit is contained in:
Julien Lecoeur
2017-06-01 10:59:33 +02:00
committed by Julian Oes
parent 7929287f73
commit fc860140f1
+3 -1
View File
@@ -624,7 +624,9 @@ bool MatrixTest::vector2Tests()
ut_test(fabs(c(0) - 0) < 1e-5);
ut_test(fabs(c(1) - 0) < 1e-5);
Matrix<float, 2, 1> d(a);
static Matrix<float, 2, 1> d(a);
// the static keywork is a workaround for an internal bug of GCC
// "internal compiler error: in trunc_int_for_mode, at explow.c:55"
ut_test(fabs(d(0, 0) - 1) < 1e-5);
ut_test(fabs(d(1, 0) - 0) < 1e-5);