[llvm-bugs] [Bug 32864] New: tools/clang/include/clang/AST/APValue.h:314: clang::APValue &clang::APValue::getStructField(unsigned int): Assertion `isStruct() && "Invalid accessor"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 1 08:02:15 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32864

            Bug ID: 32864
           Summary: tools/clang/include/clang/AST/APValue.h:314:
                    clang::APValue
                    &clang::APValue::getStructField(unsigned int):
                    Assertion `isStruct() && "Invalid accessor"' failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

$ cat file1.cpp
struct transfer_t {
  void *fctx;
};
template <typename Ctx> class record {
  void run() {
    transfer_t t;
    Ctx from{t.fctx};
  }
};

$ clang -std=c++14 file1.cpp
clang-5.0: ../tools/clang/include/clang/AST/APValue.h:314: clang::APValue
&clang::APValue::getStructField(unsigned int): Assertion `isStruct() &&
"Invalid accessor"' failed.
#0 0x0000000001c13084 PrintStackTraceSignalHandler(void*)
(/usr/local/bin/clang-5.0+0x1c13084)
#1 0x0000000001c133b6 SignalHandler(int) (/usr/local/bin/clang-5.0+0x1c133b6)
#2 0x00007f5221a47390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#3 0x00007f52205b2428 gsignal
/build/glibc-9tT8Do/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#4 0x00007f52205b402a abort /build/glibc-9tT8Do/glibc-2.23/stdlib/abort.c:91:0
#5 0x00007f52205aabd7 __assert_fail_base
/build/glibc-9tT8Do/glibc-2.23/assert/assert.c:92:0
#6 0x00007f52205aac82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#7 0x00000000035127c0 extractSubobject((anonymous namespace)::EvalInfo&,
clang::Expr const*, (anonymous namespace)::CompleteObject const&, (anonymous
namespace)::SubobjectDesignator const&, clang::APValue&)
(/usr/local/bin/clang-5.0+0x35127c0)
#8 0x0000000003561d00 clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::VoidExprEvaluator, bool>::Visit(clang::Stmt const*)
(/usr/local/bin/clang-5.0+0x3561d00)


clang version 5.0.0 (trunk 301795)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170501/2a1e2112/attachment.html>


More information about the llvm-bugs mailing list