Local nonconstant initializer list codegen assertion failure

I don't know what the spec has to say about code like this, certainly
GCC isn't without complaint, but generates "expected" code...

CookieJar:Desktop keith$ cat test.c
struct s { int i; };

void foo(struct s a, struct s b) {
    struct s A[2] = { a, b };
}

CookieJar:Desktop keith$ gcc -Wall -Wextra -pedantic -fsyntax-only test.c
test.c: In function 'foo':
test.c:4: warning: initializer element is not computable at load time
test.c:4: warning: initializer element is not computable at load time
test.c:4: warning: unused variable 'A'

CookieJar:Desktop keith$ clang -fsyntax-only test.c

CookieJar:Desktop keith$ gcc -c test.c

CookieJar:Desktop keith$ clang -emit-llvm test.c
Assertion failed: (E && !hasAggregateLLVMType(E->getType()) &&
"Invalid scalar expression to emit"), function EmitScalarExpr, file
CGExprScalar.cpp, line 1031.

-Keith

Totally legal (if you add -std=c99 to the gcc command line, the warning go away).

Looks like another bug in clangs code generation for initializers...

snaroff