public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
@ 2015-06-22 14:24 kyukhin at gcc dot gnu.org
  2015-06-23 20:50 ` [Bug target/66626] " ubizjak at gmail dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2015-06-22 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66626
           Summary: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c
                    segfaults w/ -mregparm=3
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kyukhin at gcc dot gnu.org
  Target Milestone: ---

Currently, main trunk produces wrong code.
I suspect target (but not sure).

Reproduce:
$ gcc/xgcc -Bgcc
../../git/gcc3/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c -O1
-mregparm=3 -m32
$ ./a.out
Segmentation fault (core dumped)


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

* [Bug target/66626] [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
@ 2015-06-23 20:50 ` ubizjak at gmail dot com
  2015-06-23 21:35 ` ubizjak at gmail dot com
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-06-23 20:50 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|uros at gcc dot gnu.org            |ubizjak at gmail dot com

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
A better testcase:

--cut here--
extern void abort (void);

int s (int i, int j, int k, int l)
{
  __label__ l1;
  int f (int i, int j, int k, int l)
  {
    if (i + j + k + l == 10)
      goto l1;
    return 0;
  }
  return f (i, j, k, l);
 l1:;
  return 1;
}

int main ()
{
  if (s (1, 2, 3, 4) != 1)
    abort ();

  return 0;
}
--cut here--

Nested function "f" compiles with "-O2 -m32 -mregparm=3" to:

f.1491:
        pushl   %esi
        pushl   %ebp
        addl    %eax, %edx
        addl    %edx, %ecx
        movl    %esp, %ebp
        addl    12(%ebp), %ecx
        cmpl    $10, %ecx
        je      .L6
        leave
        xorl    %eax, %eax
        addl    $4, %esp
        ret
.L6:
        movl    4(%ebp), %edx
        movl    $.L3, %eax
        movl    (%edx), %ebp
        movl    4(%ebp), %edx  <----!!
        movl    4(%edx), %esp
        jmp     *%eax

The marked insn leads to corrupted %esp, since it is restored from invalid
location. When the insn is removed, the testcase runs without problems.
>From gcc-bugs-return-490016-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 21:13:36 2015
Return-Path: <gcc-bugs-return-490016-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5247 invoked by alias); 23 Jun 2015 21:13:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 5202 invoked by uid 48); 23 Jun 2015 21:13:32 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66626] [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
Date: Tue, 23 Jun 2015 21:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66626-4-sL7U05SHhU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02348.txt.bz2
Content-length: 252

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

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #2)
> A better testcase:

Nope. This one works OK. The testcase from Comment #1 fails.
>From gcc-bugs-return-490017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 21:21:56 2015
Return-Path: <gcc-bugs-return-490017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13161 invoked by alias); 23 Jun 2015 21:21:56 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 13063 invoked by uid 48); 23 Jun 2015 21:21:52 -0000
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu
Date: Tue, 23 Jun 2015 21:21:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kkojima at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66563-4-5heLpzIyCY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66563-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66563-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02349.txt.bz2
Content-length: 845

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf563

--- Comment #32 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #31)

Yes, your insn_and_split is quite same with the one I've tried first
and it resolved this case too.  The volatile will work of cause.
The CSE in problem was done by IRA, not by CSE pass, though.  Then
I'm curious about how other targets handle the issue and found that
some targets like arm differentiate GOT sequences for the different
constant pool with the similar counter.
I like it because it seems that differentiated RTLs fix the root
cause of the issue, even though such CSE won't be done after reload.
I've just done the usual tests for trunk and will apply it on trunk.
Unfortunately 4.9 is now frozen for 4.9.3 release.  I'll backport
the patch to 4.9 when it reopens.


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

* [Bug target/66626] [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
  2015-06-23 20:50 ` [Bug target/66626] " ubizjak at gmail dot com
