OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr27531-1.c] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* 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;
13
};
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;
19
 
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);
23
 
24
char *t;
25
int main (int argc, char **argv)
26
{
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)
37
    {
38
        switch (*a++)
39
        {
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);
50
        }
51
        if (onlylockflag && !Locks)
52
            fprintf(out, "%s\n", RCSname);
53
        if (shownames)
54
            while( currdate)
55
                recentdate(Head, currdate);
56
    }
57
}
58
void getrevpairs(char *argv)
59
{
60
    char c;
61
    struct Revpairs * nextrevpair;
62
    int separator;
63
    if (strchr(argv,':'))
64
        separator = ':';
65
    else
66
    {
67
        if (strchr(argv,'-') )
68
            warn("`-' is obsolete in `-r%s'; use `:' instead", argv);
69
        separator = '-';
70
    }
71
    for (;;)
72
    {
73
        nextrevpair->rnext = revlist;
74
        for (;; c = *++argv)
75
        {
76
            switch (c)
77
            {
78
                default:
79
                    continue;
80
                case ' ':
81
                case '\t':
82
                case '\n':
83
                    break;
84
                case ':':
85
                case '-':
86
                    if (c == separator)
87
                        continue;
88
            }
89
            break;
90
        }
91
        if (!c)
92
            break;
93
        error("missing `,' near `%c%s'", c, argv+1);
94
    }
95
}
96
 
97
int warn(const char *msg, char *argv)
98
{
99
  t = 0;  /* this function needs side-effects.  */
100
  return 0;
101
}
102
 
103
int error(const char *msg, int c, char *argv)
104
{
105
  t = 0; /* this function needs side-effects.  */
106
  return 0;
107
}
108
 
109
int recentdate(void *foo, void *bar)
110
{
111
  t = 0; /* this function needs side-effects.  */
112
  return 0;
113
}
114
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.