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/] [gcc.c-torture/] [execute/] [990326-1.c] - Diff between revs 297 and 338

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

Rev 297 Rev 338
struct a {
struct a {
        char a, b;
        char a, b;
        short c;
        short c;
};
};
 
 
int
int
a1()
a1()
{
{
        static struct a x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
        static struct a x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
a2()
a2()
{
{
        static struct a x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
        static struct a x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
a3()
a3()
{
{
        static struct a x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
        static struct a x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
struct b {
struct b {
        int c;
        int c;
        short b, a;
        short b, a;
};
};
 
 
int
int
b1()
b1()
{
{
        static struct b x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
        static struct b x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
b2()
b2()
{
{
        static struct b x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
        static struct b x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
b3()
b3()
{
{
        static struct b x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
        static struct b x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
struct c {
struct c {
        unsigned int c:4, b:14, a:14;
        unsigned int c:4, b:14, a:14;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
c1()
c1()
{
{
        static struct c x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
        static struct c x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
c2()
c2()
{
{
        static struct c x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
        static struct c x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
c3()
c3()
{
{
        static struct c x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
        static struct c x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
struct d {
struct d {
        unsigned int a:14, b:14, c:4;
        unsigned int a:14, b:14, c:4;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
d1()
d1()
{
{
        static struct d x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
        static struct d x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
d2()
d2()
{
{
        static struct d x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
        static struct d x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
d3()
d3()
{
{
        static struct d x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
        static struct d x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
struct e {
struct e {
        int c:4, b:14, a:14;
        int c:4, b:14, a:14;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
e1()
e1()
{
{
        static struct e x = { ~1, -2, -65 }, y = { ~2, -2, -1 };
        static struct e x = { ~1, -2, -65 }, y = { ~2, -2, -1 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
e2()
e2()
{
{
        static struct e x = { ~1, -2, -1 }, y = { ~2, -66, -1 };
        static struct e x = { ~1, -2, -1 }, y = { ~2, -66, -1 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
e3()
e3()
{
{
        static struct e x = { ~1, -18, -33 }, y = { ~2, -66, -9 };
        static struct e x = { ~1, -18, -33 }, y = { ~2, -66, -9 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
int
int
e4()
e4()
{
{
        static struct e x = { -1, -1, 0 };
        static struct e x = { -1, -1, 0 };
 
 
        return x.a == 0 && x.b & 0x2000;
        return x.a == 0 && x.b & 0x2000;
}
}
 
 
struct f {
struct f {
        int a:14, b:14, c:4;
        int a:14, b:14, c:4;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
f1()
f1()
{
{
        static struct f x = { -65, -2, ~1 }, y = { -1, -2, ~2 };
        static struct f x = { -65, -2, ~1 }, y = { -1, -2, ~2 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
f2()
f2()
{
{
        static struct f x = { -1, -2, ~1 }, y = { -1, -66, ~2 };
        static struct f x = { -1, -2, ~1 }, y = { -1, -66, ~2 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
f3()
f3()
{
{
        static struct f x = { -33, -18, ~1 }, y = { -9, -66, ~2 };
        static struct f x = { -33, -18, ~1 }, y = { -9, -66, ~2 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
int
int
f4()
f4()
{
{
        static struct f x = { 0, -1, -1 };
        static struct f x = { 0, -1, -1 };
 
 
        return x.a == 0 && x.b & 0x2000;
        return x.a == 0 && x.b & 0x2000;
}
}
 
 
struct gx {
struct gx {
        int c:4, b:14, a:14;
        int c:4, b:14, a:14;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
struct gy {
struct gy {
        int b:14, a:14, c:4;
        int b:14, a:14, c:4;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
g1()
g1()
{
{
        static struct gx x = { ~1, -2, -65 };
        static struct gx x = { ~1, -2, -65 };
        static struct gy y = { -2, -1, ~2 };
        static struct gy y = { -2, -1, ~2 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
g2()
g2()
{
{
        static struct gx x = { ~1, -2, -1 };
        static struct gx x = { ~1, -2, -1 };
        static struct gy y = { -66, -1, ~2 };
        static struct gy y = { -66, -1, ~2 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
g3()
g3()
{
{
        static struct gx x = { ~1, -18, -33 };
        static struct gx x = { ~1, -18, -33 };
        static struct gy y = { -66, -9, ~2 };
        static struct gy y = { -66, -9, ~2 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
int
int
g4()
g4()
{
{
        static struct gx x = { ~1, 0x0020, 0x0010 };
        static struct gx x = { ~1, 0x0020, 0x0010 };
        static struct gy y = { 0x0200, 0x0100, ~2 };
        static struct gy y = { 0x0200, 0x0100, ~2 };
 
 
        return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
        return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
                (x.b & 0x00f0) == (y.b & 0x0f00));
                (x.b & 0x00f0) == (y.b & 0x0f00));
}
}
 
 
int
int
g5()
g5()
{
{
        static struct gx x = { ~1, 0x0200, 0x0100 };
        static struct gx x = { ~1, 0x0200, 0x0100 };
        static struct gy y = { 0x0020, 0x0010, ~2 };
        static struct gy y = { 0x0020, 0x0010, ~2 };
 
 
        return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
        return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
                (x.b & 0x0f00) == (y.b & 0x00f0));
                (x.b & 0x0f00) == (y.b & 0x00f0));
}
}
 
 
int
int
g6()
g6()
{
{
        static struct gx x = { ~1, 0xfe20, 0xfd10 };
        static struct gx x = { ~1, 0xfe20, 0xfd10 };
        static struct gy y = { 0xc22f, 0xc11f, ~2 };
        static struct gy y = { 0xc22f, 0xc11f, ~2 };
 
 
        return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
        return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
                (x.b & 0x03ff) == (y.b & 0x3ff0));
                (x.b & 0x03ff) == (y.b & 0x3ff0));
}
}
 
 
int
int
g7()
g7()
{
{
        static struct gx x = { ~1, 0xc22f, 0xc11f };
        static struct gx x = { ~1, 0xc22f, 0xc11f };
        static struct gy y = { 0xfe20, 0xfd10, ~2 };
        static struct gy y = { 0xfe20, 0xfd10, ~2 };
 
 
        return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
        return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
                (x.b & 0x3ff0) == (y.b & 0x03ff));
                (x.b & 0x3ff0) == (y.b & 0x03ff));
}
}
 
 
struct hx {
struct hx {
        int a:14, b:14, c:4;
        int a:14, b:14, c:4;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
struct hy {
struct hy {
        int c:4, a:14, b:14;
        int c:4, a:14, b:14;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
int
int
h1()
h1()
{
{
        static struct hx x = { -65, -2, ~1 };
        static struct hx x = { -65, -2, ~1 };
        static struct hy y = { ~2, -1, -2 };
        static struct hy y = { ~2, -1, -2 };
 
 
        return (x.a == (y.a & ~64) && x.b == y.b);
        return (x.a == (y.a & ~64) && x.b == y.b);
}
}
 
 
int
int
h2()
h2()
{
{
        static struct hx x = { -1, -2, ~1 };
        static struct hx x = { -1, -2, ~1 };
        static struct hy y = { ~2, -1, -66 };
        static struct hy y = { ~2, -1, -66 };
 
 
        return (x.a == y.a && (x.b & ~64) == y.b);
        return (x.a == y.a && (x.b & ~64) == y.b);
}
}
 
 
int
int
h3()
h3()
{
{
        static struct hx x = { -33, -18, ~1 };
        static struct hx x = { -33, -18, ~1 };
        static struct hy y = { ~2, -9, -66 };
        static struct hy y = { ~2, -9, -66 };
 
 
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
        return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
}
}
 
 
int
int
h4()
h4()
{
{
        static struct hx x = { 0x0010, 0x0020, ~1 };
        static struct hx x = { 0x0010, 0x0020, ~1 };
        static struct hy y = { ~2, 0x0100, 0x0200 };
        static struct hy y = { ~2, 0x0100, 0x0200 };
 
 
        return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
        return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
                (x.b & 0x00f0) == (y.b & 0x0f00));
                (x.b & 0x00f0) == (y.b & 0x0f00));
}
}
 
 
int
int
h5()
h5()
{
{
        static struct hx x = { 0x0100, 0x0200, ~1 };
        static struct hx x = { 0x0100, 0x0200, ~1 };
        static struct hy y = { ~2, 0x0010, 0x0020 };
        static struct hy y = { ~2, 0x0010, 0x0020 };
 
 
        return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
        return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
                (x.b & 0x0f00) == (y.b & 0x00f0));
                (x.b & 0x0f00) == (y.b & 0x00f0));
}
}
 
 
int
int
h6()
h6()
{
{
        static struct hx x = { 0xfd10, 0xfe20, ~1 };
        static struct hx x = { 0xfd10, 0xfe20, ~1 };
        static struct hy y = { ~2, 0xc11f, 0xc22f };
        static struct hy y = { ~2, 0xc11f, 0xc22f };
 
 
        return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
        return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
                (x.b & 0x03ff) == (y.b & 0x3ff0));
                (x.b & 0x03ff) == (y.b & 0x3ff0));
}
}
 
 
int
int
h7()
h7()
{
{
        static struct hx x = { 0xc11f, 0xc22f, ~1 };
        static struct hx x = { 0xc11f, 0xc22f, ~1 };
        static struct hy y = { ~2, 0xfd10, 0xfe20 };
        static struct hy y = { ~2, 0xfd10, 0xfe20 };
 
 
        return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
        return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
                (x.b & 0x3ff0) == (y.b & 0x03ff));
                (x.b & 0x3ff0) == (y.b & 0x03ff));
}
}
 
 
int
int
main()
main()
{
{
  if (!a1 ())
  if (!a1 ())
    abort ();
    abort ();
  if (!a2 ())
  if (!a2 ())
    abort ();
    abort ();
  if (!a3 ())
  if (!a3 ())
    abort ();
    abort ();
  if (!b1 ())
  if (!b1 ())
    abort ();
    abort ();
  if (!b2 ())
  if (!b2 ())
    abort ();
    abort ();
  if (!b3 ())
  if (!b3 ())
    abort ();
    abort ();
  if (!c1 ())
  if (!c1 ())
    abort ();
    abort ();
  if (!c2 ())
  if (!c2 ())
    abort ();
    abort ();
  if (!c3 ())
  if (!c3 ())
    abort ();
    abort ();
  if (!d1 ())
  if (!d1 ())
    abort ();
    abort ();
  if (!d2 ())
  if (!d2 ())
    abort ();
    abort ();
  if (!d3 ())
  if (!d3 ())
    abort ();
    abort ();
  if (!e1 ())
  if (!e1 ())
    abort ();
    abort ();
  if (!e2 ())
  if (!e2 ())
    abort ();
    abort ();
  if (!e3 ())
  if (!e3 ())
    abort ();
    abort ();
  if (!e4 ())
  if (!e4 ())
    abort ();
    abort ();
  if (!f1 ())
  if (!f1 ())
    abort ();
    abort ();
  if (!f2 ())
  if (!f2 ())
    abort ();
    abort ();
  if (!f3 ())
  if (!f3 ())
    abort ();
    abort ();
  if (!f4 ())
  if (!f4 ())
    abort ();
    abort ();
  if (!g1 ())
  if (!g1 ())
    abort ();
    abort ();
  if (!g2 ())
  if (!g2 ())
    abort ();
    abort ();
  if (!g3 ())
  if (!g3 ())
    abort ();
    abort ();
  if (g4 ())
  if (g4 ())
    abort ();
    abort ();
  if (g5 ())
  if (g5 ())
    abort ();
    abort ();
  if (!g6 ())
  if (!g6 ())
    abort ();
    abort ();
  if (!g7 ())
  if (!g7 ())
    abort ();
    abort ();
  if (!h1 ())
  if (!h1 ())
    abort ();
    abort ();
  if (!h2 ())
  if (!h2 ())
    abort ();
    abort ();
  if (!h3 ())
  if (!h3 ())
    abort ();
    abort ();
  if (h4 ())
  if (h4 ())
    abort ();
    abort ();
  if (h5 ())
  if (h5 ())
    abort ();
    abort ();
  if (!h6 ())
  if (!h6 ())
    abort ();
    abort ();
  if (!h7 ())
  if (!h7 ())
    abort ();
    abort ();
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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