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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [const-addr-expr-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include        <stdio.h>
2
#include        <stdlib.h>
3
extern void abort();
4
 
5
typedef struct foo
6
{
7
        int     uaattrid;
8
        char    *name;
9
} FOO;
10
 
11
FOO     Upgrade_items[] =
12
{
13
        {1, "1"},
14
        {2, "2"},
15
        {0, NULL}
16
};
17
 
18
int     *Upgd_minor_ID =
19
        (int *) &((Upgrade_items + 1)->uaattrid);
20
 
21
int     *Upgd_minor_ID1 =
22
        (int *) &((Upgrade_items)->uaattrid);
23
 
24
int
25
main(int argc, char **argv)
26
{
27
        if (*Upgd_minor_ID != 2)
28
          abort();
29
 
30
        if (*Upgd_minor_ID1 != 1)
31
          abort();
32
        return 0;
33
}

powered by: WebSVN 2.1.0

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