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



             Bug #: 56195

           Summary: Error: incorrect register `%rdi' used with `l' suffix

                    (at -O2)

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: tree-optimization

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: antoine.balest...@gmail.com





Using GCC 4.8.0 as of 20130203 :



$ xgcc -v

Using built-in specs.

COLLECT_GCC=/home/merkil/gcc/dist/bin/gcc

COLLECT_LTO_WRAPPER=/home/merkil/gcc/dist/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper

Target: x86_64-unknown-linux-gnu

Configured with: ../srcdir/configure CFLAGS='-O2 -pipe' CXXFLAGS='-O2 -pipe'

--enable-languages=c --prefix=/home/merkil/gcc/dist

Thread model: posix

gcc version 4.8.0 20130203 (experimental) (GCC) 



$ cat reg.c

int i, a, t, b, c, d, e, f, j, *h;



void fn(void)

{

    if(b)

    {

        int *p, *q;

        char g;



        if(f++)

            for(;; e++);

lbl:

        for(b = 0; b < 2; b++)

            t /= d + 1 ? : i || a < c < (d = f) ? : 1 | (j = 2);



        *p = g >= *q ^ c != a ^ *p;



        if(!e)

        {

            q = p;

            goto lbl;

        }

    }



    if(h++)

        goto lbl;

}



$ xgcc -O2 reg.c

{standard input}: Assembler messages:

{standard input}:112: Error: incorrect register `%rdi' used with `l' suffix

Reply via email to