public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64
@ 2015-06-29 20:03 bucaneer at gmail dot com
  2015-09-29  4:26 ` [Bug target/66697] " austinenglish at gmail dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-06-29 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66697
           Summary: Feature request: -mstackrealign and
                    force_align_arg_pointer for x86_64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bucaneer at gmail dot com
  Target Milestone: ---

-mstackrealign option and force_align_arg_pointer attribute work for 32bit x86,
but not x86_64.

In particular, this makes Wine unable to deal with some untidy 64bit Windows
apps: https://bugs.winehq.org/show_bug.cgi?id=27680


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
@ 2015-09-29  4:26 ` austinenglish at gmail dot com
  2015-10-04 15:29 ` ubizjak at gmail dot com
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: austinenglish at gmail dot com @ 2015-09-29  4:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from austinenglish at gmail dot com ---
We're now up to at least 9 bugs reported in Wine's bugzilla about this issue,
it does not appear to be an isolated problem. E.g., Unity and for some
applications, like Planetside 2, there is no 32-bit version, so the game is
completely broken on wine.

Is there any plan to implement this in a future version?


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
  2015-09-29  4:26 ` [Bug target/66697] " austinenglish at gmail dot com
@ 2015-10-04 15:29 ` ubizjak at gmail dot com
  2015-10-04 21:23 ` bucaneer at gmail dot com
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-04 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-10-04
           See Also|                            |https://bugs.winehq.org/sho
                   |                            |w_bug.cgi?id=27680
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
     Ever confirmed|0                           |1

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Proposed patch at [1].

[1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00342.html
>From gcc-bugs-return-498718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Oct 04 15:36:10 2015
Return-Path: <gcc-bugs-return-498718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129725 invoked by alias); 4 Oct 2015 15:36:10 -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 124380 invoked by uid 48); 4 Oct 2015 15:36:07 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67758] [GCC 6 regression] ICE on invalid use of COMMON
Date: Sun, 04 Oct 2015 15:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: kargl at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-67758-4-JYmJcpCNbV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67758-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67758-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-10/txt/msg00273.txt.bz2
Content-length: 1856

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

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

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
If I compile the test as free form before r228458, I get the following ICE

[Book15] f90/bug% gfc pr67758.f90
pr67758.f90:1:26:

       COMMON /FMCOM / X(80 000 000)
                          1
Error: Expected another dimension in array declaration at (1)
pr67758.f90:3:27:

       COMMON /FMCOM / XX(80 000 000)
                           1
Error: Expected another dimension in array declaration at (1)

Segmentation fault: 11

Internal compiler error: Error reporting routines re-entered.
gfc: internal compiler error: Abort trap: 6 (program f951)

or if configured with --enable-checking=release

[Book15] f90/bug% gfcp pr67758.f90
pr67758.f90:1:26:

       COMMON /FMCOM / X(80 000 000)
                          1
Error: Expected another dimension in array declaration at (1)
pr67758.f90:3:27:

       COMMON /FMCOM / XX(80 000 000)
                           1
Error: Expected another dimension in array declaration at (1)

(null):0: confused by earlier errors, bailing out

After r228458, I get

[Book15] f90/bug% gfc pr67758.f90
pr67758.f90:1:26:

       COMMON /FMCOM / X(80 000 000)
                          1
Error: Expected another dimension in array declaration at (1)
pr67758.f90:3:27:

       COMMON /FMCOM / XX(80 000 000)
                           1
Error: Expected another dimension in array declaration at (1)

in gfc_format_decoder, at fortran/error.c:936

Internal compiler error: Error reporting routines re-entered.

then gfortran hangs.


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
  2015-09-29  4:26 ` [Bug target/66697] " austinenglish at gmail dot com
  2015-10-04 15:29 ` ubizjak at gmail dot com
@ 2015-10-04 21:23 ` bucaneer at gmail dot com
  2015-10-05  9:08 ` ubizjak at gmail dot com
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-04 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Justas L <bucaneer at gmail dot com> ---
I haven't tested this yet, but I understand this global solution would affect
the performance of ALL functions, not only those that interface with outside
code, correct?

