Opened 3 years ago

#239 new defect

Including kernel but not threads crashes vtable generation

Reported by: Thierry Delisle Owned by:
Priority: major Component: cfa-cc
Version: 1.0 Keywords: vtable
Cc:

Description

This code crashes the compiler:

#include <kernel.hfa>

thread test {};
void ?{}(test & this) {}
void ^?{}(test & mutex this) {}
void main(test & this) {}

int main() {
	test t;
}

It's something to do with vtables:

CFA Version 1.0.0 (debug)
cfa-cpp: ../../main/src/Concurrency/Keywords.cc:412: DeclarationWithType* Concurrency::ConcurrentSueKeyword::postmutate(FunctionDecl*): Assertion `vtable_decl' failed.
Stack back trace for: /u/tdelisle/workspace/cforall/build/driver/cfa-cpp
(0) /lib/x86_64-linux-gnu/libc.so.6 : (/*unknown*/)+0x36f36 [0x7ffff7a0af36]
(1) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : Concurrency::ConcurrentSueKeyword::postmutate(FunctionDecl*)+0x228 [0x555555eb2138]
(2) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : PassVisitor<Concurrency::ThreadKeyword>::mutate(FunctionDecl*)+0x150 [0x555555f3fa70]
(3) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : Concurrency::ThreadKeyword::implement(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&)+0x244 [0x555555edea34]
(4) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : Concurrency::applyKeywords(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&)+0x51 [0x555555eb73f1]
(5) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : SymTab::validate(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >&, bool)+0xc25 [0x55555695a545]
(6) /u/tdelisle/workspace/cforall/build/driver/cfa-cpp : main(/*unknown*/)+0x792 [0x555555c33ab2]
CC1 Translator error: stage 2, child failed 6

Change History (0)

Note: See TracTickets for help on using tickets.