This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Fix for PR c/57490
- From: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- To: Jason Merrill <jason at redhat dot com>, Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Marek Polacek (polacek at redhat dot com)" <polacek at redhat dot com>
- Date: Fri, 16 Aug 2013 18:13:26 +0000
- Subject: RE: [PATCH] Fix for PR c/57490
- References: <BF230D13CA30DD48930C31D4099330003A43C80E at FMSMSX101 dot amr dot corp dot intel dot com> <20130701162401 dot GY2336 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A43C87D at FMSMSX101 dot amr dot corp dot intel dot com> <20130701170926 dot GB2336 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A43C8C0 at FMSMSX101 dot amr dot corp dot intel dot com> <yddhagcvwh0 dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <ydda9ldisvi dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <yddtxizkrl0 dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <BF230D13CA30DD48930C31D4099330003A458A6A at FMSMSX101 dot amr dot corp dot intel dot com> <520E6A65 dot 4010500 at redhat dot com>
> -----Original Message-----
> From: Jason Merrill [mailto:jason@redhat.com]
> Sent: Friday, August 16, 2013 2:08 PM
> To: Iyer, Balaji V; Rainer Orth
> Cc: Jakub Jelinek; gcc-patches@gcc.gnu.org; Marek Polacek
> (polacek@redhat.com)
> Subject: Re: [PATCH] Fix for PR c/57490
>
> On 08/12/2013 01:16 PM, Iyer, Balaji V wrote:
> > + /* If it is a built-in array notation function, then the return type of
> > + the function is the type of the array passed in as array notation. */
>
> How can the function return an array?
>
I guess I worded the comment poorly. Well, what I was going to say is this:
float x, A[10];
x = __sec_reduce_add (A[:]); // The sec_reduce_add function's return type is the type of A[] which is float.
int y, B[10];
y = __sec_reduce_add (B[:]); // ...the return type of __sec_reduce_add function is same as B[] which is int
Thanks,
Balaji V. Iyer.
> Jason