Wine already assigns the force_align_arg_pointer attribute to vulnerable
functions, so making it work for x86_64 would be the better, less disruptive
solution.


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (2 preceding siblings ...)
  2015-10-04 21:23 ` bucaneer at gmail dot com
@ 2015-10-05  9:08 ` ubizjak at gmail dot com
  2015-10-05 17:40 ` ubizjak at gmail dot com
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-05  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Justas L from comment #4)
> I haven't tested this yet, but I understand this global solution would
> affect the performance of ALL functions, not only those that interface with
> outside code, correct?

Yes, but you can always move critical functions to a separate file and compile
them with special options.

> Wine already assigns the force_align_arg_pointer attribute to vulnerable
> functions, so making it work for x86_64 would be the better, less disruptive
> solution.

TBH, I really don't see the reason against force_align_arg_pointer support on
x86_64. I have a patch in testing that enables this attribute also for x86_64
targets.
>From gcc-bugs-return-498760-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 05 09:09:53 2015
Return-Path: <gcc-bugs-return-498760-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29327 invoked by alias); 5 Oct 2015 09:09:52 -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 28967 invoked by uid 48); 5 Oct 2015 09:09:48 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
Date: Mon, 05 Oct 2015 09:09: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-66697-4-2BgjYAiOk7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66697-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66697-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-10/txt/msg00315.txt.bz2
Content-length: 294

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

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 36445
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36445&action=edit
Patch that enables force_align_arg_pointer attribute for x86_64 targets
>From gcc-bugs-return-498761-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 05 09:42:10 2015
Return-Path: <gcc-bugs-return-498761-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 41734 invoked by alias); 5 Oct 2015 09:42:09 -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 41638 invoked by uid 48); 5 Oct 2015 09:42:05 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/67841] error: unable to find a register to spill if all registers are callee-saved
Date: Mon, 05 Oct 2015 09:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak 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:
Message-ID: <bug-67841-4-XvcztdGgbI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67841-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67841-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-10/txt/msg00316.txt.bz2
Content-length: 618

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

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #6)
> ix86_expand_prologue in i386.c has
> 
>       /* The computation of the size of the re-aligned stack frame means
>          that we must allocate the size of the register save area before
>          performing the actual alignment.  Otherwise we cannot guarantee
>          that there's enough storage above the realignment point.  */
> 
> That is where unaligned SSE load/store in prologue come from.

We can also use this code for interrupt handler.
>From gcc-bugs-return-498762-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 05 09:57:44 2015
Return-Path: <gcc-bugs-return-498762-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 69327 invoked by alias); 5 Oct 2015 09:57:44 -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 69230 invoked by uid 48); 5 Oct 2015 09:57:40 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67821] [5/6 Regression] ICE in duplicate_ssa_name_range_info
Date: Mon, 05 Oct 2015 09:57: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.3.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: P1
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority cf_known_to_work
Message-ID: <bug-67821-4-ydRZBcX8ex@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67821-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67821-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-10/txt/msg00317.txt.bz2
Content-length: 346

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
      Known to work|                            |5.2.0


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (3 preceding siblings ...)
  2015-10-05  9:08 ` ubizjak at gmail dot com
@ 2015-10-05 17:40 ` ubizjak at gmail dot com
  2015-10-05 19:55 ` bucaneer at gmail dot com
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-05 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
Formal patch submission at [1].

Wine people, can someone please test that the patched compiler solves unaligned
stack access, as reported in WineHQ bug?

[1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00450.html
>From gcc-bugs-return-498799-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 05 17:47:50 2015
Return-Path: <gcc-bugs-return-498799-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 111073 invoked by alias); 5 Oct 2015 17:47: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 111053 invoked by uid 48); 5 Oct 2015 17:47:44 -0000
From: "miyuki at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67854] Missing diagnostic for passing bool to va_arg
Date: Mon, 05 Oct 2015 17:47: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: 6.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: miyuki 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67854-4-OOGRTE3WyI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67854-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67854-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-10/txt/msg00354.txt.bz2
Content-length: 1910

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

--- Comment #2 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #1)
> I wonder if this is yet another issue with macros from system headers
> (bool being defined in a system header to expand to _Bool) ...

Looks like it is. In gimplify.c:gimplify_va_arg_expr we have:

      /* Unfortunately, this is merely undefined, rather than a constraint
         violation, so we cannot make this an error.  If this call is never
         executed, the program is still strictly conforming.  */
      warned = warning_at (loc, 0,
                           "%qT is promoted to %qT when passed through
%<...%>",
                           type, promoted_type);

And warning_at returns false. Also, for

#include <stdarg.h>
#define BOOL _Bool
void foo(va_list ap)
{
    va_arg(ap, BOOL);
}

GCC outputs:

In file included from test2.c:1:0:
test2.c: In function 'foo':
test2.c:2:14: warning: '_Bool' is promoted to 'int' when passed through '...'
 #define BOOL _Bool
              ^
test2.c:5:16: note: in expansion of macro 'BOOL'
     va_arg(ap, BOOL);
                ^
test2.c:2:14: note: (so you should pass 'int' not '_Bool' to 'va_arg')
 #define BOOL _Bool
              ^
test2.c:5:16: note: in expansion of macro 'BOOL'
     va_arg(ap, BOOL);
                ^
test2.c:2:14: note: if this code is reached, the program will abort
 #define BOOL _Bool
              ^
test2.c:5:16: note: in expansion of macro 'BOOL'
     va_arg(ap, BOOL);

IMHO, it would be more correct to output something like this:

test2.c: In function 'foo':
test2.c:5:16: warning: '_Bool' is promoted to 'int' when passed through '...'
     va_arg(ap, BOOL);
                ^
