Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unsupported encoding"' failed. Aborted #81555

Closed
PiJoules opened this issue Feb 13, 2024 · 0 comments · Fixed by #80757
Closed

"Unsupported encoding"' failed. Aborted #81555

PiJoules opened this issue Feb 13, 2024 · 0 comments · Fixed by #80757
Assignees

Comments

@PiJoules
Copy link
Contributor

The following code crashes with: "/usr/local/google/home/leonardchan/llvm-project-build/bin/llvm" "clang++" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "test.cc" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debug-info-kind=constructor" "-dwarf-version=5" -x c++ /tmp/test.cc -ffixed-point -Oz

float func2(float);

template <typename T = _Sat _Accum>
class C {
 public:
  C(T intercept) : intercept_(intercept){};

  T func() const {
    return func2(1.0k);
  }

 private:
  T intercept_;
};

void func() {
  C<> c(1.0k);
  c.func();
}
llvm: llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:229: static bool llvm::DebugHandlerBase::isUnsignedDIType(const DIType *): Assertion `(Encoding == dwarf::DW_ATE_unsigned || Encoding == dwarf::DW_ATE_unsigned_char || Encoding == dwarf::DW_ATE_signed || Encoding == dwarf::DW_ATE_signed_char || Encoding == dwarf::DW_ATE_float || Encoding == dwarf::DW_ATE_UTF || Encoding == dwarf::DW_ATE_boolean || Encoding == dwarf::DW_ATE_complex_float || (Ty->getTag() == dwarf::DW_TAG_unspecified_type && Ty->getName() == "decltype(nullptr)")) && "Unsupported encoding"' failed.
Aborted

It looks like fixed types just need to be handled in the check at llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:229.

@PiJoules PiJoules self-assigned this Feb 13, 2024
@PiJoules PiJoules changed the title llvm: llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:229: static bool llvm::DebugHandlerBase::isUnsignedDIType(const DIType *): Assertion `(Encoding == dwarf::DW_ATE_unsigned || Encoding == dwarf::DW_ATE_unsigned_char || Encoding == dwarf::DW_ATE_signed || Encoding == dwarf::DW_ATE_signed_char || Encoding == dwarf::DW_ATE_float || Encoding == dwarf::DW_ATE_UTF || Encoding == dwarf::DW_ATE_boolean || Encoding == dwarf::DW_ATE_complex_float || (Ty->getTag() == dwarf::DW_TAG_unspecified_type && Ty->getName() == "decltype(nullptr)")) && "Unsupported encoding"' failed. Aborted "Unsupported encoding"' failed. Aborted Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants