OSDN Git Service

Properly cast integer constant char.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / pr46647.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mtune=generic" } */
3
4 char a[5];
5 int
6 func1 (void)
7 {
8   __builtin_memset (a,-1,sizeof (a));
9   return 0;
10 }
11
12 int a2[5];
13 int
14 func2 (void)
15 {
16   __builtin_memset (a2,-1,sizeof (a2));
17   return 0;
18 }
19
20 char a3[5];
21 int
22 func3 (void)
23 {
24   __builtin_memset (a3,0x8fffffff,sizeof (a3));
25   return 0;
26 }
27
28 char a4[5];
29 int
30 func4 (void)
31 {
32   __builtin_memset (a4,0x8fffff00,sizeof (a4));
33   return 0;
34 }
35
36 int a5[5];
37 int
38 func5 (void)
39 {
40   __builtin_memset (a5,0x8fffffff,sizeof (a5));
41   return 0;
42 }
43
44 /* { dg-final { scan-assembler-not "call\[\\t \]*_?memset" } } */