public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45292]  New: [4.5/4.6 regression] libgomp test failures for i586-linux
@ 2010-08-15 22:50 hjl dot tools at gmail dot com
  2010-08-15 22:51 ` [Bug middle-end/45292] " hjl dot tools at gmail dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-15 22:50 UTC (permalink / raw)
  To: gcc-bugs

When configured for i586-linux, there are extra
libgomp test failures:

FAIL: libgomp.c/nqueens-1.c execution test
FAIL: libgomp.c/pr39591-1.c execution test
FAIL: libgomp.c/pr39591-2.c execution test
FAIL: libgomp.c/sort-1.c execution test
FAIL: libgomp.c/task-2.c execution test
FAIL: libgomp.c/task-3.c execution test

Gcc 4.4.4 works fine.


-- 
           Summary: [4.5/4.6 regression] libgomp test failures for i586-
                    linux
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
@ 2010-08-15 22:51 ` hjl dot tools at gmail dot com
  2010-08-16  1:13 ` hjl dot tools at gmail dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-15 22:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.5.3 4.6.0
      Known to work|                            |4.4.4
   Target Milestone|---                         |4.5.3


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
  2010-08-15 22:51 ` [Bug middle-end/45292] " hjl dot tools at gmail dot com
@ 2010-08-16  1:13 ` hjl dot tools at gmail dot com
  2010-08-16  1:19 ` hjl dot tools at gmail dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  1:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-08-16 01:13 -------
It is caused by revision 145825:

http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg00448.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
  2010-08-15 22:51 ` [Bug middle-end/45292] " hjl dot tools at gmail dot com
  2010-08-16  1:13 ` hjl dot tools at gmail dot com
@ 2010-08-16  1:19 ` hjl dot tools at gmail dot com
  2010-08-16  2:29 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  1:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2010-08-16 01:18 -------
libgomp is miscompiled.


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-08-16  1:19 ` hjl dot tools at gmail dot com
@ 2010-08-16  2:29 ` hjl dot tools at gmail dot com
  2010-08-16  2:52 ` hjl dot tools at gmail dot com
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  2:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-08-16 02:29 -------
task.o is miscompiled.


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-08-16  2:29 ` hjl dot tools at gmail dot com
@ 2010-08-16  2:52 ` hjl dot tools at gmail dot com
  2010-08-16  5:05 ` hjl dot tools at gmail dot com
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  2:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2010-08-16 02:52 -------
gomp_barrier_handle_tasks is miscompiled.


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2010-08-16  2:52 ` hjl dot tools at gmail dot com
@ 2010-08-16  5:05 ` hjl dot tools at gmail dot com
  2010-08-16  5:19 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  5:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-08-16 05:04 -------
Disable

+(define_expand "cmpcc"
+  [(set (reg:CC FLAGS_REG)
+        (compare:CC (match_operand 0 "flags_reg_operand" "")
+                    (match_operand 1 "general_operand" "")))]
+  ""
+{
+  ix86_compare_op0 = operands[0];
+  ix86_compare_op1 = operands[1];
+  DONE;
+})

fixed miscompilation. 


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2010-08-16  5:05 ` hjl dot tools at gmail dot com
@ 2010-08-16  5:19 ` hjl dot tools at gmail dot com
  2010-08-16  7:56 ` bonzini at gnu dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16  5:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl dot tools at gmail dot com  2010-08-16 05:18 -------
-mtune=i586 miscompiled gomp_barrier_handle_tasks which
has a loop and calls:

static inline void gomp_mutex_lock (gomp_mutex_t *mutex)
{
  if (!__sync_bool_compare_and_swap (mutex, 0, 1))
    gomp_mutex_lock_slow (mutex);
}

setcc was moved out of loop. But for multi-thread
applications, __sync_bool_compare_and_swap may change
CC even if current thread doesn't change anything.


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2010-08-16  5:19 ` hjl dot tools at gmail dot com
@ 2010-08-16  7:56 ` bonzini at gnu dot org
  2010-08-16 13:20 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2010-08-16  7:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bonzini at gnu dot org  2010-08-16 07:56 -------
H.J., thanks very much for the analysis!

Can you please attach preprocessed source code and the output of "gcc -###"
when compiling this file using the compiler options you need to show this bug?


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bonzini at gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-08-16 07:56:20
               date|                            |


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2010-08-16  7:56 ` bonzini at gnu dot org
@ 2010-08-16 13:20 ` hjl dot tools at gmail dot com
  2010-08-16 13:29 ` bonzini at gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-16 13:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl dot tools at gmail dot com  2010-08-16 13:19 -------
Created an attachment (id=21490)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21490&action=view)
The preprocessed source

It should be compiled with

-march=i486 -ftls-model=initial-exec -mtune=i586 -O2 -fPIC

The bad assembly has

        lock cmpxchgl   %edx, (%ecx)
        je      .L2 
        subl    $12, %esp
        pushl   %ecx
        call    gomp_mutex_lock_slow
        addl    $16, %esp
.L2:
        testl   $1, %esi
        je      .L3
        movl    1224(%edi), %eax
        testl   %eax, %eax
        je      .L21
        movl    68(%edi), %edx
        orl     $2, %edx
        movl    %edx, 68(%edi)
.L3:
        movl    %esi, %eax
        sete    -33(%ebp)
...
        lock cmpxchgl   %edx, (%ecx)
        addl    $16, %esp
        cmpb    $0, -33(%ebp)


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (8 preceding siblings ...)
  2010-08-16 13:20 ` hjl dot tools at gmail dot com
