* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / asan / pr78541.c
blobfb02082f3d942c27e754899aa8ab3bbf3b040867
1 // PR sanitizer/78560
2 // { dg-do run }
3 // { dg-shouldfail "asan" }
5 void foo (double a, double b)
7 double *ptr;
9 double x = a + b;
10 ptr = &x;
12 double square () { __builtin_printf ("", *ptr); }
14 square ();
17 int main()
19 foo (1.2f, 2.3f);
20 return 0;
23 // { dg-output "ERROR: AddressSanitizer: stack-use-after-scope on address.*(\n|\r\n|\r)" }
24 // { dg-output "READ of size.*" }
25 // { dg-output ".*'x' <== Memory access at offset \[0-9\]* is inside this variable.*" }