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



             Bug #: 56225

           Summary: ICE in lra-constraints.c when executing the testsuite

                    with -m32 -march=pentium3

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: rtl-optimization

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

        ReportedBy: dnovi...@gcc.gnu.org

                CC: vmaka...@redhat.com

            Target: x86_64-unknown-linux-gnu





I'm getting several failures when running the testsuite with -m32

-march=pentium3.  They all seem related.  I've taken this one from

gcc.c-torture/execute/scal-to-vec2.c



$ cat scal-to-vec2.i

long __attribute__ ((noinline)) vlng () { return (long)42; }

int __attribute__ ((noinline)) vint () { return (int) 43; }

short __attribute__ ((noinline)) vsrt () { return (short)42; }

char __attribute__ ((noinline)) vchr () { return (char)42; }





int main (int argc, char *argv[]) {

    __attribute__((vector_size((16)*sizeof(char)))) char c0 = {argc,

1,2,3,4,5,6,7, argc, 1,2,3,4,5,6,7};

    __attribute__((vector_size((16)*sizeof(char)))) char c1;



    __attribute__((vector_size((8)*sizeof(short)))) short s0 = {argc,

1,2,3,4,5,6,7};

    __attribute__((vector_size((8)*sizeof(short)))) short s1;



    __attribute__((vector_size((4)*sizeof(int)))) int i0 = {argc, 1, 2, 3};

    __attribute__((vector_size((4)*sizeof(int)))) int i1;



    __attribute__((vector_size((2)*sizeof(long)))) long l0 = {argc, 1};

    __attribute__((vector_size((2)*sizeof(long)))) long l1;



    c1 = vchr() + c0; do { int __i; for (__i = 0; __i < 16; __i++) { if

((*((char *) &(c1) + __i)) != (vchr() + (*((char *) &(c0) + __i))))

__builtin_abort (); }} while (0);



    s1 = vsrt() + s0; do { int __i; for (__i = 0; __i < 8; __i++) { if

((*((short *) &(s1) + __i)) != (vsrt() + (*((short *) &(s0) + __i))))

__builtin_abort (); }} while (0);

    s1 = vchr() + s0; do { int __i; for (__i = 0; __i < 8; __i++) { if

((*((short *) &(s1) + __i)) != (vchr() + (*((short *) &(s0) + __i))))

__builtin_abort (); }} while (0);



    i1 = vint() * i0; do { int __i; for (__i = 0; __i < 4; __i++) { if ((*((int

*) &(i1) + __i)) != (vint() * (*((int *) &(i0) + __i)))) __builtin_abort (); }}

while (0);

    i1 = vsrt() * i0; do { int __i; for (__i = 0; __i < 4; __i++) { if ((*((int

*) &(i1) + __i)) != (vsrt() * (*((int *) &(i0) + __i)))) __builtin_abort (); }}

while (0);

    i1 = vchr() * i0; do { int __i; for (__i = 0; __i < 4; __i++) { if ((*((int

*) &(i1) + __i)) != (vchr() * (*((int *) &(i0) + __i)))) __builtin_abort (); }}

while (0);



    l1 = vlng() * l0; do { int __i; for (__i = 0; __i < 2; __i++) { if

((*((long *) &(l1) + __i)) != (vlng() * (*((long *) &(l0) + __i))))

__builtin_abort (); }} while (0);

    l1 = vint() * l0; do { int __i; for (__i = 0; __i < 2; __i++) { if

((*((long *) &(l1) + __i)) != (vint() * (*((long *) &(l0) + __i))))

__builtin_abort (); }} while (0);

    l1 = vsrt() * l0; do { int __i; for (__i = 0; __i < 2; __i++) { if

((*((long *) &(l1) + __i)) != (vsrt() * (*((long *) &(l0) + __i))))

__builtin_abort (); }} while (0);

    l1 = vchr() * l0; do { int __i; for (__i = 0; __i < 2; __i++) { if

((*((long *) &(l1) + __i)) != (vchr() * (*((long *) &(l0) + __i))))

__builtin_abort (); }} while (0);



    return 0;

}



When compiled with -m32, it works fine:

$ ../cc1 -fpreprocessed scal-to-vec2.i -quiet -dumpbase scal-to-vec2.c

-mtune=generic -auxbase scal-to-vec2 -O1 -w -version

-fno-diagnostics-show-caret -o scal-to-vec2.s -quiet -m32

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

        compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

        compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Compiler executable checksum: 261028b85770ed5f451425c66cb11710



But when compiled with -m32 -march=pentium3, it fails with:

$ ../cc1 -fpreprocessed scal-to-vec2.i -quiet -dumpbase scal-to-vec2.c

-mtune=generic -auxbase scal-to-vec2 -O1 -w -version

-fno-diagnostics-show-caret -o scal-to-vec2.s -quiet -m32 -march=pentium3

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

        compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

        compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Compiler executable checksum: 261028b85770ed5f451425c66cb11710

scal-to-vec2.i: In function 'main':

scal-to-vec2.i:35:1: internal compiler error: Max. number of generated reload

insns per insn is achieved (90)



0x7fc437 lra_constraints(bool)

        gcc/lra-constraints.c:3481

0x7ef18e lra(_IO_FILE*)

        gcc/lra.c:2279

0x7b74b8 do_reload

        gcc/ira.c:4623

0x7b74b8 rest_of_handle_reload

        gcc/ira.c:4736



Please disregard the version string 4.8.x-google-integration.  This branch is a

pure copy of trunk (with some configuration patches but no changes to the

compiler).  This also reproduces in vanilla trunk.

Reply via email to