test2.c:2:14: note: expanded from macro 'BOOL'
 #define BOOL _Bool
              ^


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (4 preceding siblings ...)
  2015-10-05 17:40 ` ubizjak at gmail dot com
@ 2015-10-05 19:55 ` bucaneer at gmail dot com
  2015-10-06  6:40 ` ubizjak at gmail dot com
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-05 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Justas L <bucaneer at gmail dot com> ---
I applied the first (testing) version of the patch on gcc 5.2.0 release source
(with slight modifications to make it apply). All new features work as
expected, as per the test in comment #2. However, compiling Wine with either
-mstackrealign or -mincoming-stack-boundary=3 fails, throwing this error:

---------
../../../wine/dlls/dxerr8/dxerr8.c:135:1: internal compiler error: in
ix86_compute_frame_layout, at config/i386/i386.c:10212
---------

which refers to this line in i386.c:

---------
gcc_assert (INCOMING_STACK_BOUNDARY >= 128);
---------

Commenting out the assert allows Wine to compile normally. (I assume the
correct fix would be to change the number to 64.) And compiling Wine with
-mincoming-stack-boundary=3 does fix the original issue (or at least the one
instance of it that I care about). So the gcc side of the issue is almost
resolved, with just the assert left to address.


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (5 preceding siblings ...)
  2015-10-05 19:55 ` bucaneer at gmail dot com
@ 2015-10-06  6:40 ` ubizjak at gmail dot com
  2015-10-06  9:21 ` ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-06  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Justas L from comment #8)
> I applied the first (testing) version of the patch on gcc 5.2.0 release
> source (with slight modifications to make it apply). All new features work
> as expected, as per the test in comment #2. However, compiling Wine with
> either -mstackrealign or -mincoming-stack-boundary=3 fails, throwing this
> error:
> 
> ---------
> ../../../wine/dlls/dxerr8/dxerr8.c:135:1: internal compiler error: in
> ix86_compute_frame_layout, at config/i386/i386.c:10212
> ---------
> 
> which refers to this line in i386.c:
> 
> ---------
> gcc_assert (INCOMING_STACK_BOUNDARY >= 128);
> ---------
> 
> Commenting out the assert allows Wine to compile normally. (I assume the
> correct fix would be to change the number to 64.) And compiling Wine with
> -mincoming-stack-boundary=3 does fix the original issue (or at least the one
> instance of it that I care about). So the gcc side of the issue is almost
> resolved, with just the assert left to address.

Thanks, this assert triggered on target I'm not able to test.