@ 2015-06-23 21:35 ` ubizjak at gmail dot com
  2015-06-30 11:04 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] " rguenth at gcc dot gnu.org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-06-23 21:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #3)
> The testcase from Comment #1 fails.

Got it. LRA miscompiles "f".

Function "f" of the testcase from Comment #1 compiles (-O2 -m32 -mregparm=3)
to:

f.1485:
        cmpl    $2, %eax
        je      .L6
        xorl    %eax, %eax
        ret
.L6:
        pushl   %esi
        movl    $.L3, %eax
        pushl   %ebp
        movl    %esp, %ebp
(32)    movl    4(%ebp), %edx
(14)    movl    (%edx), %ebp
(33)    movl    4(%ebp), %ecx
(17)    movl    4(%ecx), %esp
        jmp     *%eax

In the above asm, (insn 14) clobbers %ebp, which is used as temporary in (insn
32) and (insn 33).

In _.ira dump, we have:

(insn 3 2 4 2 (set (reg/f:SI 90 [ CHAIN.1 ])
        (mem/c:SI (plus:SI (reg/f:SI 16 argp)
                (const_int -8 [0xfffffffffffffff8])) [3  S4 A8])) t.c:7 90
{*movsi_internal}
     (expr_list:REG_EQUIV (mem/c:SI (plus:SI (reg/f:SI 16 argp)
                (const_int -8 [0xfffffffffffffff8])) [3  S4 A8])
        (nil)))

[...]

(insn 14 13 15 3 (set (reg/f:SI 6 bp)
        (mem:SI (reg/f:SI 90 [ CHAIN.1 ]) [0  S4 A8])) t.c:9 90
{*movsi_internal}
     (nil))

[...]

(insn 17 16 18 3 (set (reg/f:SI 7 sp)
        (mem:SI (plus:SI (reg/f:SI 90 [ CHAIN.1 ])
                (const_int 4 [0x4])) [0  S4 A8])) t.c:9 90 {*movsi_internal}
     (expr_list:REG_DEAD (reg/f:SI 90 [ CHAIN.1 ])
        (nil)))


LRA copies (insn 3) just before (insn 14) and (insn 17), eliminating argp on
the fly to HARD_FRAME_POINTER (= %ebp). Following sequence is generated:

(insn 32 13 14 3 (set (reg:SI 1 dx [94])
        (mem/c:SI (plus:SI (reg/f:SI 6 bp)
                (const_int 4 [0x4])) [3  S4 A8])) t.c:9 90 {*movsi_internal}
     (nil))
(insn 14 32 15 3 (set (reg/f:SI 6 bp)
        (mem:SI (reg:SI 1 dx [94]) [0  S4 A8])) t.c:9 90 {*movsi_internal}
     (nil))

[...]

(insn 33 16 17 3 (set (reg:SI 2 cx [95])
        (mem/c:SI (plus:SI (reg/f:SI 6 bp)
                (const_int 4 [0x4])) [3  S4 A8])) t.c:9 90 {*movsi_internal}
     (nil))
(insn 17 33 18 3 (set (reg/f:SI 7 sp)
        (mem:SI (plus:SI (reg:SI 2 cx [95])
                (const_int 4 [0x4])) [0  S4 A8])) t.c:9 90 {*movsi_internal}
     (nil))

LRA doesn't notice that (insn 14) clobbers propagated argp (= %ebp) value, used
in (insn 33). Indeed, fixing the asm to use %edx temporary from (insn 32):

.L6:
        pushl   %esi
        movl    $.L3, %eax
        pushl   %ebp
        movl    %esp, %ebp
(32)    movl    4(%ebp), %edx
(14)    movl    (%edx), %ebp
(17)    movl    4(%edx), %esp
        jmp     *%eax

fixes the testcase.
>From gcc-bugs-return-490020-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 21:38:31 2015
Return-Path: <gcc-bugs-return-490020-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 101598 invoked by alias); 23 Jun 2015 21:38:30 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 101537 invoked by uid 48); 23 Jun 2015 21:38:26 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66626] [i4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
Date: Tue, 23 Jun 2015 21:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: ra
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords cf_gcctarget cc component target_milestone short_desc
Message-ID: <bug-66626-4-s7Q2GznjSB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02352.txt.bz2
Content-length: 934

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ra
             Target|i?86-*-*                    |i?86
                 CC|                            |vmakarov at gcc dot gnu.org
          Component|target                      |rtl-optimization
   Target Milestone|---                         |4.9.4
            Summary|[i386]                      |[i4.9/5/6 Regression]
                   |gcc.dg/torture/stackalign/n |gcc.dg/torture/stackalign/n
                   |on-local-goto-5.c segfaults |on-local-goto-5.c segfaults
                   |w/ -mregparm=3              |w/ -mregparm=3

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Reconfirmed as LRA problem.
>From gcc-bugs-return-490021-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 22:00:50 2015
Return-Path: <gcc-bugs-return-490021-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 59660 invoked by alias); 23 Jun 2015 22:00:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 59543 invoked by uid 48); 23 Jun 2015 22:00:45 -0000
From: "wilson at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/65932] [5 Regression] Linux-3.10.75 on arm926ej-s does not boot due to wrong code generation
Date: Tue, 23 Jun 2015 22:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: critical
X-Bugzilla-Who: wilson at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65932-4-NyvqsuEra5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65932-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65932-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02353.txt.bz2
Content-length: 2455

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide932

--- Comment #18 from Jim Wilson <wilson at gcc dot gnu.org> ---
Ultimately, I believe that this is an ARM backend bug.  PROMOTE_MODE and
TARGET_PROMOTE_FUNCTION_MODE should not behave differently.  It would help if
the PROMOTE_MODE macro was merged with the TARGET_PROMOTE_FUNCTION_MODE hook,
to avoid accidents like this.

I've tested my patch to modify PROMOTE_MODE so that it no longer sets UNSIGNEDP
for char and short.

For the SPEC CPU2000 benchmarks, individual benchmarks are within 1% which is
within the noise range, and the full benchmark results have almost identical
performance.

I get 3 additional failures in the gcc testsuite, for
gcc.target/arm/wmul-[123].c.  These are testcases to verify generation of the
smulbb and smlabb instruction.  However, they only work currently because of
the extra sign-extends emitted by PROMOTE_MODE.  We currently emit an unsigned
short load, a sign-extend, and a multiply.  The sign-extend gets merged into
the multiply.  But with the patch, we emit a signed short load and a multiply,
and hence can't form smulbb.  Unpatched, for wmul-1.c we get
        ldrh    r1, [r4, #2]!
        ldrh    r6, [r0, #2]!
        smlabb  r5, r1, r6, r5
        smlabb  r2, r1, r1, r2
and patched we get
        ldrsh   r1, [r4, #2]!
        ldrsh   r6, [r0, #2]!
        mla     r5, r1, r6, r5
        mla     r2, r1, r1, r2
wmul-2.c is similar.  There is a bigger difference with wmul-3.c.  Unpatched is
        ldrh    r1, [r5, #2]!
        ldrh    r4, [r0, #2]!
        smulbb  r4, r1, r4
        subs    r6, r6, r4
        smulbb  r1, r1, r1
        subs    r2, r2, r1
whereas patched is
        ldrsh   r1, [r4, #2]!
        ldrsh   r6, [r0, #2]!
        mls     r5, r1, r6, r5
        mls     r2, r1, r1, r2
The patched code is better or equivalent to the unpatched code in all cases,
but these testcases no longer serve their purpose.  I can fix wmul-1.c by
changing types to int and casting to signed short.  This doesn't work for
wmul-2.c because the scalar sign-extend is moved out of the loop, and no longer
available to merge with the multiple.  This also doesn't work for wmul-3.c, but
only because it is cse'd differently.  I get unpatched
        smulbb  r4, r1, r4
        subs    r6, r6, r4
and patched
        sxth    r4, r4
        mls     r6, r1, r4, r6

At the moment the only option I have to make wmul-2.c and wmul-3.c work is to
remove them


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
  2015-06-23 20:50 ` [Bug target/66626] " ubizjak at gmail dot com
  2015-06-23 21:35 ` ubizjak at gmail dot com
@ 2015-06-30 11:04 ` rguenth at gcc dot gnu.org
  2015-06-30 20:30 ` hjl.tools at gmail dot com
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-30 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Priority|P3                          |P2


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-06-30 11:04 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] " rguenth at gcc dot gnu.org
@ 2015-06-30 20:30 ` hjl.tools at gmail dot com
  2015-06-30 20:32 ` hjl.tools at gmail dot com
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-06-30 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
ix86_function_regparm has

             /* We don't want to use regparm(3) for nested functions as
                 these use a static chain pointer in the third argument.  */
              if (local_regparm == 3 && DECL_STATIC_CHAIN (target->decl))
                local_regparm = 2;

              /* Save a register for the split stack.  */
              if (local_regparm == 3 && flag_split_stack)
                local_regparm = 2;

              /* Each fixed register usage increases register pressure,
                 so less registers should be used for argument passing.
                 This functionality can be overriden by an explicit
                 regparm value.  */
              for (regno = AX_REG; regno <= DI_REG; regno++)
                if (fixed_regs[regno])
                  globals++;

              local_regparm
                = globals < local_regparm ? local_regparm - globals : 0;

              if (local_regparm > regparm)
                                ^^^ Shouldn't it be "<"?
                regparm = local_regparm;
            }


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-06-30 20:30 ` hjl.tools at gmail dot com
@ 2015-06-30 20:32 ` hjl.tools at gmail dot com
  2015-07-01  8:22 ` ubizjak at gmail dot com
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-06-30 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 35882
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35882&action=edit
A patch


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-06-30 20:32 ` hjl.tools at gmail dot com
@ 2015-07-01  8:22 ` ubizjak at gmail dot com
  2015-07-01 11:40 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-01  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #7)
