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

Module verification error of switch statements #588

Open
wenpen opened this issue May 6, 2024 · 3 comments
Open

Module verification error of switch statements #588

wenpen opened this issue May 6, 2024 · 3 comments

Comments

@wenpen
Copy link
Contributor

wenpen commented May 6, 2024

struct St{
  ~St(){}
};

int f(int a) {
  switch(a) {
    case 1:{
      St a;
      return 1;
    }
  }
  return 0;
}
fatal error: error in backend: CIR codegen: module verification error before running CIR passes
@wenpen
Copy link
Contributor Author

wenpen commented May 6, 2024

I know it's a verification error about SwitchOp, do we have some methods to print more information (e.g. the illegal cir body)?

@Lancern
Copy link
Collaborator

Lancern commented May 6, 2024

do we have some methods to print more information (e.g. the illegal cir body)?

Try -Xclang -clangir-disable-verifier -Xclang -clangir-disable-passes

@bcardosolopes
Copy link
Member

Interesting, it usually says at least something about what failed to verify. Anyways, use the suggestions from Lancern to isolate the CIR output that can help you understand the bad IR

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

3 participants