2014-08-04 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27531-1.c
blob08e3f5ea24507951f7bf41b78f9ed67f1da8baa0
1 /* PR target/27531 */
2 /* This test case stressed the register allocator into reloading a LABEL_REF
3 on sparc, but didn't add a REG_LABEL note, ultimately causing the assembly
4 output to reference a label that had been eliminated. */
5 /* { dg-do link } */
6 /* { dg-options "-O2" } */
7 typedef struct _IO_FILE FILE;
8 char const *RCSname;
9 void *Locks;
10 void * Head;
11 struct Revpairs{
12 struct Revpairs * rnext;
14 extern char *strchr(const char *s, int c);
15 extern int fprintf(FILE *, const char *format, ...);
16 static void getrevpairs (char*);
17 static int branchflag;
18 static struct Revpairs *revlist, *Revlst;
20 extern int warn(const char *msg, char *argv);
21 extern int error(const char *msg, int c, char *argv);
22 extern int recentdate(void *foo, void *bar);
24 char *t;
25 int main (int argc, char **argv)
27 FILE *out;
28 char *a, **newargv;
29 void *currdate;
30 int descflag, selectflag;
31 int onlylockflag;
32 int onlyRCSflag;
33 int shownames;
34 descflag = selectflag = shownames = 1;
35 onlylockflag = onlyRCSflag = 0;
36 while (a = *++argv, 0<--argc)
38 switch (*a++)
40 case 'L':
41 onlylockflag = 1;
42 case 'N':
43 shownames = 0;
44 case 'R':
45 t = a;
46 case 'b':
47 branchflag = 1;
48 case 'r':
49 getrevpairs(a);
51 if (onlylockflag && !Locks)
52 fprintf(out, "%s\n", RCSname);
53 if (shownames)
54 while( currdate)
55 recentdate(Head, currdate);
58 void getrevpairs(char *argv)
60 char c;
61 struct Revpairs * nextrevpair;
62 int separator;
63 if (strchr(argv,':'))
64 separator = ':';
65 else
67 if (strchr(argv,'-') )
68 warn("`-' is obsolete in `-r%s'; use `:' instead", argv);
69 separator = '-';
71 for (;;)
73 nextrevpair->rnext = revlist;
74 for (;; c = *++argv)
76 switch (c)
78 default:
79 continue;
80 case ' ':
81 case '\t':
82 case '\n':
83 break;
84 case ':':
85 case '-':
86 if (c == separator)
87 continue;
89 break;
91 if (!c)
92 break;
93 error("missing `,' near `%c%s'", c, argv+1);
97 int warn(const char *msg, char *argv)
99 t = 0; /* this function needs side-effects. */
100 return 0;
103 int error(const char *msg, int c, char *argv)
105 t = 0; /* this function needs side-effects. */
106 return 0;
109 int recentdate(void *foo, void *bar)
111 t = 0; /* this function needs side-effects. */
112 return 0;