1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-fab" } */
4 typedef struct { int i
; } FILE;
6 extern int fprintf (FILE *, const char *, ...);
7 volatile int vi0
, vi1
, vi2
, vi3
, vi4
, vi5
, vi6
, vi7
, vi8
, vi9
;
12 fprintf (fp
, "hello");
14 fprintf (fp
, "hello\n");
20 fprintf (fp
, "%s", "hello");
22 fprintf (fp
, "%s", "hello\n");
24 fprintf (fp
, "%s", "a");
26 fprintf (fp
, "%c", 'x');
28 fprintf (fp
, "%d%d", vi0
, vi1
);
32 /* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
33 /* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
34 /* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
35 /* { dg-final { scan-tree-dump "vi3 = 0\[^\(\)\]*vi4 = 0" "fab"} } */
36 /* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
37 /* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
38 /* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
39 /* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab"} } */
40 /* { dg-final { scan-tree-dump "vi8.*fprintf.*fp.*\"%d%d\".*vi9" "fab"} } */
41 /* { dg-final { cleanup-tree-dump "fab" } } */