This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gimple question
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Razya Ladelsky <RAZYA at il dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, Steven Bosscher <stevenb at suse dot de>, Mircea Namolaru <NAMOLARU at il dot ibm dot com>, Ayal Zaks <ZAKS at il dot ibm dot com>
- Date: Mon, 12 Jul 2004 13:35:06 +0000 (UTC)
- Subject: Re: gimple question
- References: <OFB21A0A3F.83CAEA34-ONC2256ECF.003F2B8C-C2256ECF.004037C9@il.ibm.com>
On Mon, 12 Jul 2004, Razya Ladelsky wrote:
> Hello,
>
> For the following function :
>
> int foo (int i, int array[i++])
> {
> return i;
> }
>
> I can't find the explicit increment of i (appearing in the second
> parameter) in the gimple tree.
> This information is preserved somewhere, as after rtl expansion, it
> appears
> explicitly in the body of the method.
>
> Could someone point me where to look for this info?
Try the pending_sizes list. That this works at all must be somewhat by
chance, as we certainly don't claim to implement C99 VLAs. (My reading of
the standard is that this increment *is* required to be executed, as a
type being variably modified is a property of the declarator so while the
type of array is "int *" it still counts as variably modified so the size
expression must be executed on entry to the function.)
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)