Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[CG]: Assertion failed: (AddressPoints.count(std::make_pair(ClassDecl, Offset)) && "Missing address point for class"), function InitializeVtablePtrsRecursive, file CGClass.cpp, line 1407. #6531

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR6057
Status RESOLVED DUPLICATE of bug 5890
Importance P normal
Reported by Roman Divacky (rdivacky@freebsd.org)
Reported on 2010-01-16 08:57:03 -0800
Last modified on 2010-02-22 12:52:15 -0800
Version unspecified
Hardware PC FreeBSD
CC dgregor@apple.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments 000.cc (3417 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 4065
test case

with the attached testcase I am getting:

pes delta$ clang 000.cc
000.cc:53:5: warning: control reaches end of non-void function [-Wreturn-type]
    };
    ^
000.cc:105:5: warning: void function 'strstream' should not return a value [-
Wreturn-type]
  { return _M_buf.str(); }
    ^      ~~~~~~~~~~~~
Assertion failed: (AddressPoints.count(std::make_pair(ClassDecl, Offset)) &&
"Missing address point for class"), function InitializeVtablePtrsRecursive,
file CGClass.cpp, line 1407.
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple x86_64-unknown-
freebsd8.0 -S -disable-free -main-file-name 000.cc -mrelocation-model static -
mdisable-fp-elim -munwind-tables -target-cpu x86-64 -resource-dir
/usr/local/lib/clang/1.1 -fmessage-length 152 -fexceptions -fgnu-runtime -
fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-CNUqXA.s -x c++ 000.cc
1.      <eof> parser at end of file
2.      000.cc:102:14: LLVM IR generation of declaration 'strstream::strstream'
3.      000.cc:102:14: Generating code for declaration 'strstream::strstream'
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
Quuxplusone commented 14 years ago

Attached 000.cc (3417 bytes, application/octet-stream): test case

Quuxplusone commented 14 years ago

_This bug has been marked as a duplicate of bug 5890_

Quuxplusone commented 14 years ago
I think this should be fixed now, but I get:

b.cc:79:15: error: no member named 'init' in 'class basic_iostream<char, struct
      char_traits<char> >'
      { this->init(__sb); }
        ~~~~  ^
b.cc:103:24: note: in instantiation of member function 'basic_iostream<char,
      struct char_traits<char> >::basic_iostream' requested here
  : basic_ios<char>(), basic_iostream<char>(0),
                       ^
on the testcase so I can't confirm.
Quuxplusone commented 14 years ago
(In reply to comment #2)
> I think this should be fixed now, but I get:
>
> b.cc:79:15: error: no member named 'init' in 'class basic_iostream<char,
struct
>       char_traits<char> >'
>       { this->init(__sb); }
>         ~~~~  ^
> b.cc:103:24: note: in instantiation of member function 'basic_iostream<char,
>       struct char_traits<char> >::basic_iostream' requested here
>   : basic_ios<char>(), basic_iostream<char>(0),
>                        ^
> on the testcase so I can't confirm.
>

Interesting. Adding a init() declaration with the appropriate signature makes
the test work as intended. Not sure why we didn't diagnose the missing init()
before... perhaps we were asserting before init() got instantiated?