------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-14 
17:02 -------
This testcase will abort no matter what and and if change it to something which 
will not abort all the 
time, it does not crash for me with -march=i386.
Here is the testcase I used:
extern void abort (void);
extern void exit (int);
#ifndef NO_TRAMPOLINES
void test(void (*t)(void))
{
        int i;
        for (i=0; i<10; i++)
        {
                t();
        }
}
static void recursive (int n, void (*proc) (void))
{
  __label__ l1;
  int skip=0xdeadbeef;
  void do_goto (void)
  {
    goto l1;
  }
  test(do_goto);
  skip=0;
  if (n == 3)
      recursive (n - 1, do_goto);
  else if (n > 0)
    recursive (n - 1, proc);
  else
    (*proc) ();
  return;
l1:
        if (skip==0xdeadbeef)
        {
          if (n == 3)
            exit (0);
          else
            abort ();
        }
}
int main ()
{
  recursive (3, abort);
  abort ();
}
#else
int main () { return 0; }
#endif

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21566

Reply via email to