-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-10976
-
-
-
default
Consider the following code:
#include <stdarg.h>
struct S { int x; };
extern void use(int);
void callee_s(int k, ...) {
va_list ap;
va_start(ap, k);
struct S s = va_arg(ap, struct S);
use(s.x);
}
void caller_s() {
struct S s = { 7 };
callee_s(2, s);
}
The compiler will erroneously generate two loads for the initialization of 'struct S s' in callee_s, leading to a memory error.