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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20080613-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/36520 */
2
/* Testcase by Richard Guenther <rguenth@gcc.gnu.org> */
3
 
4
typedef __SIZE_TYPE__ size_t;
5
typedef unsigned short int sa_family_t;
6
struct cmsghdr   {
7
    size_t cmsg_len;
8
    __extension__ unsigned char __cmsg_data [];
9
};
10
typedef unsigned int uint32_t;
11
struct in6_addr   {
12
    union       {
13
        uint32_t u6_addr32[4];
14
    } in6_u;
15
};
16
struct sockaddr_in   {
17
    sa_family_t sin_family;
18
};
19
struct in6_pktinfo   {
20
    struct in6_addr ipi6_addr;
21
};
22
typedef union {
23
    struct sockaddr_in sin;
24
} sockaddr_any;
25
static sockaddr_any src_addr;
26
 
27
inline struct cmsghdr * cmsg_put(struct cmsghdr *cm, int type, void *data, size_t len)
28
{
29
    memcpy(((cm)->__cmsg_data), data, len);
30
}
31
 
32
int hop_sendmsg(int fd) {
33
    struct cmsghdr *cm;
34
    if (src_addr.sin.sin_family) {
35
        if (src_addr.sin.sin_family == 2) {
36
            struct in6_pktinfo info;
37
            cm = cmsg_put(cm, 50, &info, sizeof(info));
38
        }
39
    }
40
}

powered by: WebSVN 2.1.0

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