Open
Description
Bugzilla Link | 24550 |
Version | 3.7 |
OS | Linux |
Attachments | run script |
Reporter | LLVM Bugzilla Contributor |
Extended Description
Compiling the code below with -fblocks causes clang to trigger it's own assertion. The run script is attached as requested, the preprocessed source
code looks identical to the code below.
[ --- code --- ]
typedef void (^Block)();
void invoke_block (Block block);
// --- a class
class A
{
public:
int f () { return 0; }
};
// --- template base class ---
template
class Base
{
public:
T * t;
virtual void virtual_function () {}
};
// --- derive from template base class
template
class Derv : public Base
{
virtual void virtual_function ();
};
template
void Derv::virtual_function ()
{
invoke_block (^() {
int i = Base::t->f ();
});
}
int main(int argc, char **argv)
{
Derv d;
return 0;
}
[ --- end of code --- ]