> Created attachment 35882 [details]
> A patch

Uhuh... it's correct. We want to limit regparm value with local_regparm.

However, the unpatched compiler shows that LRA doesn't correctly handle argp
elimination. However, patched compiler will avoid this situation.
>From gcc-bugs-return-491126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 01 08:25:04 2015
Return-Path: <gcc-bugs-return-491126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 103831 invoked by alias); 1 Jul 2015 08:25:04 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 103409 invoked by uid 55); 1 Jul 2015 08:25:00 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/66633] [5/6 regression] ICE on valid "verify_gimple failed" with OpenMP
Date: Wed, 01 Jul 2015 08:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66633-4-7Q7jfGVkBj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66633-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66633-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00016.txt.bz2
Content-length: 881

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf633

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Author: ebotcazou
Date: Wed Jul  1 08:24:29 2015
New Revision: 225228

URL: https://gcc.gnu.org/viewcvs?rev"5228&root=gcc&view=rev
Log:
        PR middle-end/66633
        * tree-nested.c (convert_nonlocal_omp_clauses): Initialize need_chain
        to true if the function is nested and if not optimizing.
        (convert_local_omp_clauses): Initialize need_frame to true if the
        function contains nested functions and if not optimizing.

Added:
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/gomp/pr66633.f90
      - copied unchanged from r225227,