The correct solution is to emit unaligned moves when INCOMING_STACK_BOUNDARY <
128. This is the same problem as HJ is solving for interrupt handler.
>From gcc-bugs-return-498831-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 06:43:41 2015
Return-Path: <gcc-bugs-return-498831-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 55622 invoked by alias); 6 Oct 2015 06:43: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 55585 invoked by uid 48); 6 Oct 2015 06:43:37 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67861] coreutils' wc.c:write_counts is miscompiled since commit 7e3a76de7c496449b187c2688d958631cf21a944
Date: Tue, 06 Oct 2015 06:43: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels 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: cc bug_severity
Message-ID: <bug-67861-4-LOWn29jZXP@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67861-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67861-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-10/txt/msg00386.txt.bz2
Content-length: 454

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu.org,
                   |                            |trippels at gcc dot gnu.org
           Severity|blocker                     |normal


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (6 preceding siblings ...)
  2015-10-06  6:40 ` ubizjak at gmail dot com
@ 2015-10-06  9:21 ` ubizjak at gmail dot com
  2015-10-06 12:33 ` bucaneer at gmail dot com
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-06  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
Version 2 patch to be attached. For the following testcase:

--cut here--
typedef float __v4sf __attribute__ ((__vector_size__ (16)));

__v4sf
__attribute__((force_align_arg_pointer, ms_abi))
test_ms (__v4sf a, __v4sf b)
{
  volatile register __v4sf x __asm__("%xmm6") = a;
  volatile register __v4sf y __asm__("%xmm7") = b;

  volatile __v4sf r = x + y;

  return r;
}
--cut here--

-O2 generates:

0000000000000000 <test_ms>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   48 83 ec 20             sub    $0x20,%rsp
   8:   48 83 e4 f0             and    $0xfffffffffffffff0,%rsp
   c:   48 83 ec 10             sub    $0x10,%rsp
  10:   0f 28 02                movaps (%rdx),%xmm0
  13:   0f 58 01                addps  (%rcx),%xmm0
  16:   0f 11 75 e0             movups %xmm6,0xffffffffffffffe0(%rbp)
  1a:   0f 11 7d f0             movups %xmm7,0xfffffffffffffff0(%rbp)
  1e:   0f 29 04 24             movaps %xmm0,(%rsp)
  22:   0f 10 75 e0             movups 0xffffffffffffffe0(%rbp),%xmm6
  26:   0f 28 04 24             movaps (%rsp),%xmm0
  2a:   0f 10 7d f0             movups 0xfffffffffffffff0(%rbp),%xmm7
  2e:   c9                      leaveq 
  2f:   c3                      retq   

xmm6 and xmm7 are saved outside stack realignment area. Please note that movups
with aligned operand is as fast as movaps, so considering that unaligned
incoming stack should be avoided, I think that the above code is acceptable.
>From gcc-bugs-return-498843-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 09:23:32 2015
Return-Path: <gcc-bugs-return-498843-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 44547 invoked by alias); 6 Oct 2015 09:23:32 -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 44505 invoked by uid 48); 6 Oct 2015 09:23:28 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
Date: Tue, 06 Oct 2015 09:23: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created
Message-ID: <bug-66697-4-8evQHb8zrC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66697-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66697-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-10/txt/msg00398.txt.bz2
Content-length: 586

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #36445|0                           |1
        is obsolete|                            |

--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 36450
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36450&action=edit
V2 patch that enables force_align_arg_pointer attribute for x86_64 targets
>From gcc-bugs-return-498844-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 09:35:50 2015
Return-Path: <gcc-bugs-return-498844-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 128895 invoked by alias); 6 Oct 2015 09:35: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 128868 invoked by uid 48); 6 Oct 2015 09:35:45 -0000
From: "marcin.slusarz at intel dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67764] -Wconversion generates false warnings for bitmask+cast expressions
Date: Tue, 06 Oct 2015 09:35: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.2.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marcin.slusarz at intel 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:
Message-ID: <bug-67764-4-03h565Wk1E@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67764-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67764-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-10/txt/msg00399.txt.bz2
Content-length: 288

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

--- Comment #4 from Marcin Ślusarz <marcin.slusarz at intel dot com> ---
The issue is similar. However what I described in this bug can be considered a
regression, because gcc 4.9 behaves correctly. Bug 40752 is 6 years old.
>From gcc-bugs-return-498845-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 10:20:32 2015
Return-Path: <gcc-bugs-return-498845-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 73774 invoked by alias); 6 Oct 2015 10:20:32 -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 73669 invoked by uid 55); 6 Oct 2015 10:20:27 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67563] [5 Regression] verify_flow_info failed
Date: Tue, 06 Oct 2015 10:20: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: 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: 5.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67563-4-lqQdb9AGNs@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67563-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67563-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-10/txt/msg00400.txt.bz2
Content-length: 1385

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Oct  6 10:19:54 2015
New Revision: 228517

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

        Backport from mainline
        2015-09-15  Richard Biener  <rguenther@suse.de>

        PR middle-end/67563
        * gimple-fold.c (gimplify_and_update_call_from_tree): Do not
        transfer EH info from old to new stmt.
        (replace_call_with_value): Likewise.
        (replace_call_with_call_and_fold): Likewise.
        (gimple_fold_builtin_memory_op): Likewise.
        (gimple_fold_builtin_memset): Likewise.
        (gimple_fold_builtin_stpcpy): Likewise.
        (gimple_fold_call): Likewise.

        * gcc.dg/pr67563.c: New testcase.

        2015-09-24  Richard Biener  <rguenther@suse.de>

        PR lto/67699
        * lto-cgraph.c (compute_ltrans_boundary): Do not stream
        abstract origins.

        * g++.dg/pr67699.C: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/pr67699.C
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr67563.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/gimple-fold.c
    branches/gcc-5-branch/gcc/lto-cgraph.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (7 preceding siblings ...)
  2015-10-06  9:21 ` ubizjak at gmail dot com
@ 2015-10-06 12:33 ` bucaneer at gmail dot com
  2015-10-06 13:45 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-06 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Justas L <bucaneer at gmail dot com> ---
This one does not apply neatly on 5.2.0 and I have trouble getting the dev
version to compile, so I can't test it. Any chance of a backport?


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (8 preceding siblings ...)
  2015-10-06 12:33 ` bucaneer at gmail dot com
@ 2015-10-06 13:45 ` ubizjak at gmail dot com
  2015-10-06 16:38 ` bucaneer at gmail dot com
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-06 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Justas L from comment #12)
> This one does not apply neatly on 5.2.0 and I have trouble getting the dev
> version to compile, so I can't test it. Any chance of a backport?

Sent via private mail.
>From gcc-bugs-return-498871-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 13:47:11 2015
Return-Path: <gcc-bugs-return-498871-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 66590 invoked by alias); 6 Oct 2015 13:47: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 66040 invoked by uid 55); 6 Oct 2015 13:47:07 -0000
From: "dje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/65345] ICE with _Generic selection on _Atomic int
Date: Tue, 06 Oct 2015 13:47: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: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dje at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65345-4-34K28jzl8y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65345-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65345-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-10/txt/msg00426.txt.bz2
Content-length: 478

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

--- Comment #19 from David Edelsohn <dje at gcc dot gnu.org> ---
Author: dje
Date: Tue Oct  6 13:46:34 2015
New Revision: 228524

