This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault
- From: "belyshev at depni dot sinp dot msu dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2007 18:43:34 -0000
- Subject: [Bug bootstrap/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault
- References: <bug-33676-231@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from belyshev at depni dot sinp dot msu dot ru 2007-10-09 18:43 -------
// Small testcase, compile with "-march=i586 -O0 -fomit-frame-pointer":
__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
{
__builtin_abort ();
}
__attribute__((noinline)) int f (int k)
{
return k;
}
__attribute__((noinline)) int g (int t, int k)
{
int b;
switch (t)
{
case 0:
abrt (__FILE__, __FUNCTION__);
case 1:
b = f (k);
break;
case 2:
b = f (k);
break;
case 3:
b = f (k);
break;
case 4:
b = f (k);
break;
default:
abrt (__FILE__, __FUNCTION__);
}
return b;
}
int main (void)
{
if (g (3, 1337) != 1337)
abrt (__FILE__, __FUNCTION__);
return 0;
}
// Fails only with -fomit-frame-pointer and with -march <= i586.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33676