trunk/gcc/testsuite/gfortran.dg/gomp/pr66633.f90
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-nested.c


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-07-01  8:22 ` ubizjak at gmail dot com
@ 2015-07-01 11:40 ` hjl.tools at gmail dot com
  2015-07-01 13:02 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-01 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #8)
> (In reply to H.J. Lu from comment #7)
> > Created attachment 35882 [details]
> > A patch
> 
> Uhuh... it's correct. We want to limit regparm value with local_regparm.
> 
> However, the unpatched compiler shows that LRA doesn't correctly handle argp
> elimination. However, patched compiler will avoid this situation.

LRA should check that it is impossible to pass 3 parameters plus
a hidden chain into nested functions for x86.
>From gcc-bugs-return-491145-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 01 11:46:47 2015
Return-Path: <gcc-bugs-return-491145-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 36923 invoked by alias); 1 Jul 2015 11:46:47 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 36885 invoked by uid 48); 1 Jul 2015 11:46:44 -0000
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/66432] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol
Date: Wed, 01 Jul 2015 11:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: ice-on-valid-code, openmp, patch
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vries at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords
Message-ID: <bug-66432-4-8SwchRellc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66432-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66432-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00035.txt.bz2
Content-length: 401

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf432

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, patch

--- Comment #6 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00034.html


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-07-01 11:40 ` hjl.tools at gmail dot com
@ 2015-07-01 13:02 ` hjl.tools at gmail dot com
  2015-07-01 23:36 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-01 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
There is also

      else if (ix86_function_regparm (fntype, fndecl) == 3) 
        {
          /* For regparm 3, we have no free call-clobbered registers in
             which to store the static chain.  In order to implement this,
             we have the trampoline push the static chain to the stack.
             However, we can't push a value below the return address when
             we call the nested function directly, so we have to use an
             alternate entry point.  For this we use ESI, and have the
             alternate entry point push ESI, so that things appear the
             same once we're executing the nested function.  */
          if (incoming_p)
            {
              if (fndecl == current_function_decl)
                ix86_static_chain_on_stack = true; 
              return gen_frame_mem (SImode,
                                    plus_constant (Pmode,
                                                   arg_pointer_rtx, -8)); 
            }
          regno = SI_REG;
        }


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-07-01 13:02 ` hjl.tools at gmail dot com
@ 2015-07-01 23:36 ` hjl.tools at gmail dot com
  2015-07-02  0:15 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-01 23:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
LRA tries to reload SI 90:

(insn 14 13 15 3 (set (reg/f:SI 6 bp)
        (mem:SI (reg/f:SI 90 [ CHAIN.1 ]) [0  S4 A8])) ../y.i:9 86
{*movsi_internal}
     (nil))
(insn 15 14 16 3 (clobber (mem:BLK (scratch) [0  A8])) ../y.i:9 -1
     (nil))
(insn 16 15 17 3 (clobber (mem:BLK (reg/f:SI 7 sp) [0  A8])) ../y.i:9 -1
     (nil))
(insn 17 16 18 3 (set (reg/f:SI 7 sp)
        (mem:SI (plus:SI (reg/f:SI 90 [ CHAIN.1 ])
                (const_int 4 [0x4])) [0  S4 A8])) ../y.i:9 86 {*movsi_internal}
     (expr_list:REG_DEAD (reg/f:SI 90 [ CHAIN.1 ])
        (nil)))

