-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
build-problemflangFlang issues not falling into any other categoryFlang issues not falling into any other category
Description
When building LLVM 19.1.3 with flang project enabled, I am receiving errors in places where CHECK_MSG macro is used:
error: 'CHECK_MSG' was not declared in this scope
The 18.1.8 builds fine.
My cmake config:
cmake -S llvm -B "build" \
-Wno-dev -Wno-deprecated \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DCMAKE_BUILD_TYPE="MinSizeRel" \
-DCMAKE_COLOR_MAKEFILE="OFF" \
-DCMAKE_VERBOSE_MAKEFILE="OFF" \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;flang;lld;lldb" \
-DLLVM_TARGETS_TO_BUILD="X86;AArch64;ARM" \
-DLLVM_STATIC_LINK_CXX_STDLIB="ON" \
\
-DLLVM_INSTALL_TOOLCHAIN_ONLY="ON" \
\
-DLLVM_BUILD_TOOLS="ON" \
-DLLVM_INCLUDE_TOOLS="ON" \
-DLLVM_INSTALL_TOOLS="ON" \
-DLLVM_TOOLS_INSTALL_DIR="bin" \
\
-DCLANG_BUILD_TOOLS="ON" \
-DCLANG_INCLUDE_TOOLS="ON" \
-DCLANG_INSTALL_TOOLS="ON" \
-DCLANG_PLUGIN_SUPPORT="ON" \
\
-DLLVM_BUILD_RUNTIME="ON" \
-DLLVM_ENABLE_FFI="ON" \
-DLLVM_ENABLE_RTTI="ON" \
-DLLVM_ENABLE_THREADS="ON" \
-DLLVM_ENABLE_ZLIB="ON" \
-DLLVM_ENABLE_ZSTD="ON" \
-DLLVM_USE_PERF="ON" \
\
-DLLVM_BINUTILS_INCDIR="/usr/include" \
\
-DLLVM_ENABLE_BINDINGS="OFF" \
-DLLVM_INCLUDE_BENCHMARKS="OFF" \
-DLLVM_INCLUDE_DOCS="OFF" \
-DLLVM_INCLUDE_EXAMPLES="OFF" \
-DLLVM_INCLUDE_TESTS="OFF" \
-DLLVM_INCLUDE_UTILS="OFF" \
-DLLVM_INSTALL_BENCHMARKS="OFF" \
-DLLVM_INSTALL_DOCS="OFF" \
-DLLVM_INSTALL_EXAMPLES="OFF" \
-DLLVM_INSTALL_TESTS="OFF" \
-DLLVM_INSTALL_UTILS="OFF" \My system:
OS: quay.io/pypa/manylinux2014_x86_64 (based on CentOS 7)
GCC 14.2.0
CMake 3.31.0
Full log: build.log
Relevant snippet (click to expand)
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In member function 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:3: error: there are no arguments to 'CHECK_MSG' that depend on a template parameter, so a declaration of 'CHECK_MSG' must be available [-fpermissive]
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ^~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:3: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, 1>; ELEMENT = Fortran::evaluate::value::Integer<8>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, 2>; ELEMENT = Fortran::evaluate::value::Integer<16>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, 4>; ELEMENT = Fortran::evaluate::value::Integer<32>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, 8>; ELEMENT = Fortran::evaluate::value::Integer<64>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, 16>; ELEMENT = Fortran::evaluate::value::Integer<128>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 2>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<16>, 11>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 3>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<16>, 8>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 4>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<32>, 24>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 8>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<64>, 53>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 10>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<80, true, 16, short unsigned int, unsigned int, 128>, 64>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Real, 16>; ELEMENT = Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<128>, 113>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 2>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<16>, 11> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 3>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<16>, 8> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 4>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<32>, 24> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 8>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<64>, 53> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 10>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<80, true, 16, short unsigned int, unsigned int, 128>, 64> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Complex, 16>; ELEMENT = Fortran::evaluate::value::Complex<Fortran::evaluate::value::Real<Fortran::evaluate::value::Integer<128>, 113> >; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Logical, 1>; ELEMENT = Fortran::evaluate::value::Logical<8>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Logical, 2>; ELEMENT = Fortran::evaluate::value::Logical<16>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Logical, 4>; ELEMENT = Fortran::evaluate::value::Logical<32>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::Type<Fortran::common::TypeCategory::Logical, 8>; ELEMENT = Fortran::evaluate::value::Logical<64>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
254 | FOR_EACH_LENGTHLESS_INTRINSIC_KIND(template class ConstantBase, ) \
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp: In instantiation of 'std::vector<ELEMENT> Fortran::evaluate::ConstantBase<RESULT, ELEMENT>::Reshape(const Fortran::evaluate::ConstantSubscripts&) const [with RESULT = Fortran::evaluate::SomeKind<Fortran::common::TypeCategory::Derived>; ELEMENT = std::map<Fortran::common::Reference<const Fortran::semantics::Symbol>, Fortran::common::Indirection<Fortran::evaluate::Expr<Fortran::evaluate::SomeType>, true>, Fortran::evaluate::ComponentCompare>; Fortran::evaluate::ConstantSubscripts = std::vector<long int>]':
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:399:1: required from here
255 | template class ConstantBase<SomeDerived, StructureConstructorValues>; \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/.build/llvm-19.1.3/flang/lib/Evaluate/constant.cpp:163:12: error: 'CHECK_MSG' was not declared in this scope
163 | CHECK_MSG(optN, "Overflow in TotalElementCount");
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/constant.cpp.o] Error 1
gmake[1]: *** [tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
As suggested in
llvm-project/flang/include/flang/Common/idioms.h
Lines 86 to 92 in 30213e9
| // For cheap assertions that should be applied in production. | |
| // To disable, compile with '-DCHECK=(void)' | |
| #ifndef CHECK | |
| #define CHECK(x) ((x) || (DIE("CHECK(" #x ") failed"), false)) | |
| // Same as above, but with a custom error message. | |
| #define CHECK_MSG(x, y) ((x) || (DIE("CHECK(" #x ") failed: " #y), false)) | |
| #endif |
export CFLAGS="-DCHECK='(void)' ${CFLAGS:-}"
export CXXFLAGS="-DCHECK='(void)' ${CXXFLAGS:-}"but that did not help.
Context: #86576
CC: @ceseo
P.S. Appreciate your work on flang, folks! Can't wait to check out the latest version!
Metadata
Metadata
Assignees
Labels
build-problemflangFlang issues not falling into any other categoryFlang issues not falling into any other category