[Bug c/8081] ICE with variably sized types returned from nested functions
- To: debian-gcc@lists.debian.org
- Subject: [Bug c/8081] ICE with variably sized types returned from nested functions
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
- Date: Wed, 11 Jan 2012 15:57:03 +0000
- Message-id: <bug-8081-5724-uwLosBFgFd@http.gcc.gnu.org/bugzilla/>
- In-reply-to: <bug-8081-5724@http.gcc.gnu.org/bugzilla/>
- References: <bug-8081-5724@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8081
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |accepts-invalid,
| |ice-on-invalid-code
Component|middle-end |c
Summary|ICE with variably sized |ICE with variably sized
|types and nested functions |types returned from nested
| |functions
Known to fail| |4.7.0
--- Comment #23 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-11 15:57:03 UTC ---
In PR21374 it was decided to reject the testcase which makes this a C frontend
issue. Testcase that still ICEs on the trunk even when optimizing:
int
main (int argc, char **argv)
{
int size = 10;
typedef struct
{
char val[size];
}
block;
block b;
block __attribute__((noinline))
retframe_block ()
{
return *(block *) &b;
}
b=retframe_block ();
return 0;
}
as alternative to rejecting this case we can lower returning variable-size
types during un-nesting to explicit passing of a return slot and using
memcpy, making the nested function return nothing.
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Reply to: