NO

Author Topic: [Solved in v7] Internal error: find_cheapest_spill_range().  (Read 2499 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2107
With PellesC v 6.5.
See attached file.

Partial code for testing:
Code: [Select]
#include <stdio.h>
#include <string.h>
//typedef int BOOL;
typedef short int SHORT;
typedef unsigned short int USHORT;
typedef long LONG;
typedef unsigned long ULONG;
typedef unsigned int UINT;
typedef UINT UINT32;
typedef UINT32 HB_TYPE;

typedef struct _HB_ITEM {
HB_TYPE type;
union {
struct hb_struArray asArray;
struct hb_struBlock asBlock;
struct hb_struDate asDate;
struct hb_struDouble asDouble;
struct hb_struInteger asInteger;
struct hb_struLogical asLogical;
struct hb_struLong asLong;
struct hb_struMemvar asMemvar;
struct hb_struPointer asPointer;
struct hb_struRefer asRefer;
struct hb_struExtRef asExtRef;
struct hb_struString asString;
struct hb_struSymbol asSymbol;
struct hb_struHash asHash;
} item;
} HB_ITEM, *PHB_ITEM, *HB_ITEM_PTR;

extern int ct_getref(void);
extern ULONG hb_parinfo(int iParam);
extern PHB_ITEM hb_param(int iParam, LONG lMask);
extern USHORT ct_error(USHORT uiSeverity, ULONG ulGenCode, ULONG ulSubCode, const char *szDescription, const char *szOperation, USHORT uiOsCode, USHORT uiFlags, ULONG uiArgCount, ...);
extern PHB_ITEM hb_paramError(int iParam);
extern char *hb_parc(int iParam, ...);
extern ULONG hb_parclen(int iParam, ...);
extern int ct_getargerrormode(void);
//#line 67 "source\ct\charop.c"

static void do_charop(int iSwitch)
{
int iNoRet;
iNoRet = ct_getref() && ((hb_parinfo(1) & ((HB_TYPE)0x02000)) != 0);
if ((hb_param(1, ((HB_TYPE)0x00400)) != ((void *)0)))
{
size_t sStrLen = hb_parclen(1);
size_t sPos;
unsigned char *pucString = (unsigned char *)hb_parc(1);
unsigned char *pucResult;
//
switch (iSwitch)
{
case 0:
{
if ((hb_param(2, ((HB_TYPE)0x00400)) != ((void *)0)))
{
char *pucString2 = hb_parc(2);
size_t sStrLen2 = hb_parclen(2);
for (sPos = 0; sPos < sStrLen; sPos++)
pucResult[sPos] = (char)(pucString[sPos] + pucString2[sPos % sStrLen2]);
}
else
{
int iArgErrorMode = ct_getargerrormode();
if (iArgErrorMode != -1)
{
ct_error((USHORT)iArgErrorMode, 1, 3211, ((void *)0), "CHARADD", 0, 4, 2, hb_paramError(1), hb_paramError(2));
}
memcpy(pucResult, pucString, sStrLen);
}
};
break;

};
}
return;
}
Not in version 7
« Last Edit: April 17, 2012, 01:04:30 PM by timovjl »
May the source be with you