public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
@ 2023-08-18 20:23 dcb314 at hotmail dot com
  2023-08-18 20:27 ` [Bug tree-optimization/111070] [14 Regregression] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2023-08-18 20:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111070
           Summary: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

$ ~/gcc/results/bin/gcc -c -w -O1 ./gcc.target/tic6x/abi-align-1.c
during GIMPLE pass: ifcombine
./gcc.target/tic6x/abi-align-1.c: In function ‘main’:
./gcc.target/tic6x/abi-align-1.c:12:5: internal compiler error: tree check:
expected ssa_name, have addr_expr in ifcombine_ifandif, at
tree-ssa-ifcombine.cc:492
   12 | int main ()
      |     ^~~~
0x117a512 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../trunk.year/gcc/tree.cc:8899
0xfbfefd ifcombine_ifandif(basic_block_def*, bool, basic_block_def*, bool,
bool)
        ../../trunk.year/gcc/tree-ssa-ifcombine.cc:0

$ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb38/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb38/gcc/results.20230818.asan.ubsan/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk.year/configure
--prefix=/home/dcb38/gcc/results.20230818.asan.ubsan --disable-multilib
--disable-bootstrap --with-build-config=bootstrap-asan
--with-build-config=bootstrap-ubsan --with-pkgversion=68f7cb6cf9e8b9f2
--enable-checking=df,extra,fold,rtl,yes --enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230818 (experimental) (68f7cb6cf9e8b9f2) 
testsuite $

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
@ 2023-08-18 20:27 ` pinskia at gcc dot gnu.org
  2023-08-19  7:49 ` dcb314 at hotmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-18 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
  2023-08-18 20:27 ` [Bug tree-optimization/111070] [14 Regregression] " pinskia at gcc dot gnu.org
@ 2023-08-19  7:49 ` dcb314 at hotmail dot com
  2023-08-20  7:39 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2023-08-19  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
This seems to break sometime between g:93f803d53b5ccaab and g:68f7cb6cf9e8b9f2,
some 39 commits.

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
  2023-08-18 20:27 ` [Bug tree-optimization/111070] [14 Regregression] " pinskia at gcc dot gnu.org
  2023-08-19  7:49 ` dcb314 at hotmail dot com
@ 2023-08-20  7:39 ` pinskia at gcc dot gnu.org
  2023-08-20  7:42 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-20  7:39 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-08-20
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase for easy access:
```
/* common */
char c;
/* arrays must be 8 byte aligned, regardless of size */
char c_ary[1];

/* data */
char d = 1;
char d_ary[1] = {1};

int main ()
{
  if (((unsigned long)&c_ary[0] & 7) != 0)
    return 1;
  if (((unsigned long)&d_ary[0] & 7) != 0)
    return 1;
  return 0;
}

```

I am 99% sure it was caused by r14-3288-g482551a79a3d3f .

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2023-08-20  7:39 ` pinskia at gcc dot gnu.org
@ 2023-08-20  7:42 ` pinskia at gcc dot gnu.org
  2023-08-21  6:59 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-20  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In this case name1 and name2 are both ADDR_EXPR rather than SSA_NAMES.
We start with:
```
  <bb 2> [local count: 1073741822]:
  _1 = (long unsigned int) &c_ary[0];
  _2 = _1 & 7;
  if (_2 != 0)
    goto <bb 5>; [34.00%]
  else
    goto <bb 3>; [66.00%]

  <bb 3> [local count: 708669599]:
  _3 = (long unsigned int) &d_ary[0];
  _4 = _3 & 7;
  if (_4 != 0)
```

And ifcombine is trying to optimize it to:
```
  _7 = (unsigned long) &d_ary[0];
  _8 = (unsigned long) &c_ary[0];
  _9 = _7 | _8;
  _10 = _9 & 7;
  if (_10 != 0)
```