URL: https://gcc.gnu.org/viewcvs?rev"8524&root=gcc&view=rev
Log:
        PR c/65345
        * config/rs6000/rs6000.c (rs6000_atomic_assign_expand_fenv):
        Adjust to use create_tmp_var_raw instead of create_tmp_var.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (9 preceding siblings ...)
  2015-10-06 13:45 ` ubizjak at gmail dot com
@ 2015-10-06 16:38 ` bucaneer at gmail dot com
  2015-10-06 16:42 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-06 16:38 UTC (permalink / raw)
  To: gcc-bugs

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

Justas L <bucaneer at gmail dot com> changed:

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

--- Comment #14 from Justas L <bucaneer at gmail dot com> ---
The backported patch works fine and does fix multiple instances of the Wine
issue. Marking the report as resolved.


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (10 preceding siblings ...)
  2015-10-06 16:38 ` bucaneer at gmail dot com
@ 2015-10-06 16:42 ` ubizjak at gmail dot com
  2015-10-06 16:53 ` ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-06 16:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Justas L from comment #14)
> The backported patch works fine and does fix multiple instances of the Wine
> issue. Marking the report as resolved.

No, not yet.

I have adjusted the patch slightly (5.2 version sent to you privately), so it
will also fit x86 interrupt handlers. If you can confirm that the adjusted
patch works as well (it should, but just in case ...), it will be committed to
mainline SVN and backported to 5.2.
>From gcc-bugs-return-498884-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 16:47:37 2015
Return-Path: <gcc-bugs-return-498884-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129883 invoked by alias); 6 Oct 2015 16:47:36 -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 129821 invoked by uid 55); 6 Oct 2015 16:47:32 -0000
From: "nathan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67861] [6 Regression] coreutils' wc.c:write_counts is miscompiled since commit 7e3a76de7c496449b187c2688d958631cf21a944
Date: Tue, 06 Oct 2015 16:47: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: nathan at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: nathan at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67861-4-hSaqyUVbve@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67861-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67861-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-10/txt/msg00439.txt.bz2
Content-length: 457

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

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Tue Oct  6 16:47:00 2015
New Revision: 228536

URL: https://gcc.gnu.org/viewcvs?rev"8536&root=gcc&view=rev
Log:
        PR 67861
        * gimple-fold.c (gimple_fold_builtin): Add break after
        BUILT_IN_PRINTF_CHK, BUILT_IN_VPRINTF_CHK folding.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-fold.c


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (11 preceding siblings ...)
  2015-10-06 16:42 ` ubizjak at gmail dot com
@ 2015-10-06 16:53 ` ubizjak at gmail dot com
  2015-10-06 23:09 ` bucaneer at gmail dot com
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-06 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #36450|0                           |1
        is obsolete|                            |

--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 36453
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36453&action=edit
V3 patch that enables force_align_arg_pointer attribute for x86_64 targets

Slightly updated V2 patch. Now REG_CFA_EXPRESSION note is attached to an
unaligned store insn instead of REG_FRAME_RELATED_EXPR note.

This is the patch in testing.
>From gcc-bugs-return-498887-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 06 17:20:08 2015
Return-Path: <gcc-bugs-return-498887-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 126461 invoked by alias); 6 Oct 2015 17:20:07 -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 126430 invoked by uid 48); 6 Oct 2015 17:20:03 -0000
From: "dragonroot at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67870] New: ICE: in type_throw_all_p, at cp/except.c:1306
Date: Tue, 06 Oct 2015 17:20: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: 4.9.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dragonroot 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-67870-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-10/txt/msg00442.txt.bz2
Content-length: 968

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

            Bug ID: 67870
           Summary: ICE: in type_throw_all_p, at cp/except.c:1306
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dragonroot at gmail dot com
  Target Milestone: ---

The following code snippet makes the compiler ICE. Affects at least 4.8.2 and
4.9.3. Does not seem to affect 5.x. Compile with --std=c++11

=================================================
#include <type_traits>

template< class T >
struct Tmpl
{
  ~Tmpl() noexcept( std::is_nothrow_destructible< T >::value )
  {}
};

struct Empty
{
};

struct Foo
{
  ~Foo()
  {}

  Tmpl< Empty > member;
};

int main()
{
}

=================================================
Live snippet to play with: http://melpon.org/wandbox/permlink/6vmp1P7Ppwzjk1kh


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (12 preceding siblings ...)
  2015-10-06 16:53 ` ubizjak at gmail dot com
@ 2015-10-06 23:09 ` bucaneer at gmail dot com
  2015-10-07  6:51 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-06 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Justas L <bucaneer at gmail dot com> ---
Out of curiosity, what could it be that makes -mincoming-stack-boundary=3
successfully deal with rogue code while -mstackrealign fails at that? Shouldn't
-mstackrealign do the same job without being told what the outside stack
alignment is, or am I misunderstanding it?


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (13 preceding siblings ...)
  2015-10-06 23:09 ` bucaneer at gmail dot com
@ 2015-10-07  6:51 ` ubizjak at gmail dot com
  2015-10-07 10:49 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-07  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Justas L from comment #18)
