public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
@ 2024-07-16  9:37 doko at gcc dot gnu.org
  2024-07-16 10:47 ` [Bug bootstrap/115951] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-07-16  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115951
           Summary: [15 Regression] pgo+lto enabled bootstrap fails
                    building gnat (ICE in fold_stmt, at
                    gimple-range-fold.cc:701)
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen on the trunk, targeting linux, architecture doesn't matter. probably seen
for the first time in early June.

this is a pgo+lto enabled bootstrap

during GIMPLE pass: vrp
../../src/gcc/ada/bindo-graphs.adb: In function
'bindo__graphs__library_graphs__find_components':
../../src/gcc/ada/bindo-graphs.adb:1842:7: internal compiler error: in
fold_stmt, at gimple-range-fold.cc:701
 1842 |       procedure Find_Components (G : Library_Graph) is
      |       ^
0x2a56b80 internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:491
0xdf7f01 fancy_abort(char const*, int, char const*)
        ../../src/gcc/diagnostic.cc:1725
0xdb4402 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*)
        ../../src/gcc/gimple-range-fold.cc:701
0x27f71cd gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
        ../../src/gcc/gimple-range.cc:277
0x27f71cd gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        ../../src/gcc/gimple-range.cc:338
0x17edc32 range_query::value_of_stmt(gimple*, tree_node*)
        ../../src/gcc/value-query.cc:133
0x1652f8f substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        ../../src/gcc/tree-ssa-propagate.cc:824
0x2796e7e dom_walker::walk(basic_block_def*)
        ../../src/gcc/domwalk.cc:311
0x1651f65 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        ../../src/gcc/tree-ssa-propagate.cc:1007
0x17b1770 execute_ranger_vrp(function*, bool)
        ../../src/gcc/tree-vrp.cc:1099
0x17b64ee execute
        ../../src/gcc/tree-vrp.cc:1347
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
make[6]: *** [/tmp/ccCo9h2R.mk:14: /tmp/ccibijV1.ltrans6.ltrans.o] Error 1
lto-wrapper: fatal error: /usr/bin/make returned 2 exit status
compilation terminated.
/usr/bin/x86_64-linux-gnu-ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[5]: *** [../../src/gcc/ada/gcc-interface/Make-lang.in:769: gnatbind] Error
1
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/gcc'
make[4]: *** [Makefile:5307: all-stagefeedback-gcc] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: *** [Makefile:33241: stagefeedback-bubble] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[2]: *** [Makefile:33272: profiledbootstrap-lean] Error 2


configured with
        --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust
         --prefix=/usr/lib/gcc-snapshot
         --with-gcc-major-version-only
         --program-prefix=
         --enable-shared
         --enable-linker-build-id
         --disable-nls
         --enable-bootstrap
         --enable-clocale=gnu
         --enable-libstdcxx-debug
         --enable-libstdcxx-time=yes
         --with-default-libstdcxx-abi=new
         --enable-libstdcxx-backtrace
         --enable-gnu-unique-object
         --disable-vtable-verify
         --enable-plugin
         --with-system-zlib
         --enable-libphobos-checking=release
         --with-target-system-zlib=auto
         --enable-objc-gc=auto
         --enable-multiarch
         --disable-werror
         --enable-cet
         --with-arch-32=i686
         --with-abi=m64
         --with-multilib-list=m32,m64,mx32
         --enable-multilib
         --with-tune=generic
        
--enable-offload-targets=nvptx-none=/<<PKGBUILDDIR>>/debian/tmp-nvptx/usr/lib/gcc-snapshot,amdgcn-amdhsa=/<<PKGBUILDDIR>>/debian/tmp-gcn/usr/lib/gcc-snapshot
         --enable-offload-defaulted
         --without-cuda-driver
         --enable-checking=yes,extra,rtl
         --build=x86_64-linux-gnu
         --host=x86_64-linux-gnu
         --target=x86_64-linux-gnu
         --with-build-config=bootstrap-lto-lean
         --enable-link-serialization=2

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
@ 2024-07-16 10:47 ` rguenth at gcc dot gnu.org
  2024-07-16 11:21 ` arsen at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-07-16 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |85316
   Target Milestone|---                         |15.0
           Keywords|                            |build, ice-on-valid-code,
                   |                            |needs-reduction
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |amacleod at redhat dot com

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It might also fail on the GCC 14 branch when checking is enabled since this is

  // We sometimes get compatible types copied from operands, make sure
  // the correct type is being returned.
  if (name && TREE_TYPE (name) != r.type ()) 
    {
      gcc_checking_assert (range_compatible_p (r.type (), TREE_TYPE (name)));


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
  2024-07-16 10:47 ` [Bug bootstrap/115951] " rguenth at gcc dot gnu.org
