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

Interal assertion triggered on a bad assignment inside a procedure return type declaration #4711

Open
IAnkenman opened this issue Jan 17, 2025 · 0 comments

Comments

@IAnkenman
Copy link

Context

Tested on two versions, both produce the same result:
Odin: dev-2025-01:47030501a && dev-2024-12-nightly:cf53404
OS: Windows 11 Home Basic (version: 24H2), build 26100.2605
CPU: Intel(R) Core(TM) Ultra 7 155H
RAM: 65033 MiB
Backend: LLVM 18.1.8

Expected Behavior

The compiler reports an error specifying why the assignment is invalid

Current Behavior

The compiler fails on an internal assertion.

Failure Information (for bugs)

Assertion Report:

C:\Projects\odin-lang\src\llvm_backend_utility.cpp(879): Assertion Failure: pt->Proc.calling_convention != ProcCC_Odin
exited with code -2147483645

The assertion report is the same in both tested versions, including the line number

Steps to Reproduce

Attempt to compile the following:

package main;

import "base:runtime";

foo :: proc () -> (allocator : runtime.Allocator = context.allocator) {
return;
}

main :: proc() -> () {
foo();
}

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