> Out of curiosity, what could it be that makes -mincoming-stack-boundary=3
> successfully deal with rogue code while -mstackrealign fails at that?
> Shouldn't -mstackrealign do the same job without being told what the outside
> stack alignment is, or am I misunderstanding it?

-mstackrealign conditionally generates realignment prologue, depending on
presence of insns that require 128bit alignment. It looks that heuristics is
not yet fully reliable on x86_64. Bugreports welcome!

-mincoming-stack-boundary=3 and force_align_arg_pointer will always
unconditionally generate realignment prologue
>From gcc-bugs-return-498928-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 07 07:29:11 2015
Return-Path: <gcc-bugs-return-498928-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129774 invoked by alias); 7 Oct 2015 07:29: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 129717 invoked by uid 48); 7 Oct 2015 07:29:07 -0000
From: "chrbr at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67880] New: [ARM] -fno-align-functions does not work for thumb
Date: Wed, 07 Oct 2015 07:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: chrbr 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: ---
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-67880-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-10/txt/msg00483.txt.bz2
Content-length: 669

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

            Bug ID: 67880
           Summary: [ARM] -fno-align-functions does not work for thumb
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chrbr at gcc dot gnu.org
  Target Milestone: ---

void foo()
{
}

compiled with -O2 -mthumb -mno-align-functions

        .text
        .align  2
        .global foo
        .syntax unified
        .code   16
        .thumb_func

is aligned on 4 bytes instead of default required 2 bytes


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (14 preceding siblings ...)
  2015-10-07  6:51 ` ubizjak at gmail dot com
@ 2015-10-07 10:49 ` hjl.tools at gmail dot com
  2015-10-07 12:13 ` bucaneer at gmail dot com
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hjl.tools at gmail dot com @ 2015-10-07 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #19)
> (In reply to Justas L from comment #18)
> > Out of curiosity, what could it be that makes -mincoming-stack-boundary=3
> > successfully deal with rogue code while -mstackrealign fails at that?
> > Shouldn't -mstackrealign do the same job without being told what the outside
> > stack alignment is, or am I misunderstanding it?
> 
> -mstackrealign conditionally generates realignment prologue, depending on
> presence of insns that require 128bit alignment. It looks that heuristics is
> not yet fully reliable on x86_64. Bugreports welcome!

-mstackrealign works correctly as designed on x86-64.  The
issue is MIN_STACK_BOUNDARY.  When MIN_STACK_BOUNDARY is 128,
you don't need to realign the stack if you only need 128-bit
stack alignment.
>From gcc-bugs-return-498950-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 07 10:59:24 2015
Return-Path: <gcc-bugs-return-498950-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2531 invoked by alias); 7 Oct 2015 10:59:24 -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 2473 invoked by uid 55); 7 Oct 2015 10:59:19 -0000
From: "vehre at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/65889] [6 Regressions] [OOP] ICE with sizeof a polymorphic variable.
Date: Wed, 07 Oct 2015 10:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vehre at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: vehre at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65889-4-NDBwAxWxCK@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65889-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65889-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-10/txt/msg00505.txt.bz2
Content-length: 793

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

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Oct  7 10:58:46 2015
New Revision: 228566

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

2015-10-07  Andre Vehreschild  <vehre@gcc.gnu.org>

        PR fortran/65889
        * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle pointer to and
        on stack class objects as sizeof parameter.

gcc/testsuite/ChangeLog:

2015-10-07  Andre Vehreschild  <vehre@gcc.gnu.org>

        PR fortran/65889
        * gfortran.dg/sizeof_5.f90: New test.



Added:
    trunk/gcc/testsuite/gfortran.dg/sizeof_5.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (15 preceding siblings ...)
  2015-10-07 10:49 ` hjl.tools at gmail dot com
@ 2015-10-07 12:13 ` bucaneer at gmail dot com
  2015-10-07 12:17 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: bucaneer at gmail dot com @ 2015-10-07 12:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Justas L <bucaneer at gmail dot com> ---
(In reply to H.J. Lu from comment #20)
> -mstackrealign works correctly as designed on x86-64.  The
> issue is MIN_STACK_BOUNDARY.  When MIN_STACK_BOUNDARY is 128,
> you don't need to realign the stack if you only need 128-bit
> stack alignment.

When is MIN_STACK_BOUNDARY equal to 128? I thought it defaulted to 64 (8*8) for
x86_64 and 32 (4*8) for x86, no?


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (16 preceding siblings ...)
  2015-10-07 12:13 ` bucaneer at gmail dot com
