public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99234] [10/11 regression] wrong result for 1.0/3.0 with -O2 -fno-omit-frame-pointer -frounding-math
Date: Wed, 05 May 2021 20:56:54 +0000	[thread overview]
Message-ID: <bug-99234-4-BclF2Roc0R@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99234-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #28 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:e9a8d6852c966e0511f2cfe40224fd81cbeaae24

commit r11-8358-ge9a8d6852c966e0511f2cfe40224fd81cbeaae24
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Wed May 5 22:48:51 2021 +0200

    Fix PR target/100402

    This is a regression for 64-bit Windows present from mainline down to the 9
    branch and introduced by the fix for PR target/99234.  Again SEH, but with
    a twist related to the way MinGW implements setjmp/longjmp, which turns out
    to be piggybacked on SEH with recent versions of MinGW, i.e. the longjmp
    performs a bona-fide unwinding of the stack, because it calls RtlUnwindEx
    with the second argument initially passed to setjmp, which is the result of
    __builtin_frame_address (0) in the MinGW header file:

      define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))

    This means that we directly expose the frame pointer to the SEH machinery
    here (unlike with regular exception handling where we use an intermediate
    CFA) and thus that we cannot do whatever we want with it.  The old code
    would leave it unaligned, i.e. not multiple of 16, whereas the new code
    aligns it, but this breaks for some reason; at least it appears that a
    .seh_setframe directive with 0 as second argument always works, so the
    fix aligns it this way.

    gcc/
            PR target/100402
            * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
            always return the establisher frame for __builtin_frame_address
(0).
    gcc/testsuite/
            * gcc.c-torture/execute/20210505-1.c: New test.

  parent reply	other threads:[~2021-05-05 20:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  1:07 [Bug c++/99234] New: Regression: wrong result for 1.0/3.0 when -fno-omit-frame-pointer -frounding-math used together vz-gcc at zeitlins dot org
2021-02-24 15:54 ` [Bug target/99234] " jakub at gcc dot gnu.org
2021-02-24 16:19 ` vz-gcc at zeitlins dot org
2021-02-24 16:19 ` vz-gcc at zeitlins dot org
2021-02-24 16:23 ` vz-gcc at zeitlins dot org
2021-02-24 16:25 ` vz-gcc at zeitlins dot org
2021-02-25  8:56 ` jakub at gcc dot gnu.org
2021-02-25  9:34 ` ebotcazou at gcc dot gnu.org
2021-02-25  9:36 ` [Bug target/99234] [10/11 regression] wrong result for 1.0/3.0 with -O2 -fno-omit-frame-pointer -frounding-math ebotcazou at gcc dot gnu.org
2021-02-25  9:36 ` ebotcazou at gcc dot gnu.org
2021-02-25 12:07 ` jyong at gcc dot gnu.org
2021-02-25 12:35 ` ebotcazou at gcc dot gnu.org
2021-02-25 14:25 ` lh_mouse at 126 dot com
2021-02-25 18:18 ` ebotcazou at gcc dot gnu.org
2021-02-26  0:36 ` ebotcazou at gcc dot gnu.org
2021-02-26  6:00 ` lh_mouse at 126 dot com
2021-02-26  8:27 ` lh_mouse at 126 dot com
2021-02-26  9:17 ` ebotcazou at gcc dot gnu.org
2021-02-26 10:18 ` jakub at gcc dot gnu.org
2021-02-26 11:04 ` lh_mouse at 126 dot com
2021-03-01  6:59 ` cvs-commit at gcc dot gnu.org
2021-03-01  7:00 ` cvs-commit at gcc dot gnu.org
2021-03-01  7:12 ` cvs-commit at gcc dot gnu.org
2021-03-01  7:13 ` ebotcazou at gcc dot gnu.org
2021-03-01 11:49 ` vz-gcc at zeitlins dot org
2021-03-03 11:30 ` cvs-commit at gcc dot gnu.org
2021-03-03 11:31 ` cvs-commit at gcc dot gnu.org
2021-03-03 11:34 ` cvs-commit at gcc dot gnu.org
2021-05-05 20:55 ` cvs-commit at gcc dot gnu.org
2021-05-05 20:56 ` cvs-commit at gcc dot gnu.org [this message]
2021-05-05 20:58 ` cvs-commit at gcc dot gnu.org
2021-05-05 21:01 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99234-4-BclF2Roc0R@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).