Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/pr37337.C

raw
1 // PR middle-end/37337
2 // { dg-do compile }
3 // { dg-options "-O2" }
4
5 extern "C"
6 {
7 typedef struct _IO_FILE FILE;
8 extern int __fprintf_chk (FILE *, int, const char *, ...);
9 extern inline __attribute__ ((always_inline, gnu_inline, artificial))
10 int fprintf (FILE *s, const char *f, ...)
11 {
12 return __fprintf_chk (s, 1, f, __builtin_va_arg_pack ());
13 }
14 }
15
16 extern int a;
17 struct A
18 {
19 virtual ~A (void)
20 {
21 }
22 };
23
24 struct B : public A
25 {
26 B ();
27 FILE *b;
28 };
29
30 void f (int *);
31 B::B ()
32 {
33 f (&a);
34 for (int i = 0; i < 6; i++)
35 fprintf (b, "%02x", 0xff);
36 fprintf (b, "\n--\n");
37 }