Opened 7 years ago
Last modified 7 years ago
#84 closed defect
tuple pointer assignment — at Version 1
Reported by: | pabuhr | Owned by: | Rob Schluntz |
---|---|---|---|
Priority: | minor | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description (last modified by )
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 (1)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|---|
Owner: | set to |
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.