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

             Bug #: 52092
           Summary: ICE: internal consistency failure
    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
                CC: cheny...@cs.utah.edu
              Host: x86_64-unknown-linux-gnu
            Target: x86_64-unknown-linux-gnu
             Build: x86_64-unknown-linux-gnu


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

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r183824-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-r183824-install
--program-prefix=r183824- --enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20120202 (experimental) (GCC) 

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

small.c: In function 'fn16':
small.c:37:1: error: invalid rtl sharing found in the insn
(insn 125 124 126 25 (parallel [
            (set (reg:QI 75)
                (plus:QI (reg:QI 74)
                    (subreg:QI (reg:SI 67 [ D.1765 ]) 0)))
            (clobber (reg:CC 17 flags))
        ]) -1
     (nil))
small.c:37:1: error: shared rtx
(subreg:QI (reg:SI 67 [ D.1765 ]) 0)
small.c:37:1: internal compiler error: internal consistency failure
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

[regehr@gamow tmp]$ cat small.c

int a,b,c,d,e,f,g;

int fn4 ()
{
  c = d || a;
  return c ? a : b;
}

char fn6 (int p1, int p2)
{
  return p1 * p2;
}

int fn9 ()
{
  return e;
}

void fn16 ()
{
  for (;;)
    {
      int *h = 0;
      int i = 3;
      int **j = &h;
      if (fn9 ())
    {
      g = fn4 ();
      if (fn6 (i, g))
        {
          h = &f;
          *h = 0;
        }
      **j = 0;
    }
    }
}

Reply via email to