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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [gdb/] [testsuite/] [gdb.cp/] [ref-types.cc] - Diff between revs 157 and 223

Only display areas with differences | Details | Blame | View Log

Rev 157 Rev 223
/* This test script is part of GDB, the GNU debugger.
/* This test script is part of GDB, the GNU debugger.
 
 
   Copyright 1999, 2004, 2007, 2008 Free Software Foundation, Inc.
   Copyright 1999, 2004, 2007, 2008 Free Software Foundation, Inc.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   */
   */
 
 
int main2(void);
int main2(void);
 
 
void marker1 (void)
void marker1 (void)
{
{
 
 
}
}
 
 
 
 
 
 
int main(void)
int main(void)
{
{
    short s;
    short s;
    short &rs = s;
    short &rs = s;
    short *ps;
    short *ps;
    short *&rps = ps;
    short *&rps = ps;
    short as[4];
    short as[4];
    short (&ras)[4] = as;
    short (&ras)[4] = as;
    s = -1;
    s = -1;
    ps = &s;
    ps = &s;
    as[0] = 0;
    as[0] = 0;
    as[1] = 1;
    as[1] = 1;
    as[2] = 2;
    as[2] = 2;
    as[3] = 3;
    as[3] = 3;
 
 
   #ifdef usestubs
   #ifdef usestubs
       set_debug_traps();
       set_debug_traps();
       breakpoint();
       breakpoint();
    #endif
    #endif
    marker1();
    marker1();
 
 
    main2();
    main2();
 
 
    return 0;
    return 0;
}
}
 
 
int f()
int f()
{
{
    int f1;
    int f1;
    f1 = 1;
    f1 = 1;
    return f1;
    return f1;
}
}
 
 
int main2(void)
int main2(void)
{
{
    char C;
    char C;
    unsigned char UC;
    unsigned char UC;
    short S;
    short S;
    unsigned short US;
    unsigned short US;
    int I;
    int I;
    unsigned int UI;
    unsigned int UI;
    long L;
    long L;
    unsigned long UL;
    unsigned long UL;
    float F;
    float F;
    double D;
    double D;
    char &rC = C;
    char &rC = C;
    unsigned char &rUC = UC;
    unsigned char &rUC = UC;
    short &rS = S;
    short &rS = S;
    unsigned short &rUS = US;
    unsigned short &rUS = US;
    int &rI = I;
    int &rI = I;
    unsigned int &rUI = UI;
    unsigned int &rUI = UI;
    long &rL = L;
    long &rL = L;
    unsigned long &rUL = UL;
    unsigned long &rUL = UL;
    float &rF = F;
    float &rF = F;
    double &rD = D;
    double &rD = D;
    C = 'A';
    C = 'A';
    UC = 21;
    UC = 21;
    S = -14;
    S = -14;
    US = 7;
    US = 7;
    I = 102;
    I = 102;
    UI = 1002;
    UI = 1002;
    L = -234;
    L = -234;
    UL = 234;
    UL = 234;
    F = 1.25E10;
    F = 1.25E10;
    D = -1.375E-123;
    D = -1.375E-123;
    I = f();
    I = f();
 
 
    return 0;
    return 0;
 
 
}
}
 
 

powered by: WebSVN 2.1.0

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