Skip to content

Crash with label in block #870

Closed
@ChuanqiXu9

Description

@ChuanqiXu9

Reproducer:

// repro.c
struct Struct {};
struct Struct get_struct ();
void do_something (struct Struct);
void test (int cand)
{
  {
    label:
      do_something(get_struct());
  }
}

Compile it with clang -fclangir -c repro.c we can get:

loc("repro.c":8:5): error: must be the first operation in a block
fatal error: error in backend: CIR codegen: module verification error before running CIR passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions