> From: Marius Vollmer <[EMAIL PROTECTED]>
> Date: 11 Mar 2000 18:06:29 +0100
> 
> The segmentation fault only occurs when libguile has been compiled
> with optimizations.
> 
> When libguile is compiled without optimizations, it produces a clean
> `abort' in scm_ithrow:642 in this situation because it wants to throw
> an EBADF error about fd 0 but is not yet prepared to handle such
> errors.
> 
> I don't know why it segfaults when compiled with optimizations.

It's quite interesting, it seems like a bug in gcc.

Please compile this with -O2 and -O2 -fno-gcse and check my sanity:

int main ()
{
  long winds = 0;

  while (winds != 0)
    {
      if (*(char *) winds)
        break;
    }

  if (winds == 0 || winds != 0 || *(char *) winds)
    abort ();
}

gcc version 2.95 19990728 (release)

Reply via email to