public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27266]  New: syncronization primitives cause ICE with -march=pentium or better
@ 2006-04-23  9:55 rask at sygehus dot dk
  2006-04-23 14:46 ` [Bug c/27266] " rask at sygehus dot dk
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rask at sygehus dot dk @ 2006-04-23  9:55 UTC (permalink / raw)
  To: gcc-bugs

Mainline is ICE'ing on testsuite/gcc.c-torture/compile/sync-1.c for some
arguments to -march. For example:

./xgcc -B. -O2
/mnt/sysfs/rask/cvssrc/gcc/gcc/testsuite/gcc.c-torture/compile/sync-1.c -S -o
/tmp/sync-1.s -march=pentium
/mnt/sysfs/rask/cvssrc/gcc/gcc/testsuite/gcc.c-torture/compile/sync-1.c: In
function 'test_lock':
/mnt/sysfs/rask/cvssrc/gcc/gcc/testsuite/gcc.c-torture/compile/sync-1.c:261:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It works with: i386, i486, winchip-c6, winchip2 and c3.
It fails with: pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4,
nocona, prescott, k6, k6-2, k6-3, k8, athlon, opteron and c3-2.

The gcc-4.1.0-3 compiler shipped by Red Hat fails in the same way for the same
arguments to -march.


-- 
           Summary: syncronization primitives cause ICE with -march=pentium
                    or better
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rask at sygehus dot dk
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/27266] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
@ 2006-04-23 14:46 ` rask at sygehus dot dk
  2006-04-23 16:09 ` [Bug target/27266] [4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rask at sygehus dot dk @ 2006-04-23 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rask at sygehus dot dk  2006-04-23 14:46 -------
Created an attachment (id=11317)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11317&action=view)
Preprocessed source code


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
  2006-04-23 14:46 ` [Bug c/27266] " rask at sygehus dot dk
@ 2006-04-23 16:09 ` pinskia at gcc dot gnu dot org
  2006-04-23 16:10 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-23 16:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-04-23 16:09 -------
Note Redhat's 4.1.0 is closer to 4.2.0 than 4.1.0.

Anyways confirmed a regression in that it worked in 4.1.0.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.2.0
      Known to work|                            |4.1.0
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-23 16:09:17
               date|                            |
            Summary|syncronization primitives   |[4.2 Regression]
                   |cause ICE with -            |syncronization primitives
                   |march=pentium or better     |cause ICE with -
                   |                            |march=pentium or better
   Target Milestone|---                         |4.2.0


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
  2006-04-23 14:46 ` [Bug c/27266] " rask at sygehus dot dk
  2006-04-23 16:09 ` [Bug target/27266] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-04-23 16:10 ` pinskia at gcc dot gnu dot org
  2006-05-08  7:51 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-23 16:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-04-23 16:10 -------
Also here is the backtrace:
#0  split_di (operands=0xc0c768, num=0, lo_half=0x7fffff89ab58, 
    hi_half=0x7fffff89ab48)
    at /home/pinskia/src/newtest/trunk/gcc/config/i386/i386.c:8037
#1  0x00000000007ff0eb in ix86_expand_branch (code=<value optimized out>, 
    label=0x2aaaaae037d0)
    at /home/pinskia/src/newtest/trunk/gcc/config/i386/i386.c:10196
#2  0x00000000006c0ec6 in gen_bne (operand0=0x2aaaaae037d0) at i386.md:12951
#3  0x0000000000725a1b in expand_compare_and_swap_loop (mem=0x2aaaaafb3d20, 
    old_reg=0x2aaaaafb3d40, new_reg=0x2aaaaafb3f60, seq=<value optimized out>)
    at /home/pinskia/src/newtest/trunk/gcc/optabs.c:5960
#4  0x000000000072bfdc in expand_sync_operation (mem=0x2aaaaafb3d20, 
    val=<value optimized out>, code=AND)
    at /home/pinskia/src/newtest/trunk/gcc/optabs.c:6048
#5  0x0000000000533587 in expand_builtin (exp=0x2aaaaae03410, 
    target=0xafafafafafafafaf, subtarget=0x0, mode=12633960, ignore=13)
    at /home/pinskia/src/newtest/trunk/gcc/builtins.c:6279
#6  0x00000000005c37ae in expand_expr_real_1 (exp=<value optimized out>, 
    target=<value optimized out>, tmode=<value optimized out>, 
    modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /home/pinskia/src/newtest/trunk/gcc/expr.c:7584


