int a; void f (void) { int (*g (void))[a] { return 0; } } gets an ICE:
t.c: In function 'f': t.c:5: internal compiler error: in put_pending_sizes, at stor-layout.c:108 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Unlike bug 21374, this is returning a pointer to a VLA rather than a variable-size type itself. If a typedef is used for the VLA, it does not ICE. int a; void f (void) { typedef int T[a]; T *g (void) { return 0; } } -- Summary: ICE on nested function returning pointer to VLA Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39900