Fixed UltraSPARC II bus error. Probably a compiler bug?
Issue #65 git-svn-id: http://picoc.googlecode.com/svn/trunk@385 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
3377c3b568
commit
e077cc9d49
|
@ -1192,9 +1192,10 @@ void ExpressionParseFunctionCall(struct ParseState *Parser, struct ExpressionSta
|
|||
if (FuncValue->Val->FuncDef.Intrinsic == NULL)
|
||||
{
|
||||
/* run a user-defined function */
|
||||
struct ParseState FuncParser = FuncValue->Val->FuncDef.Body;
|
||||
struct ParseState FuncParser;
|
||||
int Count;
|
||||
|
||||
memcpy((void *)&FuncParser, (void *)&FuncValue->Val->FuncDef.Body, sizeof(struct ParseState));
|
||||
VariableStackFrameAdd(Parser, FuncValue->Val->FuncDef.Intrinsic ? FuncValue->Val->FuncDef.NumParams : 0);
|
||||
TopStackFrame->NumParams = ArgCount;
|
||||
TopStackFrame->ReturnValue = ReturnValue;
|
||||
|
|
|
@ -88,8 +88,8 @@ void *VariableAlloc(struct ParseState *Parser, int Size, int OnHeap)
|
|||
/* allocate a value either on the heap or the stack using space dependent on what type we want */
|
||||
struct Value *VariableAllocValueAndData(struct ParseState *Parser, int DataSize, int IsLValue, struct Value *LValueFrom, int OnHeap)
|
||||
{
|
||||
struct Value *NewValue = VariableAlloc(Parser, sizeof(struct Value) + DataSize, OnHeap);
|
||||
NewValue->Val = (union AnyValue *)((char *)NewValue + sizeof(struct Value));
|
||||
struct Value *NewValue = VariableAlloc(Parser, MEM_ALIGN(sizeof(struct Value)) + DataSize, OnHeap);
|
||||
NewValue->Val = (union AnyValue *)((char *)NewValue + MEM_ALIGN(sizeof(struct Value)));
|
||||
NewValue->ValOnHeap = OnHeap;
|
||||
NewValue->ValOnStack = !OnHeap;
|
||||
NewValue->IsLValue = IsLValue;
|
||||
|
|
Loading…
Reference in a new issue