public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
@ 2014-11-15 20:24 fxcoudert at gcc dot gnu.org
  2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-15 20:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

            Bug ID: 63897
           Summary: [5.0 regression] gcc.dg/torture/vector-2.c fails at on
                    x86_64-apple-darwin14
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org

Created attachment 33987
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33987&action=edit
Assembler generated by "gcc -msse vector-2.c -O1 -m32 -S"

gcc.dg/torture/vector-2.c currently fails on trunk, when compiled with "-msse
vector-2.c -O1 -m32". Here is a minimal reproducer:

----------------------------
#define vector __attribute__((vector_size(16) ))

vector int f0(vector int t)
{
 ((int*)&t)[0] = 1;
 return t;
}
vector int f1(vector int t)
{
 ((int*)&t)[1] = 1;
 return t;
}

int main(void)
{
  vector int a = {0, 0, 0, 0};
  vector int b = {1, 0, 0, 0};
  vector int c = {0, 1, 0, 0};
  vector int a0 = f0(a);
  if (__builtin_memcmp (&a0, &b, sizeof(a0)))
    __builtin_abort ();
  a0 = f1(a);
  if (__builtin_memcmp (&a0, &c, sizeof(a0)))
    __builtin_abort ();
  return 0;
}
----------------------------


When compiled with "gcc -msse vector-2.c -O1 -m32", this segfaults at runtime.
The backtrace is:

* thread #1: tid = 0xdc2a68, 0x00001ea9 a.out`main + 81, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xb0)
    frame #0: 0x00001ea9 a.out`main + 81
a.out`main + 81:
-> 0x1ea9:  movd   0xb0(%eax), %xmm0
   0x1eb1:  pshufd $-0x1f, %xmm0, %xmm0
   0x1eb6:  movaps %xmm0, 0x10(%esp)
   0x1ebb:  subl   $0x4, %esp

The assembler generated is attached.


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
@ 2014-11-15 20:25 ` fxcoudert at gcc dot gnu.org
  2014-11-15 21:01 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-15 20:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Target|                            |x86_64-apple-darwin14
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-15
               Host|                            |x86_64-apple-darwin14
     Ever confirmed|0                           |1
              Build|                            |x86_64-apple-darwin14


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
  2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
@ 2014-11-15 21:01 ` dominiq at lps dot ens.fr
  2014-11-15 21:06 ` fxcoudert at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-15 21:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I don't see it on my builds.

[Book15] f90/bug% gcc410 -msse -O1 -m32
/opt/gcc/work/gcc/testsuite/gcc.dg/torture/vector-2.c
[Book15] f90/bug% a.out 
[Book15] f90/bug% gcc410 -msse -O1 -m32 pr63897.c
[Book15] f90/bug% a.out 
[Book15] f90/bug% gcc410 -v
Using built-in specs.
COLLECT_GCC=gcc410
COLLECT_LTO_WRAPPER=/opt/gcc/gcc4.10w/libexec/gcc/x86_64-apple-darwin14.0.0/5.0.0/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../work/configure --prefix=/opt/gcc/gcc4.10w
--enable-languages=c,c++,fortran,objc,obj-c++,ada,java,lto --with-gmp=/opt/mp
--with-system-zlib --with-isl=/opt/mp --enable-lto --enable-plugin
--with-arch=corei7 --with-cpu=corei7
Thread model: posix
gcc version 5.0.0 20141115 (experimental) [trunk revision 217602p25] (GCC)


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
  2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
  2014-11-15 21:01 ` dominiq at lps dot ens.fr
@ 2014-11-15 21:06 ` fxcoudert at gcc dot gnu.org
  2014-11-15 22:03 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-15 21:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #1)
> Configured with: ../work/configure --prefix=/opt/gcc/gcc4.10w
> --enable-languages=c,c++,fortran,objc,obj-c++,ada,java,lto
> --with-gmp=/opt/mp --with-system-zlib --with-isl=/opt/mp --enable-lto
> --enable-plugin --with-arch=corei7 --with-cpu=corei7

