teak-llvm/clang/test/CodeGen/label-array-aggregate-init.c
Johannes Altmanninger 1ac700cdef [CodeGen] Fix clang crash on aggregate initialization of array of labels
Summary: Fix PR43700

The ConstantEmitter in AggExprEmitter::EmitArrayInit was initialized
with the CodeGenFunction set to null, which caused the crash.
Also simplify another call, and make the CGF member a const pointer
since it is public but only assigned in the constructor.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D70302
2019-11-28 00:59:25 +01:00

7 lines
99 B
C

// RUN: %clang -cc1 -emit-llvm %s -o /dev/null
int main() {
L:
(void)(void *[]){ &&L, 0, 0 };
}