<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63843>63843</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Error when compiling with GCC 7
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Diana-Dubov
      </td>
    </tr>
</table>

<pre>
    According to llvm documentation it shall [support GCC 7] (https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library).
[This commit: [ADT] Add deduction guide for iterator_range](https://reviews.llvm.org/D152891) breaks it.
Getting this error when compiling with GCC7.4:
**external/llvm-project/llvm/include/llvm/ADT/iterator_range.h:33:26: error: no matching function for call to 'mlir::ValueTypeIterator<llvm::detail::indexed_accessor_range_base<mlir::ResultRange, mlir::detail::OpResultImpl*, mlir::OpResult, mlir::OpResult, mlir::OpResult>::iterator>::ValueTypeIterator(llvm::detail::indexed_accessor_range_base<mlir::TypeRange, llvm::PointerUnion<const mlir::Value*, const mlir::Type*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Type, mlir::Type, mlir::Type>::iterator)'
     std::void_t<decltype(static_cast<To>(
 ^~~~~~~~~~~~~~~~
 std::declval<std::add_rvalue_reference_t<From>>()))>> : std::true_type {
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from external/llvm-project/mlir/include/mlir/Support/TypeID.h:20:0,
 from external/llvm-project/mlir/include/mlir/IR/MLIRContext.h:13,
 from external/llvm-project/mlir/include/mlir/IR/DialectRegistry.h:16,
 from external/llvm-project/mlir/include/mlir/IR/Dialect.h:16,
 from external/llvm-project/mlir/include/mlir/IR/OpDefinition.h:22,
 from external/llvm-project/mlir/include/mlir/IR/Builders.h:12,
 from external/llvm-project/mlir/include/mlir/IR/PatternMatch.h:12,
 from external/llvm-project/mlir/lib/IR/PatternMatch.cpp:9:
external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:399:3: note: candidate: llvm::mapped_iterator_base<DerivedT, ItTy, ReferenceTy>::mapped_iterator_base(ItTy) [with DerivedT = mlir::ValueTypeIterator<llvm::detail::indexed_accessor_range_base<mlir::ResultRange, mlir::detail::OpResultImpl*, mlir::OpResult, mlir::OpResult, mlir::OpResult>::iterator>; ItTy = llvm::detail::indexed_accessor_range_base<mlir::ResultRange, mlir::detail::OpResultImpl*, mlir::OpResult, mlir::OpResult, mlir::OpResult>::iterator; ReferenceTy = mlir::Type]
 mapped_iterator_base(ItTy U)**

It is fixed in GCC8 and later, but the issue at GCC7 exists and breaks the promise to support this version.

Thank you
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcV0-P2roX_TRmY4HAJpAsWDBkqEZq1WpKf1vk2BfiXx07sm-YYdPP_mQnAzPTP3rtm1UjJMDXPj7nJL73RoSgjxZgRbIbkpUj0WHt_KrUwopx2VXuNKqcOq_WUjqvtD1SdNSYU0OVk10DFgVqZ6lGGmphDCXZTeja1nmk7zYbuiRZSQnLa8Q2EL4mbEvYNgJMnD8StlVOBsK27wBR2-NnFB5BTWpsDGG8dgHHcozOGVkLbceVw3osXdNqA34srBoHFFYJr8ZGV174M2HFhExLMl2T7GZX60ClaxqNhK8jt3W5i4zWSlEFqpOJ_LHTCujBeaoRvEDn917YI5Cs_I66h5OGhzB5JqGcZSwvZoQVtPIgvgaqceAwyKIYiYD3ztOHGiztJcTIg8Y6OrWczOMePXMWP_CI4K0wg1_j1rv_g8ThL2FbbaXpFFwHoji2falhUhO-5pzwNVtEDxKJ-MM62giUdSRx6GzvRPRAxtuIjhK2bIyOcwlf_0-YDnbnFu4GdMI3adcUVYBCm_63tgoeQe2FlBDCE419JQIQvrki3kPoDN4nn9mGXgPPwT62_bS7pjXJlecTn4K_NcpvB5oXHbc_U8jy_6Ywgl30XaE-OW0R_BernSV8I50NSF85P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