public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
@ 2021-10-21 17:35 seurer at gcc dot gnu.org
  2021-10-22  6:25 ` [Bug testsuite/102886] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-10-21 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102886
           Summary: [12 regression] gcc.dg/tree-ssa/sra-18.c fails
                    starting with r12-4607
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:701ee067807b80957c65bd7ff94b6099a27181de, r12-4607

make  -k check-gcc RUNTESTFLAGS="tree-ssa.exp=gcc.dg/tree-ssa/sra-18.c"
FAIL: gcc.dg/tree-ssa/sra-18.c scan-tree-dump-times esra "Removing load: a =
\\*.?L.?C.?.?.?0;" 1
FAIL: gcc.dg/tree-ssa/sra-18.c scan-tree-dump-times esra "SR[.$][0-9_]+ =
\\*.?L.?C.?.?.?0\\.b\\[0\\]\\.f\\[0\\]\\.x" 1
FAIL: gcc.dg/tree-ssa/sra-18.c scan-tree-dump-times esra "SR[.$][0-9_]+ =
\\*.?L.?C.?.?.?0\\.b\\[0\\]\\.f\\[1\\]\\.x" 1
FAIL: gcc.dg/tree-ssa/sra-18.c scan-tree-dump-times esra "SR[.$][0-9_]+ =
\\*.?L.?C.?.?.?0\\.b\\[1\\]\\.f\\[0\\]\\.x" 1
FAIL: gcc.dg/tree-ssa/sra-18.c scan-tree-dump-times esra "SR[.$][0-9_]+ =
\\*.?L.?C.?.?.?0\\.b\\[1\\]\\.f\\[1\\]\\.x" 1
# of expected passes            2
# of unexpected failures        5


commit 701ee067807b80957c65bd7ff94b6099a27181de (HEAD, refs/bisect/bad)
Author: Martin Jambor <mjambor@suse.cz>
Date:   Thu Oct 21 14:26:45 2021 +0200

    sra: Fix corner case of total scalarization with virtual inheritance (PR
102505)

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

* [Bug testsuite/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
@ 2021-10-22  6:25 ` rguenth at gcc dot gnu.org
  2021-10-22 13:03 ` jamborm at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-22  6:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Keywords|                            |missed-optimization

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

* [Bug testsuite/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
  2021-10-22  6:25 ` [Bug testsuite/102886] " rguenth at gcc dot gnu.org
@ 2021-10-22 13:03 ` jamborm at gcc dot gnu.org
  2021-10-22 18:07 ` [Bug tree-optimization/102886] " jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-10-22 13:03 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-22
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Oh, stupid me... mine.

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

