XLA unit tests fail to build on gcc
See https://ci.linaro.org/view/All/job/ldcg-python-manylinux-tensorflow-nightly/831/consoleText @nSircombe @cfRod  Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61068">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61068">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

git HEAD

### Custom Code

No

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

n/a

### Python version

3.8.13

### Bazel version

6.1.0

### GCC/Compiler version

10.2.1

### CUDA/cuDNN version

n/a

### GPU model and memory

n/a

### Current Behaviour?

3 unit tests fail to build and one fails with error.

### Standalone code to reproduce the issue

```shell
'bazel test --config==mkl_aarch64_threadpool'
```


### Relevant log output

```shell
ERROR: /tf/tensorflow/tensorflow/compiler/xla/service/BUILD:5779:12: Compiling tensorflow/compiler/xla/service/hlo_parser_test.cc failed: (Exit 1): gcc failed: error executing command (from target //tensorflow/compiler/xla/service:hlo_parser_test)
      (cd /home/buildslave/.cache/bazel/_bazel_buildslave/fbac33eb30dbfb6b11b15a7ff5ac830d/execroot/org_tensorflow && \
      exec env - \
        CACHEBUSTER=20220325 \
        PATH=/home/buildslave/.cache/bazelisk/downloads/bazelbuild/bazel-6.1.0-linux-arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
        PWD=/proc/self/cwd \
        PYTHON_BIN_PATH=/usr/local/bin/python3 \
        TF2_BEHAVIOR=1 \
      /dt10/usr/bin/gcc -MD -MF bazel-out/aarch64-opt/bin/tensorflow/compiler/xla/service/_objs/hlo_parser_test/hlo_parser_test.d '-frandom-seed=bazel-out/aarch64-opt/bin/tensorflow/compiler/xla/service/_objs/hlo_parser_test/hlo_parser_test.o' -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' -DHAVE_SYS_UIO_H -DTF_USE_SNAPPY -DBENCHMARK_STATIC_DEFINE '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/aarch64-opt/bin -iquote external/eigen_archive -iquote bazel-out/aarch64-opt/bin/external/eigen_archive -iquote external/com_google_absl -iquote bazel-out/aarch64-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/aarch64-opt/bin/external/nsync -iquote external/double_conversion -iquote bazel-out/aarch64-opt/bin/external/double_conversion -iquote external/com_google_protobuf -iquote bazel-out/aarch64-opt/bin/external/com_google_protobuf -iquote external/snappy -iquote bazel-out/aarch64-opt/bin/external/snappy -iquote external/com_googlesource_code_re2 -iquote bazel-out/aarch64-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/aarch64-opt/bin/external/farmhash_archive -iquote external/com_google_googletest -iquote bazel-out/aarch64-opt/bin/external/com_google_googletest -iquote external/com_google_benchmark -iquote bazel-out/aarch64-opt/bin/external/com_google_benchmark -iquote external/zlib -iquote bazel-out/aarch64-opt/bin/external/zlib -iquote external/bazel_tools -iquote bazel-out/aarch64-opt/bin/external/bazel_tools -Ibazel-out/aarch64-opt/bin/external/com_google_benchmark/_virtual_includes/benchmark -isystem external/eigen_archive -isystem bazel-out/aarch64-opt/bin/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/aarch64-opt/bin/external/nsync/public -isystem external/com_google_protobuf/src -isystem bazel-out/aarch64-opt/bin/external/com_google_protobuf/src -isystem external/farmhash_archive/src -isystem bazel-out/aarch64-opt/bin/external/farmhash_archive/src -isystem external/com_google_googletest/googlemock -isystem bazel-out/aarch64-opt/bin/external/com_google_googletest/googlemock -isystem external/com_google_googletest/googlemock/include -isystem bazel-out/aarch64-opt/bin/external/com_google_googletest/googlemock/include -isystem external/com_google_googletest/googletest -isystem bazel-out/aarch64-opt/bin/external/com_google_googletest/googletest -isystem external/com_google_googletest/googletest/include -isystem bazel-out/aarch64-opt/bin/external/com_google_googletest/googletest/include -isystem external/zlib -isystem bazel-out/aarch64-opt/bin/external/zlib -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fPIE -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -fno-omit-frame-pointer -no-canonical-prefixes -fno-canonical-system-headers -DNDEBUG -g0 -O2 -ffunction-sections -fdata-sections -Wno-all -Wno-extra -Wno-deprecated -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-array-bounds -Wunused-result '-Werror=unused-result' -Wswitch '-Werror=switch' '-Wno-error=unused-but-set-variable' -DAUTOLOAD_DYNAMIC_KERNELS '-mtune=generic' '-march=armv8-a' -O3 '-std=c++17' '--sysroot=/dt10' -c tensorflow/compiler/xla/service/hlo_parser_test.cc -o bazel-out/aarch64-opt/bin/tensorflow/compiler/xla/service/_objs/hlo_parser_test/hlo_parser_test.o)
    # Configuration: de691fac16e6bac2c61ad8c09da26892c92f72e8ffaa16698c2dd3959f4ebc3a
    # Execution platform: @local_execution_config_platform//:platform
    tensorflow/compiler/xla/service/hlo_parser_test.cc: In member function 'virtual void xla::{anonymous}::HloParserTest_ParseTrivialIotaShardingPartialReplication_Test::TestBody()':
    tensorflow/compiler/xla/service/hlo_parser_test.cc:3488:51: error: call of overloaded 'TileAssignment(<brace-enclosed initializer list>)' is ambiguous
     3488 |   TileAssignment tiling_last_dim_replicated({2, 2});
          |                                                   ^
    In file included from ./tensorflow/compiler/xla/hlo/ir/hlo_sharding.h:34,
                     from ./tensorflow/compiler/xla/hlo/ir/hlo_instruction.h:48,
                     from ./tensorflow/compiler/xla/hlo/ir/hlo_computation.h:35,
                     from ./tensorflow/compiler/xla/service/hlo_parser.h:23,
                     from tensorflow/compiler/xla/service/hlo_parser_test.cc:16:
    ./tensorflow/compiler/xla/hlo/ir/tile_assignment.h:173:12: note: candidate: 'xla::TileAssignment::TileAssignment(absl::lts_20230125::Span<const long int>)'
      173 |   explicit TileAssignment(absl::Span<const int64_t> dims)
          |            ^~~~~~~~~~~~~~
    ./tensorflow/compiler/xla/hlo/ir/tile_assignment.h:172:12: note: candidate: 'xla::TileAssignment::TileAssignment(xla::IotaTileAssignment)'
      172 |   explicit TileAssignment(IotaTileAssignment iota) : iota_(std::move(iota)) {}

And more
```
</details>