This proves this is a target specific bug.


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (2 preceding siblings ...)
  2006-04-23 16:10 ` pinskia at gcc dot gnu dot org
@ 2006-05-08  7:51 ` pinskia at gcc dot gnu dot org
  2006-05-09 23:57 ` janis at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-08  7:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-05-08 07:51 -------
Janis could you do a regression hunt for this bug?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janis at gcc dot gnu dot org
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (3 preceding siblings ...)
  2006-05-08  7:51 ` pinskia at gcc dot gnu dot org
@ 2006-05-09 23:57 ` janis at gcc dot gnu dot org
  2006-05-20  8:01 ` kazu at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-05-09 23:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from janis at gcc dot gnu dot org  2006-05-09 23:57 -------
A regression hunt using an i686-linux cross compiler on powerpc-linux with the
testcase attached in comment #1 identified this large merge from gomp-branch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=108997

    r108997 | rth | 2005-12-23 00:43:34 +0000 (Fri, 23 Dec 2005)


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (4 preceding siblings ...)
  2006-05-09 23:57 ` janis at gcc dot gnu dot org
@ 2006-05-20  8:01 ` kazu at gcc dot gnu dot org
  2006-05-20  8:43 ` kazu at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-20  8:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from kazu at gcc dot gnu dot org  2006-05-20 08:00 -------
Reduced down to:

signed long long sll;

void
foo (void)
{
  __sync_fetch_and_add (&sll, 1);
}


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (5 preceding siblings ...)
  2006-05-20  8:01 ` kazu at gcc dot gnu dot org
@ 2006-05-20  8:43 ` kazu at gcc dot gnu dot org
  2006-05-20 19:41 ` kazu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-20  8:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

kazu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |kazu at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (6 preceding siblings ...)
  2006-05-20  8:43 ` kazu at gcc dot gnu dot org
@ 2006-05-20 19:41 ` kazu at gcc dot gnu dot org
  2006-05-22 17:38 ` rth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-20 19:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from kazu at gcc dot gnu dot org  2006-05-20 19:40 -------
Posted a patch.


-- 

kazu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2006-
                   |                            |05/msg01033.html


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (7 preceding siblings ...)
  2006-05-20 19:41 ` kazu at gcc dot gnu dot org
@ 2006-05-22 17:38 ` rth at gcc dot gnu dot org
  2006-05-22 17:56 ` kazu at gcc dot gnu dot org
  2006-05-22 17:56 ` kazu at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rth at gcc dot gnu dot org @ 2006-05-22 17:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rth at gcc dot gnu dot org  2006-05-22 17:38 -------
Subject: Re:  [4.2 Regression] syncronization primitives cause ICE with
-march=pentium or better

On Sat, May 20, 2006 at 07:40:33PM -0000, kazu at gcc dot gnu dot org wrote:
> Posted a patch.

Patch ok.


r~


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (9 preceding siblings ...)
  2006-05-22 17:56 ` kazu at gcc dot gnu dot org
@ 2006-05-22 17:56 ` kazu at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-22 17:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from kazu at gcc dot gnu dot org  2006-05-22 17:56 -------
Subject: Bug 27266

Author: kazu
Date: Mon May 22 17:55:53 2006
New Revision: 113987

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113987
Log:
gcc/
        PR target/27266
        * config/i386/i386.c (ix86_expand_branch): Jump to simple if
        ix86_compare_emitted is non-NULL.

gcc/testsuite/
        PR target/27266
        * gcc.target/i386/pr27266.c: New.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr27266.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/27266] [4.2 Regression] syncronization primitives cause ICE with -march=pentium or better
  2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
                   ` (8 preceding siblings ...)
  2006-05-22 17:38 ` rth at gcc dot gnu dot org
@ 2006-05-22 17:56 ` kazu at gcc dot gnu dot org
  2006-05-22 17:56 ` kazu at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-22 17:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from kazu at gcc dot gnu dot org  2006-05-22 17:56 -------
Checked in a patch.


-- 

kazu at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-05-22 17:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-23  9:55 [Bug c/27266] New: syncronization primitives cause ICE with -march=pentium or better rask at sygehus dot dk
2006-04-23 14:46 ` [Bug c/27266] " rask at sygehus dot dk
2006-04-23 16:09 ` [Bug target/27266] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-04-23 16:10 ` pinskia at gcc dot gnu dot org
2006-05-08  7:51 ` pinskia at gcc dot gnu dot org
2006-05-09 23:57 ` janis at gcc dot gnu dot org
2006-05-20  8:01 ` kazu at gcc dot gnu dot org
2006-05-20  8:43 ` kazu at gcc dot gnu dot org
2006-05-20 19:41 ` kazu at gcc dot gnu dot org
2006-05-22 17:38 ` rth at gcc dot gnu dot org
2006-05-22 17:56 ` kazu at gcc dot gnu dot org
2006-05-22 17:56 ` kazu at gcc dot gnu dot 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).