Opened 3 years ago

Closed 3 years ago

#78 closed defect (fixed)

Generic array element dereference

Reported by: Thierry Delisle Owned by: Rob Schluntz <rschlunt@…>
Priority: major Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

This code segfaults:

forall(otype T)
struct X {
	T arr[1];
};

forall(otype T)
void doit( X(T) & x, T e ) {
	x.arr[0] = e;
}

int main() {
	X(int) a;
	doit( a, 1 );
}

Change History (1)

comment:1 Changed 3 years ago by Rob Schluntz <rschlunt@…>

Owner: set to Rob Schluntz <rschlunt@…>
Resolution: fixed
Status: newclosed

In c20b0fe:

Perform pointer decay on instantiated generic member expressions [fixes #78]

Note: See TracTickets for help on using tickets.