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.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [code-gen3.C] - Diff between revs 305 and 338

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// GROUPS passed code-generation
// GROUPS passed code-generation
// Check that passing things which are not a multiple of
// Check that passing things which are not a multiple of
// 4 bytes in size doesn't mess up other subsequent parameters.
// 4 bytes in size doesn't mess up other subsequent parameters.
extern "C" int printf (const char *, ...);
extern "C" int printf (const char *, ...);
struct base {
struct base {
        int f1 : 8;
        int f1 : 8;
        int f2 : 8;
        int f2 : 8;
};
};
base global_base;
base global_base;
int val1;
int val1;
int test2 (struct base formal_base, int v1);
int test2 (struct base formal_base, int v1);
int main ()
int main ()
{
{
        val1 = 0x5e5e;
        val1 = 0x5e5e;
        return test2 (global_base, val1);
        return test2 (global_base, val1);
}
}
int test2 (struct base formal_base, int v1)
int test2 (struct base formal_base, int v1)
{
{
        formal_base.f1 = formal_base.f2;        // prevent warnings
        formal_base.f1 = formal_base.f2;        // prevent warnings
        if (v1 != 0x5e5e)
        if (v1 != 0x5e5e)
          { printf ("FAIL\n"); return 1; }
          { printf ("FAIL\n"); return 1; }
        else
        else
          printf ("PASS\n");
          printf ("PASS\n");
        return 0;
        return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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