Test cxx11_tensor_block_eval_2 fails on ARM64 using GCC 11

Summary

In addition to the vectorization logic tests that are known to fail on Aarch64 / ARM64, the cxx11_tensor_block_eval_2 fails.

Environment

  • Operating System : macOS
  • Architecture : Arm64
  • Eigen Version : 3.4.x git checkout
  • Compiler Version : Gcc11.2.0 (Homebrew GCC 11.2.0_3)

Steps to reproduce

  1. checkout latest git version
  2. modify file unsupported/test/cxx11_tensor_block_eval.cpp as follows add before line 8
    #include <iostream>
    #include <iomanip>
    add before line 201
    std::cout << std::setprecision(32) << block.coeff(i) << std::endl;
    std::cout << std::setprecision(32) << slice.coeff(i) << std::endl;
  3. mkdir build && cd build && CC=gcc-11 CXX=g++-11 cmake .. && make cxx11_tensor_block_eval_2 && ./unsupported/test/cxx11_tensor_block_eval_2

What is the current bug behavior?

The test fails with the following error

./unsupported/test/cxx11_tensor_block_eval_2
Initializing random number generator with seed 1640871146
Repeating each test 10 times
0.736992061138153076171875
0.73699200153350830078125

    actual   = 0.736992
    expected = 0.736992

Test (test_eval_tensor_binary_with_unary_expr_block<float, 1, RowMajor>()) failed in unsupported/test/cxx11_tensor_block_eval.cpp (204)
    test_is_equal(block.coeff(i), slice.coeff(i), true)
Stack:
  - (test_eval_tensor_binary_with_unary_expr_block<float, 1, RowMajor>())
  - cxx11_tensor_block_eval
  - Seed: 1640871146

[1]    48590 abort      ./unsupported/test/cxx11_tensor_block_eval_2

What is the expected correct behavior?

I would expect (as this test does not fail with AppleClang) that both values should be identical (and not just in the first digits). Note that the compiler does not issue any warnings (e.g., implicit conversion, ...).