On Mon, 8 Apr 2013, Jakub Jelinek wrote:

> Hi!
> 
> I was curious whether we don't miscompile the following testcase on 4.8
> branch (-1+0i matches integer_all_onesp), but apparently we don't, because
> TYPE_PRECISION on the COMPLEX_TYPE is 0.  Anyway, I'd like to check this
> into trunk/4.8 branch, ok?

Ok.

Thanks,
Richard.

> 2013-04-08  Jakub Jelinek  <ja...@redhat.com>
> 
>       * gcc.c-torture/execute/pr56837.c: New test.
> 
> --- gcc/testsuite/gcc.c-torture/execute/pr56837.c.jj  2013-02-13 
> 21:50:57.150673158 +0100
> +++ gcc/testsuite/gcc.c-torture/execute/pr56837.c     2013-04-08 
> 10:23:44.941870778 +0200
> @@ -0,0 +1,21 @@
> +extern void abort (void);
> +_Complex int a[1024];
> +
> +__attribute__((noinline, noclone)) void
> +foo (void)
> +{
> +  int i;
> +  for (i = 0; i < 1024; i++)
> +    a[i] = -1;
> +}
> +
> +int
> +main ()
> +{
> +  int i;
> +  foo ();
> +  for (i = 0; i < 1024; i++)
> +    if (a[i] != -1)
> +      abort ();
> +  return 0;
> +}
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend

Reply via email to