builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27531-1.c
blobb1ea748acb27af824c3d4c57ff5deaa1703dcbbf
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 /* { dg-skip-if "requires io" { freestanding } } */
9 typedef struct _IO_FILE FILE;
10 char const *RCSname;
11 void *Locks;
12 void * Head;
13 struct Revpairs{
14 struct Revpairs * rnext;
16 extern char *strchr(const char *s, int c);
17 extern int fprintf(FILE *, const char *format, ...);
18 static void getrevpairs (char*);
19 static int branchflag;
20 static struct Revpairs *revlist, *Revlst;
22 extern int warn(const char *msg, char *argv);
23 extern int error(const char *msg, int c, char *argv);
24 extern int recentdate(void *foo, void *bar);
26 char *t;
27 int main (int argc, char **argv)
29 FILE *out;
30 char *a, **newargv;
31 void *currdate;
32 int descflag, selectflag;
33 int onlylockflag;
34 int onlyRCSflag;
35 int shownames;
36 descflag = selectflag = shownames = 1;
37 onlylockflag = onlyRCSflag = 0;
38 while (a = *++argv, 0<--argc)
40 switch (*a++)
42 case 'L':
43 onlylockflag = 1;
44 case 'N':
45 shownames = 0;
46 case 'R':
47 t = a;
48 case 'b':
49 branchflag = 1;
50 case 'r':
51 getrevpairs(a);
53 if (onlylockflag && !Locks)
54 fprintf(out, "%s\n", RCSname);
55 if (shownames)
56 while( currdate)
57 recentdate(Head, currdate);
60 void getrevpairs(char *argv)
62 char c;
63 struct Revpairs * nextrevpair;
64 int separator;
65 if (strchr(argv,':'))
66 separator = ':';
67 else
69 if (strchr(argv,'-') )
70 warn("`-' is obsolete in `-r%s'; use `:' instead", argv);
71 separator = '-';
73 for (;;)
75 nextrevpair->rnext = revlist;
76 for (;; c = *++argv)
78 switch (c)
80 default:
81 continue;
82 case ' ':
83 case '\t':
84 case '\n':
85 break;
86 case ':':
87 case '-':
88 if (c == separator)
89 continue;
91 break;
93 if (!c)
94 break;
95 error("missing `,' near `%c%s'", c, argv+1);
99 int warn(const char *msg, char *argv)
101 t = 0; /* this function needs side-effects. */
102 return 0;
105 int error(const char *msg, int c, char *argv)
107 t = 0; /* this function needs side-effects. */
108 return 0;
111 int recentdate(void *foo, void *bar)
113 t = 0; /* this function needs side-effects. */
114 return 0;