Skip to content

Wrong MC/DC code generation with ternary operator #78453

Closed
@chapuni

Description

@chapuni

(https://godbolt.org/z/qYKKnvbva)

bool foo(bool a, bool b, bool c, bool d, bool e) {
    return (a || b ? c && d : e);
}

This is not rejected (as unsupported) but wrong code is generated.
CoverageGen emits a couple of decisions but CodeGen emits weird code.
Finally, llvm-cov crashes with unexpected test vector.

Metadata

Metadata

Assignees

Labels

clang:codegenIR generation bugs: mangling, exceptions, etc.coverage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions