This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR58942, Cilk+] Fix ICE when pointer is used in array notation
- From: Marek Polacek <polacek at redhat dot com>
- To: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>
- Cc: "GCC Patches (gcc-patches at gcc dot gnu dot org)" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 25 May 2014 12:10:32 +0200
- Subject: Re: [PATCH, PR58942, Cilk+] Fix ICE when pointer is used in array notation
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756956456365 at IRSMSX101 dot ger dot corp dot intel dot com>
On Sun, May 25, 2014 at 09:31:50AM +0000, Zamyatin, Igor wrote:
> +/* { dg-do compile } */
> +/* { dg-options "-fcilkplus" } */
> +
> +int foo (int*p, int i)
> +{
> + return __sec_reduce_max_ind(p[1:i]);
> +}
BTW, similar testcase seems to segfault too:
int foo (int*p, int *i)
{
return __sec_reduce_max_ind(p[1:i]);
}
Marek