Skip to content

Error when compiling with GCC 8.3.0 #82226

Open
@loongknown

Description

@loongknown

llvm-project/llvm/include/llvm/ADT/iterator_range.h:33:26: error: no matching function for call to ‘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::iterator(llvm::detail::indexed_accessor_range_base<mlir::ValueRange, llvm::PointerUnion<const mlir::Value*, mlir::OpOperand*, mlir::detail::OpResultImpl*>, mlir::Value, mlir::Value, mlir::Value>::iterator)’
std::void_t<decltype(static_cast(
^~~~~~~~~~~~~~~~
std::declval<std::add_rvalue_reference_t>()))>> : std::true_type {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

my gcc version is 8.3.0. my cmake version is 3.25.3. Related building command is as follows:
cmake -G "Unix Makefiles" ../llvm
-DLLVM_ENABLE_PROJECTS="mlir"
-DCMAKE_BUILD_TYPE=Release
-DLLVM_TARGETS_TO_BUILD="X86"

make -j 32
cmake.log
make.log

Activity

loongknown

loongknown commented on Feb 19, 2024

@loongknown
Author

Note that the aforementioned issue was resolved when GCC was upgraded to 8.4.0.

loongknown

loongknown commented on Feb 23, 2024

@loongknown
Author

#82643

Have you tested on GCC 8.3.0? Even after applying this patch, I'm still getting compilation errors. The error message is as follows:

/home/dongshuai/test/llvm-project/mlir/lib/Transforms/Utils/CFGToSCF.cpp: In function ‘mlir::FailureOr<llvm::SmallVectormlir::Block* > transformToStructuredCFBranches(mlir::Block*, mlir::function_ref<mlir::Value(unsigned int)>, mlir::function_refmlir::Value(mlir::Type), mlir::CFGToSCFInterface&, mlir::DominanceInfo&)’:
/home/dongshuai/test/llvm-project/mlir/lib/Transforms/Utils/CFGToSCF.cpp:1187:61: error: call of overloaded ‘OperandRange(mlir::MutableOperandRange)’ is ambiguous
getMutableSuccessorOperands(user->getBlock(), 0)));
^
In file included from /home/dongshuai/test/llvm-project/mlir/include/mlir/Support/TypeID.h:20,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/MLIRContext.h:13,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/DialectRegistry.h:16,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/Dialect.h:16,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/OpDefinition.h:22,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/Builders.h:12,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/Transforms/CFGToSCF.h:18,
from /home/dongshuai/test/llvm-project/mlir/lib/Transforms/Utils/CFGToSCF.cpp:116:
/home/dongshuai/test/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1273:3: note: candidate: ‘llvm::detail::indexed_accessor_range_base<DerivedT, BaseT, T, PointerT, ReferenceT>::indexed_accessor_range_base(const llvm::iterator_range<llvm::detail::indexed_accessor_range_base<DerivedT, BaseT, T, PointerT, ReferenceT>::iterator>&) [with DerivedT = mlir::OperandRange; BaseT = mlir::OpOperand*; T = mlir::Value; PointerT = mlir::Value; ReferenceT = mlir::Value]’
indexed_accessor_range_base(const iterator_range &range)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/TypeRange.h:18,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/OperationSupport.h:23,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/Dialect.h:17,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/OpDefinition.h:22,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/IR/Builders.h:12,
from /home/dongshuai/test/llvm-project/mlir/include/mlir/Transforms/CFGToSCF.h:18,
from /home/dongshuai/test/llvm-project/mlir/lib/Transforms/Utils/CFGToSCF.cpp:116:
/home/dongshuai/test/llvm-project/mlir/include/mlir/IR/ValueRange.h:44:21: note: inherited here
using RangeBaseT::RangeBaseT;
^~~~~~~~~~
/home/dongshuai/test/llvm-project/mlir/include/mlir/IR/ValueRange.h:41:7: note: candidate: ‘constexpr mlir::OperandRange::OperandRange(const mlir::OperandRange&)’
class OperandRange final : public llvm::detail::indexed_accessor_range_base<
^~~~~~~~~~~~
/home/dongshuai/test/llvm-project/mlir/include/mlir/IR/ValueRange.h:41:7: note: candidate: ‘constexpr mlir::OperandRange::OperandRange(mlir::OperandRange&&)’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @EugeneZelenko@dtcxzyw@loongknown

        Issue actions

          Error when compiling with GCC 8.3.0 · Issue #82226 · llvm/llvm-project