Skip to content

Error when compiling with GCC 7 #63843

Closed
Closed
@Diana-Dubov

Description

@Diana-Dubov

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 breaks it.
Getting this error when compiling with GCC7.4:

     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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions