1 /* PR sanitizer/81094 */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
4 /* { dg-options "-fsanitize=object-size" } */
10 __attribute__((noinline
, noclone
)) void
13 asm volatile ("" : : "r" (s
.i
) : "memory");
16 __attribute__((noinline
, noclone
)) void
21 orig
= (char *) __builtin_calloc (N
, sizeof (struct S
));
22 p
= (struct S
*) orig
;
28 __builtin_free (orig
);
31 /* { dg-output "load of address \[^\n\r]* with insufficient space for an object of type 'struct S'\[^\n\r]*(\n|\r\n|\r)" } */
32 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" } */
33 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" } */
34 /* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" } */
35 /* { dg-output "\[^\n\r]*load of address \[^\n\r]* with insufficient space for an object of type 'struct S'\[^\n\r]*(\n|\r\n|\r)" } */
36 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" } */
37 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" } */
38 /* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" } */
39 /* { dg-output "\[^\n\r]*load of address \[^\n\r]* with insufficient space for an object of type 'struct S'\[^\n\r]*(\n|\r\n|\r)" } */
40 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" } */
41 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" } */
42 /* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" } */
43 /* { dg-output "\[^\n\r]*load of address \[^\n\r]* with insufficient space for an object of type 'struct S'\[^\n\r]*(\n|\r\n|\r)" } */
44 /* { dg-output "\[^\n\r]*note: pointer points here\[^\n\r]*(\n|\r\n|\r)" } */
45 /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" } */
46 /* { dg-output "\[^\n\r]*\\^" } */