[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / Wrestrict-4.c
blobf2398ef164a6204798595696ddd1d2106b42914b
1 /* PR tree-optimization/83603 - ICE in builtin_memref at
2 gcc/gimple-ssa-warn-restrict.c:238
3 Test to verify that invalid calls to built-in functions declared
4 without a prototype don't cause an ICE.
5 { dg-do compile }
6 { dg-options "-O2 -Warray-bounds -Wrestrict" } */
8 void* memcpy ();
9 void* memmove ();
10 char* stpcpy ();
11 char* strcat ();
12 char* strcpy ();
13 char* strncat ();
14 char* strncpy ();
16 void* test_memcpy_0 ()
18 return memcpy ();
21 void* test_memcpy_1 (void *d)
23 return memcpy (d);
26 void* test_memcpy_2 (void *d, const void *s)
28 return memcpy (d, s);
32 void* test_memmove_0 ()
34 return memmove ();
37 void* test_memmove_1 (void *d)
39 return memmove (d);
42 void* test_memmove_2 (void *d, const void *s)
44 return memmove (d, s);
48 void* test_stpcpy_0 ()
50 return stpcpy ();
53 void* test_stpcpy_1 (char *d)
55 return stpcpy (d);
59 char* test_strcat_0 ()
61 return strcat ();
64 char* test_strcat_1 (char *d)
66 return strcat (d);
70 void* test_strcpy_0 ()
72 return strcpy ();
75 void* test_strcpy_1 (char *d)
77 return strcpy (d);
81 char* test_strncat_0 ()
83 return strncat ();
86 char* test_strncat_1 (char *d)
88 return strncat (d);
91 char* test_strncat_2 (char *d, const char *s)
93 return strncat (d, s);
97 void* test_strncpy_0 ()
99 return strncpy ();
102 void* test_strncpy_1 (char *d)
104 return strncpy (d);
107 void* test_strncpy_2 (char *d, const char *s)
109 return strncpy (d, s);