__label__ , internal compiler error:segmentation fault

sumanth sumanth.gundapneni@redpinesignals.com
Wed Apr 29 12:21:00 GMT 2009


Hi,
    I am encountering a segmentation fault : internal compiler error  
after running this torture case.
  

 #ifdef STACK_SIZE
#define DEPTH ((STACK_SIZE) / 512 + 1)
#else
#define DEPTH 1000
#endif

#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
x(a)
{
  __label__ xlab;
  void y(a)
    {
      if (a==0)
        goto xlab;
      y (a-1);
    }
  y (a);
 xlab:;
  return a;
}
#endif

main ()
{
#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
  if (x (DEPTH) != DEPTH)
    abort ();
#endif
  exit (0);
}

After seeing similar test cases as well, my compiler crashes because of 
__label__ xlab.
Can any one point me to solution for locally declared labels in the 
sense , any macros I should define in particular
to handle __label__.

Thanks in advance,
Sumanth
 
                               





More information about the Gcc-help mailing list