@ 2024-07-16 11:21 ` arsen at gcc dot gnu.org
  2024-07-16 16:19 ` amacleod at redhat dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-07-16 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

Arsen Arsenović <arsen at gcc dot gnu.org> changed:

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

--- Comment #2 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
PR115918 possibly related?

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
  2024-07-16 10:47 ` [Bug bootstrap/115951] " rguenth at gcc dot gnu.org
  2024-07-16 11:21 ` arsen at gcc dot gnu.org
@ 2024-07-16 16:19 ` amacleod at redhat dot com
  2024-07-16 23:39 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2024-07-16 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Macleod <amacleod at redhat dot com> ---
I think I have a handle on it. 

The issue is statements like
_80 = _79 == 0

where in ADA a a boolean type is 8 bits and GCC's default boolean type is 1
bit.
All through ranger we use the type of the LHS, but when the pointer operations
were split out for GCC 15 into their own type, we accidentally ended up with
the relational operators using the default boolean type instead of generating a
result with the appropriate type.

Thus for the above statement we were getting a 1 bit boolean for the RHS and an
8 bit boolean for the LHS, resulting in incompatible ranges (which require
identical precision)

I'll try making those adjustments and see if it bootstraps for me.

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-07-16 16:19 ` amacleod at redhat dot com
@ 2024-07-16 23:39 ` cvs-commit at gcc dot gnu.org
  2024-07-17 10:52 ` doko at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-07-16 23:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>:

https://gcc.gnu.org/g:73a8286d3ae266955fa921da1fa1328a587e7bb7

commit r15-2077-g73a8286d3ae266955fa921da1fa1328a587e7bb7
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Tue Jul 16 12:38:11 2024 -0400

    range-ops should return the requested boolean type.

    The pointer based relation operator's fold_range () routines should
    return a boolean range with the requested type, not the default type.

            PR tree-optimization/115951
            * range-op-ptr.cc (operator_equal::fold_range): Return a boolean
            range with the requested type.
            (operator_not_equal::fold_range): Likewise.
            (operator_lt::fold_range): Likewise.
            (operator_le::fold_range): Likewise.
            (operator_gt::fold_range): Likewise.
            (operator_ge::fold_range): Likewise.

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-07-16 23:39 ` cvs-commit at gcc dot gnu.org
@ 2024-07-17 10:52 ` doko at gcc dot gnu.org
  2024-07-17 19:51 ` arsen at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-07-17 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Matthias Klose <doko at gcc dot gnu.org> ---
a new build survived on x86_64-linux-gnu. will wait on the results on other
architectures.

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-07-17 10:52 ` doko at gcc dot gnu.org
@ 2024-07-17 19:51 ` arsen at gcc dot gnu.org
  2024-07-19  4:43 ` sjames at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-07-17 19:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
*** Bug 115918 has been marked as a duplicate of this bug. ***

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-07-17 19:51 ` arsen at gcc dot gnu.org
@ 2024-07-19  4:43 ` sjames at gcc dot gnu.org
  2024-07-19  9:39 ` doko at gcc dot gnu.org
  2024-07-19  9:41 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-07-19  4:43 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-07-19
           Assignee|unassigned at gcc dot gnu.org      |amacleod at redhat dot com
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
I'll assign to Andrew given he's working on it (although I suspect it is fixed
now).

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-07-19  4:43 ` sjames at gcc dot gnu.org
@ 2024-07-19  9:39 ` doko at gcc dot gnu.org
  2024-07-19  9:41 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-07-19  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Matthias Klose <doko at gcc dot gnu.org> ---
yes, recent bootstraps succeeded on all architectures

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

* [Bug bootstrap/115951] [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701)
  2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-07-19  9:39 ` doko at gcc dot gnu.org
@ 2024-07-19  9:41 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-07-19  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |15.0
                 CC|                            |sjames at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #9 from Sam James <sjames at gcc dot gnu.org> ---
Thanks!

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

end of thread, other threads:[~2024-07-19  9:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-16  9:37 [Bug bootstrap/115951] New: [15 Regression] pgo+lto enabled bootstrap fails building gnat (ICE in fold_stmt, at gimple-range-fold.cc:701) doko at gcc dot gnu.org
2024-07-16 10:47 ` [Bug bootstrap/115951] " rguenth at gcc dot gnu.org
2024-07-16 11:21 ` arsen at gcc dot gnu.org
2024-07-16 16:19 ` amacleod at redhat dot com
2024-07-16 23:39 ` cvs-commit at gcc dot gnu.org
2024-07-17 10:52 ` doko at gcc dot gnu.org
2024-07-17 19:51 ` arsen at gcc dot gnu.org
2024-07-19  4:43 ` sjames at gcc dot gnu.org
2024-07-19  9:39 ` doko at gcc dot gnu.org
2024-07-19  9:41 ` sjames 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).