OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr24626-2.c] - Blame information for rev 516

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
 
3
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
4
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
5
typedef u_int32_t db_pgno_t;
6
typedef struct __db DB;
7
typedef struct __db_env DB_ENV;
8
typedef struct __db_mpoolfile DB_MPOOLFILE;
9
typedef struct __dbc DBC;
10
struct __db {
11
    DB_MPOOLFILE *mpf;
12
    db_pgno_t meta_pgno;
13
    struct __cq_aq {
14
    } s_links;
15
};
16
struct __db_env {
17
    struct {
18
    } xa_txn;
19
    u_int32_t flags;
20
};
21
typedef enum { MU_REMOVE, MU_RENAME, MU_OPEN } mu_action;
22
typedef struct __dbpginfo {
23
    u_int8_t type;
24
} PAGE;
25
int __db_master_update(mdbp, sdbp, txn, subdb, type, action, newname, flags)
26
  DB *mdbp, *sdbp;
27
{
28
    DB_ENV *dbenv;
29
    DBC *dbc, *ndbc;
30
    PAGE *p, *r;
31
    int modify, ret, t_ret;
32
    if ((ret = __db_cursor(mdbp, txn, &dbc,
33
                           (((dbenv)->flags & (0x0000002))
34
                            && modify) ? 35 : 0)) != 0)
35
        goto err;
36
    switch (action) {
37
        case MU_REMOVE:
38
            if ((ret = __memp_fget(mdbp->mpf, &sdbp->meta_pgno, 0, &p)) != 0)
39
                goto err;
40
            if ((((PAGE *)p)->type) == 9) {
41
                if ((ret = __db_free(dbc, r)) != 0) { }
42
            }
43
            if ((ret = __db_free(dbc, p)) != 0) {
44
                p = ((void *)0);
45
                goto err;
46
            }
47
            p = ((void *)0);
48
    }
49
 err:
50
    if (ndbc != ((void *)0) && (t_ret = __db_c_close(ndbc)) != 0 && ret == 0)
51
        ret = t_ret;
52
    return (ret);
53
}
54
 

powered by: WebSVN 2.1.0

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