This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix pr65369.c testcase


On Thu, May 28, 2015 at 7:11 AM, DJ Delorie <dj@redhat.com> wrote:
>
> Copied the way other tests get uint32_t.  Ok?

Ok.

>         * gcc.c-torture/execute/pr65369.c: Don't assume int is 32 bits.
>
> Index: gcc.c-torture/execute/pr65369.c
> ===================================================================
> --- gcc.c-torture/execute/pr65369.c     (revision 223737)
> +++ gcc.c-torture/execute/pr65369.c     (working copy)
> @@ -1,7 +1,8 @@
>  /* PR tree-optimization/65369 */
> +#include <stdint.h>
>
>  static const char data[] =
>    "12345678901234567890123456789012345678901234567890"
>    "123456789012345678901234567890";
>
>  __attribute__ ((noinline))
> @@ -11,13 +12,13 @@ static void foo (const unsigned int *buf
>      __builtin_abort ();
>  }
>
>  __attribute__ ((noinline))
>  static void bar (const unsigned char *block)
>  {
> -  unsigned int buf[16];
> +  uint32_t buf[16];
>    __builtin_memcpy (buf +  0, block +  0, 4);
>    __builtin_memcpy (buf +  1, block +  4, 4);
>    __builtin_memcpy (buf +  2, block +  8, 4);
>    __builtin_memcpy (buf +  3, block + 12, 4);
>    __builtin_memcpy (buf +  4, block + 16, 4);
>    __builtin_memcpy (buf +  5, block + 20, 4);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]