OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr37056.c] - Blame information for rev 745

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
static union {
4
    char buf[12 * sizeof (long long)];
5
} u;
6
 
7
int main ()
8
{
9
  int off, len, i;
10
  char *p, *q;
11
 
12
  for (off = 0; off < (sizeof (long long)); off++)
13
    for (len = 1; len < (10 * sizeof (long long)); len++)
14
      {
15
        for (i = 0; i < (12 * sizeof (long long)); i++)
16
          u.buf[i] = 'a';
17
        p = (__extension__ (__builtin_constant_p ('\0') && ('\0') == '\0'
18
                            ? ({void *__s = (u.buf + off); __s;})
19
                            : __builtin_memset (u.buf + off, '\0', len)));
20
        if (p != u.buf + off)
21
          abort ();
22
        for (i = 0; i < off; i++, q++)
23
          if (*q != 'a')
24
            abort ();
25
      }
26
  return 0;
27
}
28
 

powered by: WebSVN 2.1.0

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