1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-fab1" } */
4 extern int __printf_chk (int, const char *, ...);
5 volatile int vi0
, vi1
, vi2
, vi3
, vi4
, vi5
, vi6
, vi7
, vi8
, vi9
, via
;
10 __printf_chk (1, "hello");
12 __printf_chk (1, "hello\n");
14 __printf_chk (1, "a");
18 __printf_chk (1, "%s", "hello");
20 __printf_chk (1, "%s", "hello\n");
22 __printf_chk (1, "%s", "a");
24 __printf_chk (1, "%s", "");
26 __printf_chk (1, "%c", 'x');
28 __printf_chk (1, "%s\n", "hello\n");
32 /* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab1"} } */
33 /* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
34 /* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
35 /* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
36 /* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab1"} } */
37 /* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab1"} } */
38 /* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab1"} } */
39 /* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab1"} } */
40 /* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab1"} } */
41 /* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab1"} } */
42 /* { dg-final { cleanup-tree-dump "fab1" } } */