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

             Bug #: 51042
           Summary: segfault
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: reg...@cs.utah.edu


Valgrind wasn't too helpful in narrowing this down, just says something generic
about a stack overflow.

[regehr@gamow tmp052]$ current-gcc -Ofast -w small.c

current-gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

[regehr@gamow tmp052]$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r181147-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r181147-install
--program-prefix=r181147- --enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20111108 (experimental) (GCC) 

[regehr@gamow tmp052]$ cat small.c 


int g_10;
int g_97;
int g_144;
int g_237;
int g_264[2][2];

int func_22 (p_25)
{
  for (; p_25;)
    {
      for (g_237 = 0; g_237 <= 1; g_237 = 1)
    if (g_264[g_144][g_10])
      break;
      for (g_97 = 0; g_97 <= 0; g_97 = 1)
    {
      g_264[g_144][g_10] = g_10;
      if (g_10)
        break;
    }
    }
  return 0;
}

Reply via email to