Closed vineetgarc closed 3 years ago
Simplified version:
struct atype {
struct atype *b, *c;
} * d;
int e;
struct {
long f;
int g;
struct atype h;
_Bool j;
} k[1];
int bar(struct atype *m) {
m->b = (struct atype *)&e;
d = m;
}
int foo(void) {
int i = 0;
for (; i < sizeof sizeof(0); i++)
bar((struct atype *)&k[i]);
}
Fixed by this one https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/76b70bd6bb4bd9b3ee0f7d825ab16e406bb7a839
P.S. Maybe we should move it to toolchain issues?
Thx for the quick fix Claudiu. Verified tt works. We agreed to keep all arc64 issues private for now, hence here ! But if this is a generic issue in ARCv2 backend too, feel free to move it there.
When building perf for ARCv3, getting error
pmu.s:714: Error: immediate is out of bounds for instruction 'stl'
At -O3, gcc is generating following, which is tripping the assembler.
stl.a r15,[r1,616]
Pre-processed file attached, build with -O3 pmu.i.gz