Menu

#490 Static var causes segment violation?

closed-remind
None
5
2003-03-27
2003-03-27
No

Not sure what causes the crash here. Anyhow,
compiling with latests CVS sources (March 27 2003)

sdcc -c --model-large test.c
Caught signal 11: SIGSEGV

#include <stdio.h>
#include <math.h>

void test (void)
{
static int i;
float x;

for(i=0; i<35; i++)
{
if(i==31) x=1.57079633;
else if(i==32) x=1.57079633/2.0;
else x=i*0.2;

printf("%5.2f %11.8f %11.8f\n", x, sinf(x), cosf(x));
}
}

Discussion

  • Johan Knol

    Johan Knol - 2003-03-27
    • assigned_to: nobody --> johanknol
    • status: open --> closed-remind
     
  • Johan Knol

    Johan Knol - 2003-03-27

    Logged In: YES
    user_id=63512

    Not any more

     

Log in to post a comment.