It generates:

(insn 32 13 14 3 (set (reg:SI 1 dx [94])
        (mem/c:SI (plus:SI (reg/f:SI 6 bp)
                (const_int 4 [0x4])) [0  S4 A8])) ../y.i:9 86 {*movsi_internal}
     (nil))
(insn 14 32 15 3 (set (reg/f:SI 6 bp)
        (mem:SI (reg:SI 1 dx [94]) [0  S4 A8])) ../y.i:9 86 {*movsi_internal}
     (nil))
(insn 15 14 16 3 (clobber (mem:BLK (scratch) [0  A8])) ../y.i:9 -1
     (nil))
(insn 16 15 33 3 (clobber (mem:BLK (reg/f:SI 7 sp) [0  A8])) ../y.i:9 -1
     (nil))
(insn 33 16 17 3 (set (reg:SI 2 cx [95])
        (mem/c:SI (plus:SI (reg/f:SI 6 bp) 
                (const_int 4 [0x4])) [0  S4 A8])) ../y.i:9 86 {*movsi_internal}
     (nil))
(insn 17 33 18 3 (set (reg/f:SI 7 sp) 
        (mem:SI (plus:SI (reg:SI 2 cx [95])
                (const_int 4 [0x4])) [0  S4 A8])) ../y.i:9 86 {*movsi_internal}
     (nil))

It shouldn't add insn 33 and should just use EDX in insn 17.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-07-01 23:36 ` hjl.tools at gmail dot com
@ 2015-07-02  0:15 ` hjl.tools at gmail dot com
  2015-07-02  8:35 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-02  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
lra-eliminations.c has

       {
          /* See if this is setting the replacement hard register for
             an elimination.

             If DEST is the hard frame pointer, we do nothing because
             we assume that all assignments to the frame pointer are
             for non-local gotos and are being done at a time when
             they are valid and do not disturb anything else.  Some
             machines want to eliminate a fake argument pointer (or
             even a fake frame pointer) with either the real frame
             pointer or the stack pointer.  Assignments to the hard
             frame pointer must not prevent this elimination.  */
          for (ep = reg_eliminate;
               ep < &reg_eliminate[NUM_ELIMINABLE_REGS];
               ep++)
            if (ep->to_rtx == SET_DEST (x)
                && SET_DEST (x) != hard_frame_pointer_rtx)
              setup_can_eliminate (ep, false);
        }

It explicitly allows elimination with the hard frame pointer even when
it is used by non-local gotos.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-07-02  0:15 ` hjl.tools at gmail dot com
@ 2015-07-02  8:35 ` ubizjak at gmail dot com
  2015-07-02  8:44 ` ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-02  8:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #8)
> (In reply to H.J. Lu from comment #7)
> > Created attachment 35882 [details]
> > A patch
> 
> Uhuh... it's correct. We want to limit regparm value with local_regparm.

Please note that for some reason this patch regressed gcc.target/i386/local.c
for 32bit targets.
>From gcc-bugs-return-491236-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 02 08:39:18 2015
Return-Path: <gcc-bugs-return-491236-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31566 invoked by alias); 2 Jul 2015 08:39:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 31523 invoked by uid 55); 2 Jul 2015 08:39:14 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66719] gcc.dg/vect/bb-slp-32.c FAILs
Date: Thu, 02 Jul 2015 08:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66719-4-GPd4KgQg0q@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66719-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66719-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00126.txt.bz2
Content-length: 526

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf719

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Jul  2 08:38:42 2015
New Revision: 225303

URL: https://gcc.gnu.org/viewcvs?rev"5303&root=gcc&view=rev
Log:
2015-07-02  Richard Biener  <rguenther@suse.de>

        PR testsuite/66719
        * gcc.dg/vect/bb-slp-32.c: Re-add XFAIL for targets not supporting
        unaligned loads.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/vect/bb-slp-32.c


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-07-02  8:35 ` ubizjak at gmail dot com
@ 2015-07-02  8:44 ` ubizjak at gmail dot com
  2015-07-02 11:59 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-02  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #14)
> > > Created attachment 35882 [details]
> > > A patch
> > 
> > Uhuh... it's correct. We want to limit regparm value with local_regparm.
> 
> Please note that for some reason this patch regressed
> gcc.target/i386/local.c for 32bit targets.