@ 2015-10-07 12:17 ` hjl.tools at gmail dot com
  2015-10-07 12:21 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: hjl.tools at gmail dot com @ 2015-10-07 12:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Justas L from comment #21)
> When is MIN_STACK_BOUNDARY equal to 128? I thought it defaulted to 64 (8*8)
> for x86_64 and 32 (4*8) for x86, no?

i386.h has

* Minimum stack boundary.  */
#define MIN_STACK_BOUNDARY (TARGET_64BIT ? (TARGET_SSE ? 128 : 64) : 32)


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (17 preceding siblings ...)
  2015-10-07 12:17 ` hjl.tools at gmail dot com
@ 2015-10-07 12:21 ` ubizjak at gmail dot com
  2015-10-07 17:42 ` uros at gcc dot gnu.org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-07 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

> i386.h has
> 
> * Minimum stack boundary.  */
> #define MIN_STACK_BOUNDARY (TARGET_64BIT ? (TARGET_SSE ? 128 : 64) : 32)

But the patch changes this definition to:

 /* Minimum stack boundary.  */
-#define MIN_STACK_BOUNDARY (TARGET_64BIT ? (TARGET_SSE ? 128 : 64) : 32)
+#define MIN_STACK_BOUNDARY BITS_PER_WORD

So, we do have minimum stack boundary set to 64 bits in patched gcc.
>From gcc-bugs-return-498956-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 07 12:25:33 2015
Return-Path: <gcc-bugs-return-498956-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 47948 invoked by alias); 7 Oct 2015 12:25:33 -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 47013 invoked by uid 48); 7 Oct 2015 12:25:29 -0000
From: "bucaneer at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
Date: Wed, 07 Oct 2015 12:25: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: bucaneer 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66697-4-sdY4mOsyNk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66697-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66697-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-10/txt/msg00511.txt.bz2
Content-length: 191

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

--- Comment #24 from Justas L <bucaneer at gmail dot com> ---
Oh, OK. I was looking at the patched code and forgot that part was patched.


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (18 preceding siblings ...)
  2015-10-07 12:21 ` ubizjak at gmail dot com
@ 2015-10-07 17:42 ` uros at gcc dot gnu.org
  2015-10-12 16:30 ` uros at gcc dot gnu.org
  2015-10-12 16:42 ` ubizjak at gmail dot com
  21 siblings, 0 replies; 23+ messages in thread
From: uros at gcc dot gnu.org @ 2015-10-07 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed Oct  7 17:42:09 2015
New Revision: 228577

URL: https://gcc.gnu.org/viewcvs?rev=228577&root=gcc&view=rev
Log:
        PR target/66697
        * config/i386/i386.c (ix86_option_override_internal): Always use
        8-byte minimum stack boundary in 64-bit mode.
        (ix86_compute_frame_layout): Remove assert on INCOMING_STACK_BOUNDARY.
        (ix86_emit_save_reg_using_mov): Support unaligned SSE store.
        Add a REG_CFA_EXPRESSION note if needed.
        (ix86_emit_restore_sse_regs_using_mov): Support unaligned SSE load.
        (ix86_handle_force_align_arg_pointer_attribute): New.
        (ix86_minimum_incoming_stack_boundary): Remove TARGET_64BIT check.
        (ix86_attribute_table): Set ix86_force_align_arg_pointer_string
        with ix86_handle_force_align_arg_pointer_attribute.
        * config/i386/i386.h (MIN_STACK_BOUNDARY): Set to BITS_PER_WORD.

testsuite/ChangeLog:

        PR target/66697
        * gcc.target/i386/20060512-1.c: Remove ia32 requirement.
        (PUSH, POP): New defines.
        (sse2_test): Use PUSH and POP to misalign runtime stack.
        * gcc.target/i386/20060512-2.c: Remove ia32 requirement.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/20060512-1.c
    trunk/gcc/testsuite/gcc.target/i386/20060512-2.c


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (19 preceding siblings ...)
  2015-10-07 17:42 ` uros at gcc dot gnu.org
@ 2015-10-12 16:30 ` uros at gcc dot gnu.org
  2015-10-12 16:42 ` ubizjak at gmail dot com
  21 siblings, 0 replies; 23+ messages in thread
From: uros at gcc dot gnu.org @ 2015-10-12 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Oct 12 16:29:37 2015
New Revision: 228728

URL: https://gcc.gnu.org/viewcvs?rev=228728&root=gcc&view=rev
Log:
        Backport from mainline
        2015-10-08  H.J. Lu  <hongjiu.lu@intel.com>

        * config/i386/i386.c (ix86_compute_frame_layout): Round up the
        SSE register save area to 16 bytes only if the incoming stack
        boundary is no less than 16 bytes.

        Backport from mainline
        2015-10-07  Uros Bizjak  <ubizjak@gmail.com>

        PR target/66697
        * config/i386/i386.c (ix86_option_override_internal): Always use
        8-byte minimum stack boundary in 64-bit mode.
        (ix86_compute_frame_layout): Remove assert on INCOMING_STACK_BOUNDARY.
        (ix86_emit_save_reg_using_mov): Support unaligned SSE store.
        Add a REG_CFA_EXPRESSION note if needed.
        (ix86_emit_restore_sse_regs_using_mov): Support unaligned SSE load.
        (ix86_handle_force_align_arg_pointer_attribute): New.
        (ix86_minimum_incoming_stack_boundary): Remove TARGET_64BIT check.
        (ix86_attribute_table): Set ix86_force_align_arg_pointer_string
        with ix86_handle_force_align_arg_pointer_attribute.
        * config/i386/i386.h (MIN_STACK_BOUNDARY): Set to BITS_PER_WORD.

testsuite/ChangeLog:

        Backport from mainline
        2015-10-07  Uros Bizjak  <ubizjak@gmail.com>

        PR target/66697
        * gcc.target/i386/20060512-1.c: Remove ia32 requirement.
        (PUSH, POP): New defines.
        (sse2_test): Use PUSH and POP to misalign runtime stack.
        * gcc.target/i386/20060512-2.c: Remove ia32 requirement.


Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/config/i386/i386.c
    branches/gcc-5-branch/gcc/config/i386/i386.h
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/20060512-1.c
    branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/20060512-2.c


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

* [Bug target/66697] Feature request: -mstackrealign and force_align_arg_pointer for x86_64
  2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
                   ` (20 preceding siblings ...)
  2015-10-12 16:30 ` uros at gcc dot gnu.org
@ 2015-10-12 16:42 ` ubizjak at gmail dot com
  21 siblings, 0 replies; 23+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-12 16:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #29 from Uroš Bizjak <ubizjak at gmail dot com> ---
