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

extern (C++) problems #926

Closed
TurkeyMan opened this issue May 8, 2015 · 9 comments
Closed

extern (C++) problems #926

TurkeyMan opened this issue May 8, 2015 · 9 comments

Comments

@TurkeyMan
Copy link

I'm getting a whole lot of

Assertion failed: !(Pair.first != Ty && Pair.second == Ty) && "mapping to a source type", file D:\OpenSource\LLVM\llvm-git\lib\Linker\LinkModules.cpp, line 264

When I try and use extern (C++)

Are these known, or shall I start contriving cases?

@TurkeyMan
Copy link
Author

Actually, upon deep inspection, it's something rather more sinister... it's gonna be a lot of work to simplify a case >_<

@redstar
Copy link
Member

redstar commented May 8, 2015

Are you using ldmd2 or option -singleobj? Which ldc/LLVM version?

@TurkeyMan
Copy link
Author

I think VisualD invokes ldc2. I'm using the latest MSVC LDC build (ldc2-0.15.2-beta1-win64-msvc)

I've fixed other related problems, and after doing so, it seems this problem has gone away.
It was hard to isolate the particular thing causing this ICE without fixing numerous other things that seem to have collectively stopped this one.

@TurkeyMan
Copy link
Author

This problem keeps coming and going. It seems to appear upon a whole suite of different problems. It must be a catch-all at the end of line somewhere, after other checks fail to catch the error.

The common thread among my problems is that I'm using extern(C++) extensively.

@redstar
Copy link
Member

redstar commented May 31, 2015

I am closing this issue because it is a duplicate of #855 and #921. It is really an LLVM bug, see #904.
It has nothing to do with catch-all clauses. It is caused by -singleobj which is passed to ldc2 by ldmd2.

@redstar redstar closed this as completed May 31, 2015
@TurkeyMan
Copy link
Author

I don't use -singleobj though. I do all-at-once builds :/

@dnadlinger
Copy link
Member

With ldmd2 or ldc2?

@TurkeyMan
Copy link
Author

@rainers ?
I suspect ldc2...

@rainers
Copy link
Contributor

rainers commented Jun 1, 2015

Yes, Visual D calls ldc2 directly, and it doesn't use -singleobj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants