mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 10:00:35 +08:00
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:
committed by
Julian Oes
parent
7929287f73
commit
fc860140f1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user