* [Bug tree-optimization/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
  2021-10-22  6:25 ` [Bug testsuite/102886] " rguenth at gcc dot gnu.org
  2021-10-22 13:03 ` jamborm at gcc dot gnu.org
@ 2021-10-22 18:07 ` jamborm at gcc dot gnu.org
  2021-10-25 13:27 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-10-22 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I posted a fix on the mailing list:
https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582380.html

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

* [Bug tree-optimization/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-22 18:07 ` [Bug tree-optimization/102886] " jamborm at gcc dot gnu.org
@ 2021-10-25 13:27 ` cvs-commit at gcc dot gnu.org
  2021-10-25 13:27 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-25 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

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

commit r12-4662-gf217e87972a2a207e793101fc05cfc9dd095c678
Author: Martin Jambor <mjambor@suse.cz>
Date:   Mon Oct 25 15:22:06 2021 +0200

    sra: Fix the fix for PR 102505 (PR 102886)

    I was not careful with the fix for PR 102505 and did not craft the
    check to satisfy the verifier carefully, which lead to PR 102886.
    (The verifier has the test structured differently and somewhat
    redundantly, so I could not just copy it).

    This patch fixes it.  I hope it is quite obvious correction of an
    oversight and so will commit it if survives bootstrap and testing on
    x86_64-linux and ppc64le-linux.

    Testcase for this bug is gcc.dg/tree-ssa/sra-18.c (but only on
    platforms with constant pools).  I will backport the two fixes
    to the release branches squashed.

    gcc/ChangeLog:

    2021-10-22  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102886
            * tree-sra.c (totally_scalarize_subtree): Fix the out of
            access-condition.

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

* [Bug tree-optimization/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-25 13:27 ` cvs-commit at gcc dot gnu.org
@ 2021-10-25 13:27 ` jamborm at gcc dot gnu.org
  2021-10-27 17:17 ` cvs-commit at gcc dot gnu.org
  2021-11-02 10:19 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-10-25 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

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

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed.  Sorry for the breakage and thanks for reporting.

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

* [Bug tree-optimization/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-10-25 13:27 ` jamborm at gcc dot gnu.org
@ 2021-10-27 17:17 ` cvs-commit at gcc dot gnu.org
  2021-11-02 10:19 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-27 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:97cebda80d367737c0b25909af8063b63166e00b

commit r11-9189-g97cebda80d367737c0b25909af8063b63166e00b
Author: Martin Jambor <mjambor@suse.cz>
Date:   Wed Oct 27 19:15:33 2021 +0200

    sra: Fix corner case of total scalarization with virtual inheritance (PR
102505)

    PR 102505 is a situation where of SRA takes its initial top-level
    access size from a get_ref_base_and_extent called on a COMPONENT_REF,
    and thus derived frm the FIELD_DECL, which however does not include a
    virtual base.  Total scalarization then goes on traversing the type,
    which however has virtual base past the non-virtual bits, tricking SRA
    to create sub-accesses outside of the supposedly encompassing
    accesses, which in turn triggers the verifier within the pass.

    The patch below fixes that by failing total scalarization when this
    situation is detected.

    This backport also has commit f217e87972a2a207e793101fc05cfc9dd095c678
    squashed into it in order to avoid PR 102886 that the fix introduced
    on trunk.

    gcc/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * tree-sra.c (totally_scalarize_subtree): Check that the
            encountered field fits within the acces we would like to put it
            in.

    gcc/testsuite/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * g++.dg/torture/pr102505.C: New test.

    (cherry picked from commit 701ee067807b80957c65bd7ff94b6099a27181de)

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

* [Bug tree-optimization/102886] [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607
  2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-10-27 17:17 ` cvs-commit at gcc dot gnu.org
@ 2021-11-02 10:19 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-02 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:7d398e42d3d4ded84cb7a86396c75c5aaf518283

commit r10-10249-g7d398e42d3d4ded84cb7a86396c75c5aaf518283
Author: Martin Jambor <mjambor@suse.cz>
Date:   Tue Nov 2 11:17:51 2021 +0100

    sra: Fix corner case of total scalarization with virtual inheritance (PR
102505)

    PR 102505 is a situation where of SRA takes its initial top-level
    access size from a get_ref_base_and_extent called on a COMPONENT_REF,
    and thus derived frm the FIELD_DECL, which however does not include a
    virtual base.  Total scalarization then goes on traversing the type,
    which however has virtual base past the non-virtual bits, tricking SRA
    to create sub-accesses outside of the supposedly encompassing
    accesses, which in turn triggers the verifier within the pass.

    The patch below fixes that by failing total scalarization when this
    situation is detected.

    This backport also has commit f217e87972a2a207e793101fc05cfc9dd095c678
    squashed into it in order to avoid PR 102886 that the fix introduced
    on trunk.

    gcc/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * tree-sra.c (totally_scalarize_subtree): Check that the
            encountered field fits within the acces we would like to put it
            in.

    gcc/testsuite/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * g++.dg/torture/pr102505.C: New test.

    (cherry picked from commit 701ee067807b80957c65bd7ff94b6099a27181de)

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

end of thread, other threads:[~2021-11-02 10:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 17:35 [Bug testsuite/102886] New: [12 regression] gcc.dg/tree-ssa/sra-18.c fails starting with r12-4607 seurer at gcc dot gnu.org
2021-10-22  6:25 ` [Bug testsuite/102886] " rguenth at gcc dot gnu.org
2021-10-22 13:03 ` jamborm at gcc dot gnu.org
2021-10-22 18:07 ` [Bug tree-optimization/102886] " jamborm at gcc dot gnu.org
2021-10-25 13:27 ` cvs-commit at gcc dot gnu.org
2021-10-25 13:27 ` jamborm at gcc dot gnu.org
2021-10-27 17:17 ` cvs-commit at gcc dot gnu.org
2021-11-02 10:19 ` cvs-commit 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).