... which means that proposed patch is wrong. We want to *increase* regparm for
local functions as much as possible, even increasing specified regparm.
>From gcc-bugs-return-491238-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 02 09:04:54 2015
Return-Path: <gcc-bugs-return-491238-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 97806 invoked by alias); 2 Jul 2015 09:04:54 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 96807 invoked by uid 48); 2 Jul 2015 09:04:50 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66721] [6 regression] gcc.target/i386/pr61403.c FAILs
Date: Thu, 02 Jul 2015 09:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66721-4-sZfJBVCrTy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66721-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66721-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00128.txt.bz2
Content-length: 310

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

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> Yes, this is know.  I thought we had a PR about this already but I can't
> find it.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66510#c2
>From gcc-bugs-return-491239-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 02 09:19:11 2015
Return-Path: <gcc-bugs-return-491239-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 79465 invoked by alias); 2 Jul 2015 09:19:11 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 79446 invoked by uid 48); 2 Jul 2015 09:19:07 -0000
From: "fynjycfdby at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66735] New: [C++14] lambda init-capture fails for const references
Date: Thu, 02 Jul 2015 09:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fynjycfdby at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-66735-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00129.txt.bz2
Content-length: 976

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf735

            Bug ID: 66735
           Summary: [C++14] lambda init-capture fails for const references
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fynjycfdby at gmail dot com
  Target Milestone: ---

This code fails to compile:

int main() {
    int x = 0;
    auto l = [&rx = static_cast<const int&>(x)]() {};
}


The error message is:

test.cpp:3:14: error: binding 'const int' to reference of type 'int&' discards
qualifiers
     auto l = [&rx = static_cast<const int&>(x)]() {


But according to [expr.prim.lambda]/11 rx should be captured as auto &rx static_cast<const int&>(x), that is as const int&.

Tested on MacPorts g++-mp-5:

$ g++-mp-5 -v
Using built-in specs.
COLLECT_GCC=g++-mp-5
...
gcc version 5.1.0 (MacPorts gcc5 5.1.0_1)


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-07-02  8:44 ` ubizjak at gmail dot com
@ 2015-07-02 11:59 ` ubizjak at gmail dot com
  2015-07-02 12:00 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-02 11:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #13)

> These simply won't work to together.  Since we must keep LRA, we
> should remove ix86_static_chain_on_stack.

... or LRA notes that static chain reg has just been loaded from stack (insn
32) and can be reused in all subsequent instructions (insn 14) and (insn 17).
>From gcc-bugs-return-491261-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 02 11:59:40 2015
Return-Path: <gcc-bugs-return-491261-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 52618 invoked by alias); 2 Jul 2015 11:59:39 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 52524 invoked by uid 48); 2 Jul 2015 11:59:35 -0000
From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/65946] Simple loop with if-statement not vectorized
Date: Thu, 02 Jul 2015 11:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: alalaw01 at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: alalaw01 at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-65946-4-IwGklGN1ul@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65946-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65946-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00151.txt.bz2
Content-length: 1125

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide946

alalaw01 at gcc dot gnu.org changed:

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

--- Comment #2 from alalaw01 at gcc dot gnu.org ---
Author: alalaw01
Date: Thu Jul 2 12:47:31 2015
New Revision: 225311

URL: https://gcc.gnu.org/viewcvs?rev"5311&root=gcc&view=rev
Log:
gcc/:

        * tree-pass.h (make_pass_ch_vect): New.
        * passes.def: Add pass_ch_vect just before pass_if_conversion.

        * tree-ssa-loop-ch.c (ch_base, pass_ch_vect, pass_data_ch_vect,
        pass_ch::process_loop_p, pass_ch_vect::process_loop_p,
        make_pass_ch_vect): New.
        (pass_ch): Extend ch_base.

        (pass_ch::execute): Move all but loop_optimizer_init/finalize to...
        (ch_base::copy_headers): ...here.

gcc/testsuite/:

        * gcc.dg/vect/vect-strided-a-u16-i4.c (main1): Narrow scope of x,y,z,w.
        * gcc.dg/vect/vect-ifcvt-11.c: New testcase.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-07-02 11:59 ` ubizjak at gmail dot com
@ 2015-07-02 12:00 ` hjl.tools at gmail dot com
  2015-07-02 12:15 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-02 12:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
non local goto, nested function and regparm == 3 are incompatible.  Is
that possible to detect non local goto is used inside ix86_function_regparm?


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-07-02 12:00 ` hjl.tools at gmail dot com
@ 2015-07-02 12:15 ` ubizjak at gmail dot com
  2015-07-14 20:54 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu vmakarov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-02 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #16)
