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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr16693-1.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// PR middle-end/16693
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort();
6
 
7
unsigned short ret6666(int) {
8
    return 0x66;
9
}
10
 
11
typedef enum {
12
    a   = 0x0, b   = 0x1, c   = 0x2, d   = 0x3, e   = 0x4, f   = 0x5,
13
    g   = 0x6, h   = 0x7, i   = 0x8, j   = 0x9, k   = 0xa, l   = 0xb,
14
    m   = 0xc, n   = 0xd, o   = 0xe, p   = 0xf
15
} Test_Enum;
16
 
17
int main(void) {
18
    unsigned char r1;
19
    r1 = static_cast(0xf & ret6666(44));
20
 
21
    if(r1 != 0x6)
22
        abort();
23
    return 0;
24
}
25
 

powered by: WebSVN 2.1.0

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