one very strange problem:(:(

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

one very strange problem:(:(

1,544 Views
victorlxy
Contributor I
Dear All

     I just modified my code to simplest form, and the compiler still gives error message, here is my code:

#include <stdio.h>
main(){
    short n1,n2,i,j,k;
    n2 = 16;
    for (k=16; k > 1; k = k/2 )
    {
        n1 = n2;    n2 = n2/2;   
        for (j=0; j < n2; j++)
        {
            for (i=j; i < 16; i = i + n1)
            {
            }
        }
    }

    printf("END\n");
}


Very simple code, but compiler always gives such error:


scc -g -ge -env "C:\Program Files\Freescale\CodeWarrior for StarCore 3.1\StarCore_Support\compiler"  -be  -arch sc3400 -sc -mod -Og -O3 -Xlnk "-w" -Xlnk "-n" -o "C:\Documents and Settings\victorlxy\My Documents\FreeScale Projecs\test\project.eld" "test_Data\C_for_SC_Simulator\ObjectCode\main.obj"

Link Error   : ERROR: Non-zero return status from "C:\Program Files\Freescale\CodeWarrior for StarCore 3.1\StarCore_Support\compiler\bin\icode.exe".

Tool = SCC | Error ID = 1027
Project: test.mcp, Target: C for SC Simulator

Error   : "prototype_be.obj", line -1: Error: Bad call to linear solver (build_ud_linear_combi)
 - Context: <main'_main>

Tool = ICODE | Error ID = 3401
Project: test.mcp, Target: C for SC Simulator

Link Error   : link exit status = 2
Project: test.mcp, Target: C for SC Simulator






but the stranger problem here is that I changed one variable n2 to an integer such as 2, then it will work fine...how strange it is...:smileysad:
that is I changed my code to the following

#include <stdio.h>
main(){
    short n1,n2,i,j,k;
    n2 = 16;
    for (k=16; k > 1; k = k/2 )
    {
        n1 = n2;    n2 = n2/2;   
        for (j=0; j < 2; j++)
        {
            for (i=j; i < 16; i = i + n1)
            {
            }
        }
    }

    printf("END\n");
}

just changed the n2 to "2" in the red "2" place

then this code will run with no such above error message....

anyone knows how to deal with this problem ,  is this the complier problem ?? since I just could not find any error in my code


Best Regards

thank you all in advance

Labels (1)
0 Kudos
Reply
1 Reply

332 Views
CrasyCat
Specialist III
Hello
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
CrasyCat
0 Kudos
Reply