Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/950221-1.c

raw
1 /* { dg-add-options stack_size } */
2
3 void abort (void);
4 void exit (int);
5
6 struct parsefile
7 {
8 long fd;
9 char *buf;
10 };
11 struct parsefile basepf;
12 struct parsefile *parsefile = &basepf;
13 #ifdef STACK_SIZE
14 int filler[STACK_SIZE / (2*sizeof(int))];
15 #else
16 int filler[0x3000];
17 #endif
18 int el;
19
20 char *
21 g1 (a, b)
22 int a;
23 int *b;
24 {
25 }
26
27 int
28 g2 (a)
29 long a;
30 {
31 if (a != 0xdeadbeefL)
32 abort ();
33 exit (0);
34 }
35
36 void
37 f (void)
38 {
39 register char *p, *q;
40 register int i;
41 register int something;
42
43 if (parsefile->fd == 0L && el)
44 {
45 const char *rl_cp;
46 int len;
47 rl_cp = g1 (el, &len);
48 __builtin_strcpy (p, rl_cp);
49 }
50 else
51 {
52 alabel:
53 i = g2 (parsefile->fd);
54 }
55 }
56
57 int
58 main (void)
59 {
60 el = 0;
61 parsefile->fd = 0xdeadbeefL;
62 f ();
63 }