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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [ultrasp9.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* PR optimization/11018 */
2
/* Originator: <partain@dcs.gla.ac.uk> */
3
/* { dg-do run { target sparc*-*-* } } */
4
/* { dg-options "-O2 -mcpu=ultrasparc" } */
5
 
6
/* This used to fail on 32-bit Ultrasparc because
7
   of broken DImode shift patterns.  */
8
 
9
extern void abort(void);
10
 
11
typedef unsigned long long uint64_t;
12
typedef unsigned int size_t;
13
 
14
 
15
void to_octal (uint64_t value, char *where, size_t size)
16
{
17
  uint64_t v = value;
18
  size_t i = size;
19
 
20
  do
21
    {
22
      where[--i] = '0' + (v & ((1 << 3) - 1));
23
      v >>= 3;
24
    }
25
  while (i);
26
}
27
 
28
 
29
int main (void)
30
{
31
  char buf[8];
32
 
33
  to_octal(010644, buf, 6);
34
 
35
  if (buf[1] != '1')
36
     abort();
37
 
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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