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/] [20050511-1.C] - Diff between revs 154 and 816

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

Rev 154 Rev 816
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-w" } */
/* { dg-options "-w" } */
/* { dg-options "-O3 -w" { target powerpc*-*-* } } */
/* { dg-options "-O3 -w" { target powerpc*-*-* } } */
#include 
#include 
#include 
#include 
typedef signed short SINT16 ;
typedef signed short SINT16 ;
typedef unsigned long UINT32 ;
typedef unsigned long UINT32 ;
typedef unsigned int UINT ;
typedef unsigned int UINT ;
class A
class A
{
{
public:
public:
    union
    union
    {
    {
      SINT16 xy[2];
      SINT16 xy[2];
      UINT32 abXY;
      UINT32 abXY;
    };
    };
  bool operator==(const A& other) const {return abXY == other.abXY;}
  bool operator==(const A& other) const {return abXY == other.abXY;}
  bool operator!=(const A& other) const {return abXY != other.abXY;}
  bool operator!=(const A& other) const {return abXY != other.abXY;}
};
};
template  struct pArray { unsigned char u08[16*(((size*1)+15)/16)] __attribute__ ((aligned(16))); };
template  struct pArray { unsigned char u08[16*(((size*1)+15)/16)] __attribute__ ((aligned(16))); };
struct B
struct B
{
{
  union {
  union {
    A mvL[2];
    A mvL[2];
    pArray<1> xyz;
    pArray<1> xyz;
  };
  };
} ;
} ;
typedef struct
typedef struct
{
{
  UINT w;
  UINT w;
  B b;
  B b;
}C;
}C;
UINT32 bar (const C * sPtr)
UINT32 bar (const C * sPtr)
{
{
  UINT w = sPtr->w;
  UINT w = sPtr->w;
  A a;
  A a;
  a.xy[0] = sPtr->b.mvL[w].xy[0]<<2;
  a.xy[0] = sPtr->b.mvL[w].xy[0]<<2;
  a.xy[1] = sPtr->b.mvL[w].xy[1]<<2;
  a.xy[1] = sPtr->b.mvL[w].xy[1]<<2;
  if (a.xy[0] != ((SINT16) 0xffff << 2))
  if (a.xy[0] != ((SINT16) 0xffff << 2))
        abort ();
        abort ();
}
}
int main()
int main()
{
{
        A a;
        A a;
        C c;
        C c;
        a.xy[0] = 0xffff;
        a.xy[0] = 0xffff;
        a.xy[1] = 0xffff;
        a.xy[1] = 0xffff;
        c.w=0;
        c.w=0;
        c.b.mvL[0].xy[0] = a.xy[0];
        c.b.mvL[0].xy[0] = a.xy[0];
        c.b.mvL[0].xy[1] = a.xy[1];
        c.b.mvL[0].xy[1] = a.xy[1];
        bar (&c);
        bar (&c);
}
}
 
 

powered by: WebSVN 2.1.0

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