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

Noreturn call is not properly handled, should stop codegen after it #894

Open
ghehg opened this issue Sep 27, 2024 · 0 comments
Open

Noreturn call is not properly handled, should stop codegen after it #894

ghehg opened this issue Sep 27, 2024 · 0 comments
Assignees

Comments

@ghehg
Copy link
Collaborator

ghehg commented Sep 27, 2024

The changes from PR893 exposed a problem that CIR gen is ignoring noreturn call.
e.g for following C code

void abort();
void test() { abort(); }

Clangir generates

define dso_local void @test() #1  {
  call void @abort(), 
  ret void
}

which is not right, right code should be like,

define dso_local void @test() #1  {
  call void @abort(), !dbg !8
  unreachable
}

Source code here needs implementation for no return call

@ghehg ghehg changed the title Noreturn call is not handled Noreturn call is not properly handled, should stop codegen after it Sep 27, 2024
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