On 07/14/2013 09:54 AM, Chung-Lin Tang wrote:
> These are nios2 patches for the gcc testsuite. Some new testcases were
> added since the last posting.

> Index: gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
> ===================================================================
> --- gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c    (revision 
> 200946)
> +++ gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c    (working copy)
> @@ -124,16 +124,17 @@ __memmove_chk (void *dst, const void *src, __SIZE_
>  void *
>  memset (void *dst, int c, __SIZE_TYPE__ n)
>  {
> +  while (n-- != 0)
> +    n[(char *) dst] = c;
> +
>    /* Single-byte memsets should be done inline when optimisation
> -     is enabled.  */
> +     is enabled.  Do this after the copy in case we're being called to
> +     initialize bss.  */
>  #ifdef __OPTIMIZE__
>    if (memset_disallowed && inside_main && n < 2)
>      abort ();
>  #endif
>  
> -  while (n-- != 0)
> -    n[(char *) dst] = c;
> -
>    return dst;
>  }

I'm not sure I understand this change. Is nios2 the only target calling
memset to initialize bss, and memset_disallowed is nonzero at the start
of execution?

> Index: gcc/testsuite/gcc.target/nios2/nios2-int-types.c
> ===================================================================
> --- gcc/testsuite/gcc.target/nios2/nios2-int-types.c  (revision 0)
> +++ gcc/testsuite/gcc.target/nios2/nios2-int-types.c  (revision 0)
> @@ -0,0 +1,34 @@
> +/* Test that various types are all derived from int.  */
> +/* { dg-do compile { target nios2-*-* } } */

I think you can lose the { target nios2-*-* } for everything inside
gcc.target/nios2.


Bernd

Reply via email to