> (In reply to H.J. Lu from comment #13)
> 
> > These simply won't work to together.  Since we must keep LRA, we
> > should remove ix86_static_chain_on_stack.
> 
> ... or LRA notes that static chain reg has just been loaded from stack (insn
> 32) and can be reused in all subsequent instructions (insn 14) and (insn 17).

... or prevent fwprop to distribute static chain reg into its users and leave
it in a temporary.
>From gcc-bugs-return-491267-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 02 12:32:50 2015
Return-Path: <gcc-bugs-return-491267-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129099 invoked by alias); 2 Jul 2015 12:32:50 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 129038 invoked by uid 48); 2 Jul 2015 12:32:46 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/66736] float rounding differences when using constant literal versus variable
Date: Thu, 02 Jul 2015 12:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66736-4-i9WnjuKd1C@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66736-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66736-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00157.txt.bz2
Content-length: 1249

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf736

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to dhekir from comment #2)
> Isn't the library implementation of log10f used to compute the literal
> constants generated in the assembly code? Would it then be a double
> precision result that would be precomputed and rounded to single precision
> in this case?

No, GCC uses the GMP / mpfr / mpc libraries to constant fold math functions.
The library implementation is for example not available when cross-compiling.

> Well, sorry for the noise, I compared the results with other compilers and,
> even if the numerical results themselves were different, they were
> consistent between precomputed constant literals and the underlying libc,
> therefore such surprising situations do not arrive. I assumed that it was
> not intented in GCC and so it would be useful to report it, but if it's not
> the same library function used in both cases, that explains the issue.

Yes, that explains it.  GCC produces exact results for constant folding.

Note that with other compilers you may fall into the trap of not executing
the library function in any case so I suggest to make the 'float r' variable
global and volatile.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-07-02 12:15 ` ubizjak at gmail dot com
@ 2015-07-14 20:54 ` vmakarov at gcc dot gnu.org
  2015-07-14 22:32 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-07-14 20:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Tue Jul 14 20:54:00 2015
New Revision: 225789

URL: https://gcc.gnu.org/viewcvs?rev=225789&root=gcc&view=rev
Log:
2015-07-14  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/66626
        * lra-constraints.c (lra_constraints): Prevent equivalence
        substitution for static chain pseudo in functions with nonlocal
        goto.

2015-07-14  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/66626
        * gcc.target/i386/pr66626.c: New.


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


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-07-14 20:54 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu vmakarov at gcc dot gnu.org
@ 2015-07-14 22:32 ` hjl.tools at gmail dot com
  2015-07-15  8:32 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-14 22:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
Testcase in comment #1 still fails with r225789.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-07-14 22:32 ` hjl.tools at gmail dot com
@ 2015-07-15  8:32 ` ubizjak at gmail dot com
  2015-07-15 21:48 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2015-07-15  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #20)
> Testcase in comment #1 still fails with r225789.

Please note comment #3, where I recalled the testcase from Comment #2:

>> A better testcase:
>
> Nope. This one works OK. The testcase from Comment #1 fails.

Sorry for the confusion...
>From gcc-bugs-return-492308-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 15 08:41:41 2015
Return-Path: <gcc-bugs-return-492308-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7598 invoked by alias); 15 Jul 2015 08:41:41 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7542 invoked by uid 48); 15 Jul 2015 08:41:37 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66838] Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters
Date: Wed, 15 Jul 2015 08:41:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ubizjak at gmail dot com
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66838-4-i45rMkNTip@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66838-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66838-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg01198.txt.bz2
Content-length: 174

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

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed for mainline, needs backport to gcc-5 branch.
>From gcc-bugs-return-492309-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 15 09:02:20 2015
Return-Path: <gcc-bugs-return-492309-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27602 invoked by alias); 15 Jul 2015 09:02:20 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27560 invoked by uid 48); 15 Jul 2015 09:02:16 -0000
From: "sebastian.huber@embedded-brains.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgcc/66854] libgcc2.c:1846:9: internal compiler error: Segmentation fault
Date: Wed, 15 Jul 2015 09:02:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgcc
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: sebastian.huber@embedded-brains.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66854-4-qMrLzvBO6y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66854-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66854-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg01199.txt.bz2
Content-length: 1045

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf854

--- Comment #4 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
(In reply to Michael Meissner from comment #3)
> Created attachment 35978 [details]
> Proposed patch to fix the problem
>
> I believe this patch fixes the problem.  I was able to build libgcc with
> this patch installed.  I could not complete a full RTEMS build (I suspect I
> am missing some parts of the software).

Thanks for the quick fix.  With your patch I can build without errors.

To build the powerpc-rtems target you need a link to the latest Newlib in your
GCC directory, e.g. newlib -> ../newlib-git/newlib.

I used the following configure options:

../gcc-git/configure --prefix=/opt/rtems-4.11 --target=powerpc-rtems4.11
--verbose --with-gnu-as --with-gnu-ld --with-newlib --disable-libstdcxx-pch
--disable-nls --disable-lto --disable-plugin --without-included-gettext
--enable-version-specific-runtime-libs --enable-threads
--enable-newlib-io-c99-formats --enable-libgomp --enable-languages=c,c++


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2015-07-15  8:32 ` ubizjak at gmail dot com
@ 2015-07-15 21:48 ` vmakarov at gcc dot gnu.org
  2015-07-16 15:27 ` vmakarov at gcc dot gnu.org
  2015-07-16 16:47 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-07-15 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #20)