Backported to gcc-5 branch.
>From gcc-bugs-return-499352-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 12 16:44:06 2015
Return-Path: <gcc-bugs-return-499352-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57982 invoked by alias); 12 Oct 2015 16:44:06 -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 57323 invoked by uid 48); 12 Oct 2015 16:43:59 -0000
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67939] New: ICE on using data with negative substring range
Date: Mon, 12 Oct 2015 16:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.2.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-67939-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-10/txt/msg00907.txt.bz2
Content-length: 1648

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

            Bug ID: 67939
           Summary: ICE on using data with negative substring range
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

Depending on compiler options the following codes
show different reactions (sometimes with hanging process).
Depending on environment settings too (e.g. $LANG, $LC_ALL).
All suffer from a negative substring-range (length < -1).


$ cat z1.f90
program p
   character(100) :: x
   data x(998:99) /'ab'/
end


$ cat z2.f90
program p
   character(2) :: x
   data x(:-1) /'ab'/
end


$ gfortran -c z1.f90
z1.f90:3:20:

    data x(998:99) /'ab'/
                    1
Warning: Initialization string starting at (1) was truncated to fit the
variable (-898/2)
f951: internal compiler error: Segmentation fault


$ gfortran -c z2.f90
z2.f90:3:17:

    data x(:-1) /'ab'/
                 1
Warning: Initialization string starting at (1) was truncated to fit the
variable (-1/2)
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/5/f951': malloc(): memory
corruption (fast): 0x0000000001c03420 ***


$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize -c z2.f90
z2.f90:3:17:

    data x(:-1) /'ab'/
                 1
Warning: Initialization string starting at (1) was truncated to fit the
variable (-1/2)
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/5/f951': corrupted double-linked
list: 0x00000000036d5db0 ***


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

end of thread, other threads:[~2015-10-12 16:42 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 20:03 [Bug target/66697] New: Feature request: -mstackrealign and force_align_arg_pointer for x86_64 bucaneer at gmail dot com
2015-09-29  4:26 ` [Bug target/66697] " austinenglish at gmail dot com
2015-10-04 15:29 ` ubizjak at gmail dot com
2015-10-04 21:23 ` bucaneer at gmail dot com
2015-10-05  9:08 ` ubizjak at gmail dot com
2015-10-05 17:40 ` ubizjak at gmail dot com
2015-10-05 19:55 ` bucaneer at gmail dot com
2015-10-06  6:40 ` ubizjak at gmail dot com
2015-10-06  9:21 ` ubizjak at gmail dot com
2015-10-06 12:33 ` bucaneer at gmail dot com
2015-10-06 13:45 ` ubizjak at gmail dot com
2015-10-06 16:38 ` bucaneer at gmail dot com
2015-10-06 16:42 ` ubizjak at gmail dot com
2015-10-06 16:53 ` ubizjak at gmail dot com
2015-10-06 23:09 ` bucaneer at gmail dot com
2015-10-07  6:51 ` ubizjak at gmail dot com
2015-10-07 10:49 ` hjl.tools at gmail dot com
2015-10-07 12:13 ` bucaneer at gmail dot com
2015-10-07 12:17 ` hjl.tools at gmail dot com
2015-10-07 12:21 ` ubizjak at gmail dot com
2015-10-07 17:42 ` uros at gcc dot gnu.org
2015-10-12 16:30 ` uros at gcc dot gnu.org
2015-10-12 16:42 ` ubizjak 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).