public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
@ 2021-01-14 19:25 danglin at gcc dot gnu.org
  2021-01-21 15:21 ` [Bug other/98689] [11 Regression] " danglin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2021-01-14 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98689
           Summary: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c
                    -O1  execution test
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa*-*-*
            Target: hppa*-*-*
             Build: hppa*-*-*

Created attachment 49967
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49967&action=edit
.s file

Executing on host: /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/objdi
r/gcc/
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/stackalign/builtin-re
turn-1.c    -fdiagnostics-plain-output    -O1    -lm  -o ./builtin-return-1.exe
   (timeout = 300)
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/stackalign/builtin-
return-1.c -fdiagnostics-plain-output -O1 -lm -o ./builtin-return-1.exe
PASS: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  (test for excess
error
s)
Setting LD_LIBRARY_PATH to
:/home/dave/gnu/gcc/objdir/gcc:/home/dave/gnu/gcc/obj
dir/hppa-linux-gnu/./libatomic/.libs::/home/dave/gnu/gcc/objdir/gcc:/home/dave/g
nu/gcc/objdir/hppa-linux-gnu/./libatomic/.libs:/home/dave/gnu/gcc/objdir/hppa-li
nux-gnu/libstdc++-v3/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libssp/.
libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libphobos/src/.libs:/home/dave/gnu
/gcc/objdir/hppa-linux-gnu/libgomp/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gn
u/libatomic/.libs:/home/dave/gnu/gcc/objdir/./gcc:/home/dave/gnu/gcc/objdir/./pr
ev-gcc:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/src/.libs:/home/dav
e/gnu/gcc/objdir/hppa-linux-gnu/libssp/.libs:/home/dave/gnu/gcc/objdir/hppa-linu
x-gnu/libphobos/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgomp/.libs
:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libatomic/.libs:/home/dave/gnu/gcc/obj
dir/./gcc:/home/dave/gnu/gcc/objdir/./prev-gcc
Execution timeout is: 300
spawn [open ...]
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test

Similar fails:
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1 -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2 -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O3 -g  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O3 -g -fpic execution
test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -Os  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -Os -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2 -flto
-flto-partition=none  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2 -flto
-flto-partition=none -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2 -flto  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O2 -flto -fpic execution
test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O0  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O0 -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O1  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O1 -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2 -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O3 -g  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O3 -g -fpic execution
test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -Os  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -Os -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2 -flto
-flto-partition=none  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2 -flto
-flto-partition=none -fpic execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2 -flto  execution test
FAIL: gcc.dg/torture/stackalign/builtin-return-2.c   -O2 -flto -fpic execution
test

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

* [Bug other/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
@ 2021-01-21 15:21 ` danglin at gcc dot gnu.org
  2021-01-23 23:28 ` [Bug middle-end/98689] " danglin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2021-01-21 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FAIL:                       |[11 Regression] FAIL:
                   |gcc.dg/torture/stackalign/b |gcc.dg/torture/stackalign/b
                   |uiltin-return-1.c   -O1     |uiltin-return-1.c   -O1
                   |execution test              |execution test

--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
Revision c4a6b2dadcd:b9a7bc9531b:b5f24739632389d50903bfde6d1bfc06d522c56b was
okay.

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
  2021-01-21 15:21 ` [Bug other/98689] [11 Regression] " danglin at gcc dot gnu.org
@ 2021-01-23 23:28 ` danglin at gcc dot gnu.org
  2021-01-25 13:27 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2021-01-23 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at sources dot redhat.com
          Component|other                       |middle-end

--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
Introduced by the following commit:

commit 0b76990a9d75d97b84014e37519086b81824c307 (HEAD)
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Dec 17 00:15:12 2020 +0000

    fwprop: Rewrite to use RTL SSA

    This patch rewrites fwprop.c to use the RTL SSA framework.  It tries
    as far as possible to mimic the old behaviour, even in caes where
    that doesn't fit naturally with the new framework.  I've added ???
    comments to mark those places, but I think <E2><80><9C>fixing<E2><80><9D>
them should
    be done separately to make bisection easier.

    In particular:

    * The old implementation iterated over uses, and after a successful
      substitution, the new insn's uses were added to the end of the list.
      The pass still processed those uses, but because it processed them at
      the end, it didn't fully optimise one instruction before propagating
      it into the next.

      The new version follows the same approach for comparison purposes,
      but I'd like to drop that as a follow-on patch.

    * The old implementation operated on single use sites (DF_REF_LOCs).
      This doesn't work well for instructions with match_dups, where it's
      necessary to update both an operand and its dups at the same time.
      For example, attempting to substitute into a divmod instruction would
      fail because only the div or the mod side would be updated.

      The new version again follows this to some extent for comparison
      purposes (although not exactly).  Again I'd like to drop it as a
      follow-on patch.

      One difference is that if a register occurs in multiple MEM addresses
      in a set, the new version will try to update them all at once.  This is
      what causes the SVE ACLE st4* output to improve.

    Also, the old version didn't naturally guarantee termination (PR79405),
    whereas the new one does.

    gcc/
            * fwprop.c: Rewrite to use the RTL SSA framework.

    gcc/testsuite/
            * gcc.dg/rtl/x86_64/test-return-const.c.before-fwprop.c: Don't
            expect insn updates to be deferred.
            * gcc.target/aarch64/sve/acle/asm/st4_s8.c: Expect the addition
            to be folded into the address.
            * gcc.target/aarch64/sve/acle/asm/st4_u8.c: Likewise.

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
  2021-01-21 15:21 ` [Bug other/98689] [11 Regression] " danglin at gcc dot gnu.org
  2021-01-23 23:28 ` [Bug middle-end/98689] " danglin at gcc dot gnu.org
@ 2021-01-25 13:27 ` rguenth at gcc dot gnu.org
  2021-02-11 10:49 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-25 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
                 CC|rsandifo at sources dot redhat.com |rsandifo at gcc dot gnu.org

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-01-25 13:27 ` rguenth at gcc dot gnu.org
@ 2021-02-11 10:49 ` jakub at gcc dot gnu.org
  2021-03-06 21:41 ` danglin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-11 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-02-11 10:49 ` jakub at gcc dot gnu.org
