tuple pointer assignment
struct S {
int i, * p;
};
void ?{}( S & s, int & x ) {
s.[p, i] = [&x, 0];
}
int main() {
int i;
S s = { i };
i = *s.p;
}
test.c: In function '___constructor__F_R2sSRi__1':
test.c:8:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
s.[p, i] = [&x, 0];
Cforall Runtime error (UNIX pid:9572) Addressing invalid memory at location (nil)
Possible cause is reading outside the address space or writing to a protected area within the address space with an invalid pointer or subscript.
Stack back trace for: a.out
(0) a.out : __main__Fi___1 + 0x2e [0x4014e9]
Abort (core dumped)
A simpler example:
int main() {
int i;
int & x = i;
int *&r = &x;
}
Change History (3)
Description: |
modified (diff)
|
Owner: |
set to Rob Schluntz
|
Status: |
new →
assigned
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
In a3323db: