This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39900] New: ICE on nested function returning pointer to VLA
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2009 17:48:08 -0000
- Subject: [Bug c/39900] New: ICE on nested function returning pointer to VLA
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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