> Testcase in comment #1 still fails with r225789.

Sorry, I did not check the 1st test.  I checked only the 2nd one which has a
different reason for failure than the 1st one.

I've been working on the 1st test fialure.  The patch will be more complicated.
 I hope to fix it tomorrow.


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2015-07-15 21:48 ` vmakarov at gcc dot gnu.org
@ 2015-07-16 15:27 ` vmakarov at gcc dot gnu.org
  2015-07-16 16:47 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-07-16 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Thu Jul 16 15:26:35 2015
New Revision: 225891

URL: https://gcc.gnu.org/viewcvs?rev=225891&root=gcc&view=rev
Log:
2015-07-16  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/66626
        * ira.h (emit-rtl.h): Include.
        (non_spilled_static_chain_regno_p): New.
        * ira-color.c (setup_profitable_hard_regs): Clear profitable regs
        unless it is non spilled static chain pseudo.
        (assign_hard_rego): Spill memory profitable allocno unless it is
        non spilled static chain pseudo.
        (allocno_spill_priority_compare): Put non spilled static chain
        pseudo at the end of sorted array.
        (improve_allocation): Do nothing if we have static chain and
        non-local goto.
        (allocno__priority_compare_func): Put non spilled static chain
        pseudo at the beginning of sorted array.
        (move_spill_restore): Ignore non spilled static chain pseudo.
        * ira-costs.c (find_costs_and_classes): Don't assign class NO_REGS
        to non spilled static chain pseudo.
        * lra-assigns.c (pseudo_compare_func): Put non spilled static chain
        pseudo at the beginning of sorted array.
        (spill_for): Spill non spilled static chain pseudo last.
        * lra-constraints.c (lra_constraints): Remove static chain pseudo
        check for equivalence.

2015-07-16  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/66626
        * gcc.target/i386/pr66626-2.c: New.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr66626-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-color.c
    trunk/gcc/ira-costs.c
    trunk/gcc/ira.h
    trunk/gcc/lra-assigns.c
    trunk/gcc/lra-constraints.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu
  2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2015-07-16 15:27 ` vmakarov at gcc dot gnu.org
@ 2015-07-16 16:47 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-16 16:47 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.9.4                       |6.0

--- Comment #24 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.


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

end of thread, other threads:[~2015-07-16 16:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 14:24 [Bug target/66626] New: [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 kyukhin at gcc dot gnu.org
2015-06-23 20:50 ` [Bug target/66626] " ubizjak at gmail dot com
2015-06-23 21:35 ` ubizjak at gmail dot com
2015-06-30 11:04 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] " rguenth at gcc dot gnu.org
2015-06-30 20:30 ` hjl.tools at gmail dot com
2015-06-30 20:32 ` hjl.tools at gmail dot com
2015-07-01  8:22 ` ubizjak at gmail dot com
2015-07-01 11:40 ` hjl.tools at gmail dot com
2015-07-01 13:02 ` hjl.tools at gmail dot com
2015-07-01 23:36 ` hjl.tools at gmail dot com
2015-07-02  0:15 ` hjl.tools at gmail dot com
2015-07-02  8:35 ` ubizjak at gmail dot com
2015-07-02  8:44 ` ubizjak at gmail dot com
2015-07-02 11:59 ` ubizjak at gmail dot com
2015-07-02 12:00 ` hjl.tools at gmail dot com
2015-07-02 12:15 ` ubizjak at gmail dot com
2015-07-14 20:54 ` [Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu vmakarov at gcc dot gnu.org
2015-07-14 22:32 ` hjl.tools at gmail dot com
2015-07-15  8:32 ` ubizjak at gmail dot com
2015-07-15 21:48 ` vmakarov at gcc dot gnu.org
2015-07-16 15:27 ` vmakarov at gcc dot gnu.org
2015-07-16 16:47 ` hjl.tools at gmail dot com

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).