Which is what GCC 13 did.

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2023-08-20  7:42 ` pinskia at gcc dot gnu.org
@ 2023-08-21  6:59 ` rguenth at gcc dot gnu.org
  2023-08-21  8:00 ` dcb314 at hotmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-21  6:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
            Version|unknown                     |14.0

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2023-08-21  6:59 ` rguenth at gcc dot gnu.org
@ 2023-08-21  8:00 ` dcb314 at hotmail dot com
  2023-08-21  8:09 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2023-08-21  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Also breaks the linux kernel, so more serious than I thought:

drivers/spi/spi-aspeed-smc.c:181:12: internal compiler error: tree check:
expected ssa_name, have addr_expr in ifcombine_ifandif, at
tree-ssa-ifcombine.cc:492

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2023-08-21  8:00 ` dcb314 at hotmail dot com
@ 2023-08-21  8:09 ` cvs-commit at gcc dot gnu.org
  2023-08-21  8:09 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-21  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:966b0a96523fb7adbf498ac71df5e033c70dc546

commit r14-3351-g966b0a96523fb7adbf498ac71df5e033c70dc546
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Aug 21 09:01:00 2023 +0200

    tree-optimization/111070 - fix ICE with recent ifcombine fix

    We now got test coverage for non-SSA name bits so the following amends
    the SSA_NAME_OCCURS_IN_ABNORMAL_PHI checks.

            PR tree-optimization/111070
            * tree-ssa-ifcombine.cc (ifcombine_ifandif): Check we have
            an SSA name before checking SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

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

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2023-08-21  8:09 ` cvs-commit at gcc dot gnu.org
@ 2023-08-21  8:09 ` rguenth at gcc dot gnu.org
  2023-08-24 10:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-21  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.  Sorry for the breakage.

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2023-08-21  8:09 ` rguenth at gcc dot gnu.org
@ 2023-08-24 10:56 ` cvs-commit at gcc dot gnu.org
  2024-06-10 14:57 ` pageexec at gmail dot com
  2024-06-11  7:12 ` cvs-commit at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-24 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r13-7755-gad42dcf501e41713047cf6c47cbb1dd9f01088a4
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Aug 21 09:01:00 2023 +0200

    tree-optimization/111070 - fix ICE with recent ifcombine fix

    We now got test coverage for non-SSA name bits so the following amends
    the SSA_NAME_OCCURS_IN_ABNORMAL_PHI checks.

            PR tree-optimization/111070
            * tree-ssa-ifcombine.cc (ifcombine_ifandif): Check we have
            an SSA name before checking SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

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

    (cherry picked from commit 966b0a96523fb7adbf498ac71df5e033c70dc546)

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2023-08-24 10:56 ` cvs-commit at gcc dot gnu.org
@ 2024-06-10 14:57 ` pageexec at gmail dot com
  2024-06-11  7:12 ` cvs-commit at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pageexec at gmail dot com @ 2024-06-10 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

PaX Team <pageexec at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pageexec at gmail dot com

--- Comment #8 from PaX Team <pageexec at gmail dot com> ---
can you please backport this to gcc 12 as well given that the original commit
causing the breakage was also backported
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111039#c6?

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

* [Bug tree-optimization/111070] [14 Regregression] ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1
  2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2024-06-10 14:57 ` pageexec at gmail dot com
@ 2024-06-11  7:12 ` cvs-commit at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-11  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r12-10503-gd73137ab352d654f50b703925bd92e021dce1cab
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Aug 21 09:01:00 2023 +0200

    tree-optimization/111070 - fix ICE with recent ifcombine fix

    We now got test coverage for non-SSA name bits so the following amends
    the SSA_NAME_OCCURS_IN_ABNORMAL_PHI checks.

            PR tree-optimization/111070
            * tree-ssa-ifcombine.cc (ifcombine_ifandif): Check we have
            an SSA name before checking SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

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

    (cherry picked from commit 966b0a96523fb7adbf498ac71df5e033c70dc546)

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

end of thread, other threads:[~2024-06-11  7:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-18 20:23 [Bug c/111070] New: ./gcc.target/tic6x/abi-align-1.c on x86_64 with -O1 dcb314 at hotmail dot com
2023-08-18 20:27 ` [Bug tree-optimization/111070] [14 Regregression] " pinskia at gcc dot gnu.org
2023-08-19  7:49 ` dcb314 at hotmail dot com
2023-08-20  7:39 ` pinskia at gcc dot gnu.org
2023-08-20  7:42 ` pinskia at gcc dot gnu.org
2023-08-21  6:59 ` rguenth at gcc dot gnu.org
2023-08-21  8:00 ` dcb314 at hotmail dot com
2023-08-21  8:09 ` cvs-commit at gcc dot gnu.org
2023-08-21  8:09 ` rguenth at gcc dot gnu.org
2023-08-24 10:56 ` cvs-commit at gcc dot gnu.org
2024-06-10 14:57 ` pageexec at gmail dot com
2024-06-11  7:12 ` 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).