@ 2021-03-06 21:41 ` danglin at gcc dot gnu.org
  2021-03-30 12:10 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2021-03-06 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 50320
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50320&action=edit
.s diff to gcc10 .s

The following code is wrong in gcc-11:

-       ldw 12(%r3),%r28
+       ldw 12(%r3),%r5
+       copy %r5,%r28
        bl foo,%r2
        ldo 64(%r3),%r4
-       stw %r28,0(%r4)
+       stw %r5,0(%r4)

In gcc-10, the return value from foo is stored in 0(%r4).

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-03-06 21:41 ` danglin at gcc dot gnu.org
@ 2021-03-30 12:10 ` rsandifo at gcc dot gnu.org
  2021-04-16 11:38 ` cvs-commit at gcc dot gnu.org
  2021-04-16 11:41 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-03-30 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org
   Last reconfirmed|                            |2021-03-30
     Ever confirmed|0                           |1

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-03-30 12:10 ` rsandifo at gcc dot gnu.org
@ 2021-04-16 11:38 ` cvs-commit at gcc dot gnu.org
  2021-04-16 11:41 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-16 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:49e651990a6966936a0273138dd56ac394e57b16

commit r11-8214-g49e651990a6966936a0273138dd56ac394e57b16
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Apr 16 12:38:02 2021 +0100

    Mark untyped calls and handle them specially [PR98689]

    This patch fixes a regression introduced by the rtl-ssa patches.
    It was seen on HPPA but it might be latent elsewhere.

    The problem is that the traditional way of expanding an untyped_call
    is to emit sequences like:

       (call (mem (symbol_ref "foo")))
       (set (reg pseudo1) (reg result1))
       ...
       (set (reg pseudon) (reg resultn))

    The ABI specifies that result1..resultn are clobbered by the call but
    nothing in the RTL indicates that result1..resultn are the results
    of the call.  Normally, using a clobbered value gives undefined results,
    but in this case the results are well-defined and matter for correctness.

    This seems like a niche case, so I think it would be better to mark
    it explicitly rather than try to detect it heuristically.

    Note that in expand_builtin_apply we already have an rtx_insn *,
    so it doesn't matter whether we call emit_call_insn or emit_insn.
    Calling emit_insn seems more natural now that the gen_* call
    has been split out.  It also matches later code in the function.

    gcc/
            PR rtl-optimization/98689
            * reg-notes.def (UNTYPED_CALL): New note.
            * combine.c (distribute_notes): Handle it.
            * emit-rtl.c (try_split): Likewise.
            * rtlanal.c (rtx_properties::try_to_add_insn): Likewise.  Assume
            that calls with the note implicitly set all return value registers.
            * builtins.c (expand_builtin_apply): Add a REG_UNTYPED_CALL
            to untyped_calls.

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

* [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
  2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-04-16 11:38 ` cvs-commit at gcc dot gnu.org
@ 2021-04-16 11:41 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-16 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

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

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Finally fixed, sorry for the long delay.

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

end of thread, other threads:[~2021-04-16 11:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 19:25 [Bug other/98689] New: FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -O1 execution test danglin at gcc dot gnu.org
2021-01-21 15:21 ` [Bug other/98689] [11 Regression] " danglin at gcc dot gnu.org
2021-01-23 23:28 ` [Bug middle-end/98689] " danglin at gcc dot gnu.org
2021-01-25 13:27 ` rguenth at gcc dot gnu.org
2021-02-11 10:49 ` jakub at gcc dot gnu.org
2021-03-06 21:41 ` danglin at gcc dot gnu.org
2021-03-30 12:10 ` rsandifo at gcc dot gnu.org
2021-04-16 11:38 ` cvs-commit at gcc dot gnu.org
2021-04-16 11:41 ` rsandifo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).