2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr34312.c
blob876ac40401d0e4d44c8ea0a84538c08d7364370c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target ia32 } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-options "-O2 -march=pentium-m -fpic" } */
6 typedef struct
8 unsigned char seq[3];
9 } JamoNormMap;
11 static const JamoNormMap *
12 JamoClusterSearch (JamoNormMap aKey, const JamoNormMap * aClusters,
13 short aClustersSize)
15 unsigned short l = 0, u = aClustersSize - 1;
16 unsigned short h = (l + u) / 2;
18 if ((aKey.seq[1] - aClusters[h].seq[1]) < 0)
19 return JamoClusterSearch (aKey, &(aClusters[l]), h - l);
22 short
23 JamoSrchReplace (const JamoNormMap * aClusters, unsigned short aClustersSize,
24 unsigned short * aIn, unsigned int * aLength,
25 unsigned short aOffset)
27 JamoNormMap key;
29 key.seq[0] = 0;
30 key.seq[1] = 1;
31 key.seq[2] = 2;
33 JamoClusterSearch (key, aClusters, aClustersSize);