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

Compiler crash with vector type #420

Closed
redstar opened this issue Jun 30, 2013 · 1 comment
Closed

Compiler crash with vector type #420

redstar opened this issue Jun 30, 2013 · 1 comment
Assignees

Comments

@redstar
Copy link
Member

redstar commented Jun 30, 2013

The following test case

import core.simd: double2;
struct Foo {
    double2 x;
    this(uint) {
        x = [0.0, 0.0];
    }
}
void main() {
    Foo y = Foo();
}

crashes with the assertion:

ldc2: /xtra/llvm-git/lib/IR/Instructions.cpp:2764: llvm::FPExtInst::FPExtInst(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::BasicBlock*): Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal FPExt"' failed.

Reproduced with LDC head and LLVM 3.4 trunk.

redstar added a commit to redstar/ldc that referenced this issue Jun 30, 2013
The frontend only creates a scalar literal instead of an
array literal in order to initialize a vector field. This
commit adds the missing code.
redstar added a commit that referenced this issue Jun 30, 2013
The frontend only creates a scalar literal instead of an
array literal in order to initialize a vector field. This
commit adds the missing code.
@ghost ghost assigned redstar Jun 30, 2013
redstar added a commit that referenced this issue Jun 30, 2013
The frontend only creates a scalar literal instead of an
array literal in order to initialize a vector field. This
commit adds the missing code.
@redstar
Copy link
Member Author

redstar commented Jun 30, 2013

Fixed with commit 1a8c358.

@redstar redstar closed this as completed Jun 30, 2013
redstar pushed a commit that referenced this issue Sep 27, 2014
remove no longer called functions
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

1 participant