@ 2010-08-16 13:29 ` bonzini at gnu dot org
  2010-08-16 13:49 ` bonzini at gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2010-08-16 13:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bonzini at gnu dot org  2010-08-16 13:29 -------
The bug seems to be that an instruction clobbering the flags is inserted after
the unspec.

  140 {r127:SI=[r62:SI];[r62:SI]=unspec/v[[r62:SI],r128:SI,r129:SI]
11;flags:CCZ=cmp(unspec/v[[r62:SI],r128:SI,r129:SI] 11,r128:SI);}
  141 {sp:SI=sp:SI+0x10;clobber flags:CC;}
  142 r130:QI=flags:CCZ==0


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (9 preceding siblings ...)
  2010-08-16 13:29 ` bonzini at gnu dot org
@ 2010-08-16 13:49 ` bonzini at gnu dot org
  2010-08-18 13:36 ` hjl at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2010-08-16 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bonzini at gnu dot org  2010-08-16 13:48 -------
Created an attachment (id=21491)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21491&action=view)
patch to fix the bug

This is the patch to fix the bug.  I'll bootstrap/regtest it soon.

Thanks H.J. for helping tracking the problem!


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (10 preceding siblings ...)
  2010-08-16 13:49 ` bonzini at gnu dot org
@ 2010-08-18 13:36 ` hjl at gcc dot gnu dot org
  2010-08-18 21:08 ` hjl at gcc dot gnu dot org
  2010-08-18 23:08 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2010-08-18 13:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hjl at gcc dot gnu dot org  2010-08-18 13:36 -------
Subject: Bug 45292

Author: hjl
Date: Wed Aug 18 13:35:46 2010
New Revision: 163339

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163339
Log:
Expand pending pops before trying the optab.

2010-08-18  Paolo Bonzini  <bonzini@gnu.org>

        PR middle-end/45292
        * optabs.c (expand_bool_compare_and_swap): Expand pending
        pops before trying the optab.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optabs.c


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (11 preceding siblings ...)
  2010-08-18 13:36 ` hjl at gcc dot gnu dot org
@ 2010-08-18 21:08 ` hjl at gcc dot gnu dot org
  2010-08-18 23:08 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2010-08-18 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from hjl at gcc dot gnu dot org  2010-08-18 21:08 -------
Subject: Bug 45292

Author: hjl
Date: Wed Aug 18 21:08:24 2010
New Revision: 163353

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163353
Log:
Expand pending pops before trying the optab.

2010-08-18  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline
        2010-08-18  Paolo Bonzini  <bonzini@gnu.org>

        PR middle-end/45292
        * optabs.c (expand_bool_compare_and_swap): Expand pending
        pops before trying the optab.

Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/optabs.c


-- 


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
  2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
                   ` (12 preceding siblings ...)
  2010-08-18 21:08 ` hjl at gcc dot gnu dot org
@ 2010-08-18 23:08 ` hjl dot tools at gmail dot com
  13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-18 23:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hjl dot tools at gmail dot com  2010-08-18 23:08 -------
Fixed.


-- 

hjl dot tools at gmail dot com changed:

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


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


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

* [Bug middle-end/45292] [4.5/4.6 regression] libgomp test failures for i586-linux
       [not found] <bug-45292-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-27 17:31 ` jakub at gcc dot gnu.org
  0 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-27 17:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |us15 at os dot
                   |                            |inf.tu-dresden.de

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-27 17:28:19 UTC ---
*** Bug 46682 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2010-11-27 17:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-15 22:50 [Bug middle-end/45292] New: [4.5/4.6 regression] libgomp test failures for i586-linux hjl dot tools at gmail dot com
2010-08-15 22:51 ` [Bug middle-end/45292] " hjl dot tools at gmail dot com
2010-08-16  1:13 ` hjl dot tools at gmail dot com
2010-08-16  1:19 ` hjl dot tools at gmail dot com
2010-08-16  2:29 ` hjl dot tools at gmail dot com
2010-08-16  2:52 ` hjl dot tools at gmail dot com
2010-08-16  5:05 ` hjl dot tools at gmail dot com
2010-08-16  5:19 ` hjl dot tools at gmail dot com
2010-08-16  7:56 ` bonzini at gnu dot org
2010-08-16 13:20 ` hjl dot tools at gmail dot com
2010-08-16 13:29 ` bonzini at gnu dot org
2010-08-16 13:49 ` bonzini at gnu dot org
2010-08-18 13:36 ` hjl at gcc dot gnu dot org
2010-08-18 21:08 ` hjl at gcc dot gnu dot org
2010-08-18 23:08 ` hjl dot tools at gmail dot com
     [not found] <bug-45292-4@http.gcc.gnu.org/bugzilla/>
2010-11-27 17:31 ` 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).