Browse Source

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.
sbg
Julien Lecoeur 8 years ago committed by Julian Oes
parent
commit
fc860140f1
  1. 4
      src/systemcmds/tests/test_matrix.cpp

4
src/systemcmds/tests/test_matrix.cpp

@ -624,7 +624,9 @@ bool MatrixTest::vector2Tests() @@ -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);

Loading…
Cancel
Save