Skip to content

[clang] Crash on initialization #106180

Open
@cardigan1008

Description

@cardigan1008

I compile this code with a crash:

a = {{}, 1};

Assertion:

/root/llvm-project/clang/include/clang/AST/Expr.h:5091: clang::Expr* clang::InitListExpr::getInit(unsigned int):
Assertion `Init < getNumInits() && "Initializer access out of range!"' failed.

The details can be found here: https://godbolt.org/z/Yc9nvE5de

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions