aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/mips-args-2.c
blob: f53bfb2cde5f3dc05be7a0298e463331738bf4ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Check the _MIPSEB and _MIPSEL macros are accurate.  */
/* { dg-do run { target mips*-*-* } } */
short foo = 1;
int main ()
{
  char *p = (char *) &foo;

#ifdef _MIPSEB
  if (p[0] != 0 || p[1] != 1)
#else
  if (p[0] != 1 || p[1] != 0)
#endif
    abort ();
  exit (0);
}