Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42249.c
blob3289d54d6b99700fb4851a8117eb9ff69ae0ec28
1 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -fselective-scheduling -fsel-sched-pipelining" } */
4 typedef struct TypHeader
6 unsigned long size;
7 struct TypHeader **ptr;
8 } *TypHandle;
10 extern TypHandle NewBag (unsigned int type, unsigned long size);
11 typedef unsigned long TypPoint32;
13 TypHandle
14 QuoPP (TypHandle hdL, TypHandle hdR)
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;
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));
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))));