public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3
@ 2013-02-06 14:00 dnovillo at gcc dot gnu.org
  2013-02-06 14:36 ` [Bug rtl-optimization/56225] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2013-02-06 14:00 UTC (permalink / raw)
  To: gcc-bugs


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: unassigned@gcc.gnu.org
        ReportedBy: dnovillo@gcc.gnu.org
                CC: vmakarov@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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/56225] [4.8 Regression] ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3
  2013-02-06 14:00 [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3 dnovillo at gcc dot gnu.org
@ 2013-02-06 14:36 ` rguenth at gcc dot gnu.org
  2013-02-06 14:44 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-06 14:36 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ra
   Target Milestone|---                         |4.8.0
            Summary|ICE in lra-constraints.c    |[4.8 Regression] ICE in
                   |when executing the          |lra-constraints.c when
                   |testsuite with -m32         |executing the testsuite
                   |-march=pentium3             |with -m32 -march=pentium3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/56225] [4.8 Regression] ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3
  2013-02-06 14:00 [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3 dnovillo at gcc dot gnu.org
  2013-02-06 14:36 ` [Bug rtl-optimization/56225] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2013-02-06 14:44 ` jakub at gcc dot gnu.org
  2013-02-07 17:16 ` vmakarov at gcc dot gnu.org
  2013-02-07 17:52 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-06 14:44 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-06 14:43:33 UTC ---
Reduced testcase for -O2 -m32 -march=pentium3 -mtune=generic:
void bar (int);

void
foo (int x, int y)
{
  __attribute__ ((vector_size (8 * sizeof (short)))) short s0 = { x };
  bar ((short) (long) &s0 + y);
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/56225] [4.8 Regression] ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3
  2013-02-06 14:00 [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3 dnovillo at gcc dot gnu.org
  2013-02-06 14:36 ` [Bug rtl-optimization/56225] [4.8 Regression] " rguenth at gcc dot gnu.org
  2013-02-06 14:44 ` jakub at gcc dot gnu.org
@ 2013-02-07 17:16 ` vmakarov at gcc dot gnu.org
  2013-02-07 17:52 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-02-07 17:16 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2013-02-07 17:15:30 UTC ---
Author: vmakarov
Date: Thu Feb  7 17:15:02 2013
New Revision: 195856

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195856
Log:
2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/56225
    * lra-constraints.c (process_alt_operands): Check that reload hard
    reg can hold value for strict_low_part.

2013-02-07  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/56225
    * gcc.target/i386/pr56225.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr56225.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-constraints.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/56225] [4.8 Regression] ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3
  2013-02-06 14:00 [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3 dnovillo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-02-07 17:16 ` vmakarov at gcc dot gnu.org
@ 2013-02-07 17:52 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-07 17:52 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-07 17:51:35 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-07 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 14:00 [Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3 dnovillo at gcc dot gnu.org
2013-02-06 14:36 ` [Bug rtl-optimization/56225] [4.8 Regression] " rguenth at gcc dot gnu.org
2013-02-06 14:44 ` jakub at gcc dot gnu.org
2013-02-07 17:16 ` vmakarov at gcc dot gnu.org
2013-02-07 17:52 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).