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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr42249.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
2
/* { dg-options "-O2 -fselective-scheduling -fsel-sched-pipelining" } */
3
 
4
typedef struct TypHeader
5
{
6
  unsigned long size;
7
  struct TypHeader **ptr;
8
} *TypHandle;
9
 
10
extern TypHandle NewBag (unsigned int type, unsigned long size);
11
typedef unsigned long TypPoint32;
12
 
13
TypHandle
14
QuoPP (TypHandle hdL, TypHandle hdR)
15
{
16
  TypHandle hdC;
17
  unsigned long degC;
18
  TypPoint32 *ptC;
19
  unsigned long degL;
20
  TypPoint32 *ptL;
21
  unsigned long degR;
22
  TypPoint32 *ptR;
23
  unsigned long p;
24
 
25
  degL = ((hdL)->size) / sizeof (TypPoint32);
26
  degR = ((hdR)->size) / sizeof (TypPoint32);
27
  degC = degL < degR ? degR : degL;
28
  hdC = NewBag (9, (unsigned long) (degC * sizeof (TypPoint32)));
29
  ptC = (TypPoint32 *) ((TypHandle *) ((hdC)->ptr));
30
 
31
  for (p = 0; p < degC; p++)
32
    ptC[(((p) < (degR)) ? (ptR)[(p)] : (p))] =
33
      ((((((p) < (degL)) ? (ptL)[(p)] : (p))) <
34
        (degR)) ? (ptR)[((((p) < (degL)) ? (ptL)[(p)] : (p)))]
35
       : ((((p) < (degL)) ? (ptL)[(p)] : (p))));
36
}
37
 

powered by: WebSVN 2.1.0

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