Apparently, it's because you configure --with-arch=corei7. If I compile with
-march=corei7, it generates good code (well, it doesn't segfault, at least).
Try compiling with -march=core2, you should see it.


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-11-15 21:06 ` fxcoudert at gcc dot gnu.org
@ 2014-11-15 22:03 ` dominiq at lps dot ens.fr
  2014-11-15 23:03 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-15 22:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Try compiling with -march=core2, you should see it.

Confirmed.


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-11-15 22:03 ` dominiq at lps dot ens.fr
@ 2014-11-15 23:03 ` dominiq at lps dot ens.fr
  2014-11-17  9:13 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-15 23:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This due to r216154.


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-11-15 23:03 ` dominiq at lps dot ens.fr
@ 2014-11-17  9:13 ` rguenth at gcc dot gnu.org
  2014-11-17 12:51 ` izamyatin at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-17  9:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |5.0


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-11-17  9:13 ` rguenth at gcc dot gnu.org
@ 2014-11-17 12:51 ` izamyatin at gmail dot com
  2014-11-20 15:32 ` vmakarov at gcc dot gnu.org
  2014-11-21 21:30 ` vmakarov at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: izamyatin at gmail dot com @ 2014-11-17 12:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

--- Comment #6 from Igor Zamyatin <izamyatin at gmail dot com> ---
after RA=after reload


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-11-17 12:51 ` izamyatin at gmail dot com
@ 2014-11-20 15:32 ` vmakarov at gcc dot gnu.org
  2014-11-21 21:30 ` vmakarov at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-11-20 15:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

Vladimir Makarov <vmakarov at gcc dot gnu.org> changed:

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

--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
I've reproduced this bug too.  The problem is that although global live info
was updated, other important information (like hard registers conflicts, calls
crossed, live ranges) was not.  It needs to rerun live range again after
changing global live info.

I am working on it.  It needs some time, especially when some solutions would
have a big impact on compiler time.  I hope the fix will be ready on Friday (if
I am very lucky) or at the beginning of the next week.


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

* [Bug target/63897] [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14
  2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-11-20 15:32 ` vmakarov at gcc dot gnu.org
@ 2014-11-21 21:30 ` vmakarov at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-11-21 21:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63897

--- Comment #8 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Fri Nov 21 21:29:54 2014
New Revision: 217947

URL: https://gcc.gnu.org/viewcvs?rev=217947&root=gcc&view=rev
Log:
2014-11-21  Vladimir Makarov  <vmakarov@redhat.com>

    PR target/63897
    * lra-lives.c (mark_regno_live, mark_regno_dead): Remove last
    argument.
    (process_bb_lives): Rename dead_insn_p on remove_p
    and global_live_info_p on dead_insn_p.  Calculate local live info
    unconditionally.  Remove last argument in calls mark_regno_live and
    mark_regno_dead.  Reorganize body of EXECUTE_IF_SET_IN_BITMAP.
    (lra_create_live_ranges): Rename to lra_create_live_ranges_1.
    Return bool.  Rename global_live_info_p on dead_insn_p.  Return
    flag of live info change.
    (lra_create_live_ranges): New.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-lives.c


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

end of thread, other threads:[~2014-11-21 21:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-15 20:24 [Bug target/63897] New: [5.0 regression] gcc.dg/torture/vector-2.c fails at on x86_64-apple-darwin14 fxcoudert at gcc dot gnu.org
2014-11-15 20:25 ` [Bug target/63897] " fxcoudert at gcc dot gnu.org
2014-11-15 21:01 ` dominiq at lps dot ens.fr
2014-11-15 21:06 ` fxcoudert at gcc dot gnu.org
2014-11-15 22:03 ` dominiq at lps dot ens.fr
2014-11-15 23:03 ` dominiq at lps dot ens.fr
2014-11-17  9:13 ` rguenth at gcc dot gnu.org
2014-11-17 12:51 ` izamyatin at gmail dot com
2014-11-20 15:32 ` vmakarov at gcc dot gnu.org
2014-11-21 21:30 ` vmakarov 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).