public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
@ 2022-07-25 20:16 msc at linux dot ibm.com
  2022-07-25 20:21 ` [Bug libfortran/106438] powerpc: ICE when building libgfortran with -flto: " msc at linux dot ibm.com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: msc at linux dot ibm.com @ 2022-07-25 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106438
           Summary: powerpc: ICE when building libgfortran with -lto: in
                    insert_value_copy_on_edge, at tree-outof-ssa.cc:334
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msc at linux dot ibm.com
  Target Milestone: ---

Compiling libgfortran with -lto (see small patch [1] below) is failing on
powerpc64le (testd on P10, but may apply to older processors as well) with
current trunk:

$ git gcc-descr HEAD
r12-10142-ga6efab5fbc468b

$ cd ~/build/gcc/ && ~/AT/pr2981/build/sources/gcc/configure
--build=powerpc64le-linux-gnu --host=powerpc64le-linux-gnu
--target=powerpc64le-linux-gnu --cache-file=configparms
--prefix=/home/mscastanho/usr --with-long-double-128 --enable-secureplt
--disable-multilib --enable-threads=posix --enable-languages=fortran
--disable-bootstrap --enable-__cxa_atexit --enable-shared
--enable-checking=release --enable-gnu-indirect-function --enable-lto
--enable-linker-build-id --without-ppl --without-cloog --without-libelf
--with-system-zlib --with-cpu=power10 --with-tune=power10 && make -j60 &>
_make; echo $?

Error:

during RTL pass: expand
/home/mscastanho/AT/pr2981/build/sources/gcc/libgfortran/generated/maxloc0_4_r17.c:
In function 'maxloc0_4_r17':
/home/mscastanho/AT/pr2981/build/sources/gcc/libgfortran/generated/maxloc0_4_r17.c:38:1:
internal compiler error: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
   38 | maxloc0_4_r17 (gfc_array_i4 * const restrict retarray,
      | ^
0x108ea89b insert_value_copy_on_edge
        /home/mscastanho/AT/pr2981/build/sources/gcc/gcc/tree-outof-ssa.cc:334
0x108ea89b eliminate_phi
        /home/mscastanho/AT/pr2981/build/sources/gcc/gcc/tree-outof-ssa.cc:785
0x108ea89b expand_phi_nodes(ssaexpand*)
        /home/mscastanho/AT/pr2981/build/sources/gcc/gcc/tree-outof-ssa.cc:1024
0x10252a1f execute
        /home/mscastanho/AT/pr2981/build/sources/gcc/gcc/cfgexpand.cc:6799


Git bisect is pointing to this commit:

commit 133d0d422ebd18dbd215cfa5394aff9f938e7060                                 
Author: Jakub Jelinek <jakub@redhat.com>                                        
Date:   Tue Jun 28 13:05:28 2022 +0200                                          

    fortran, libgfortran: Avoid using libquadmath for glibc 2.26+


[1]
https://raw.githubusercontent.com/powertechpreview/powertechpreview/0be24b142a81e44ac4abadb3fde4eb0010b79f70/GCC%20PowerPC%20Backport/9/gcc-9-lto.patch

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

* [Bug libfortran/106438] powerpc: ICE when building libgfortran with -flto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
  2022-07-25 20:16 [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334 msc at linux dot ibm.com
@ 2022-07-25 20:21 ` msc at linux dot ibm.com
  2022-07-25 20:22 ` [Bug tree-optimization/106438] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: msc at linux dot ibm.com @ 2022-07-25 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Matheus Castanho <msc at linux dot ibm.com> ---
Small typo: I meant -flto, not -lto. The patch is OK though.

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

* [Bug tree-optimization/106438] powerpc: ICE when building libgfortran with -flto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
  2022-07-25 20:16 [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334 msc at linux dot ibm.com
  2022-07-25 20:21 ` [Bug libfortran/106438] powerpc: ICE when building libgfortran with -flto: " msc at linux dot ibm.com
@ 2022-07-25 20:22 ` pinskia at gcc dot gnu.org
  2022-07-25 20:58 ` msc at linux dot ibm.com
  2022-07-26  7:05 ` [Bug target/106438] " rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-25 20:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, ice-on-valid-code,
                   |                            |lto

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> Git bisect is pointing to this commit:

That just exposes the issue from the source.

Can you supply the full command line which is failing?

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

* [Bug tree-optimization/106438] powerpc: ICE when building libgfortran with -flto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
  2022-07-25 20:16 [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334 msc at linux dot ibm.com
  2022-07-25 20:21 ` [Bug libfortran/106438] powerpc: ICE when building libgfortran with -flto: " msc at linux dot ibm.com
  2022-07-25 20:22 ` [Bug tree-optimization/106438] " pinskia at gcc dot gnu.org
@ 2022-07-25 20:58 ` msc at linux dot ibm.com
  2022-07-26  7:05 ` [Bug target/106438] " rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: msc at linux dot ibm.com @ 2022-07-25 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Matheus Castanho <msc at linux dot ibm.com> ---
Created attachment 53350
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53350&action=edit
Failing command

The failing command is the final link command to create libgfortran.so, so it's
rather long. I'm attaching it to the bug as a txt file, along with some
warnings that gcc emitted.

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

* [Bug target/106438] powerpc: ICE when building libgfortran with -flto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334
  2022-07-25 20:16 [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334 msc at linux dot ibm.com
                   ` (2 preceding siblings ...)
  2022-07-25 20:58 ` msc at linux dot ibm.com
@ 2022-07-26  7:05 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-26  7:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |powerpc64le
          Component|tree-optimization           |target

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Quite probably a target issue, since -flto investigation is difficult without
native access lets see if target folks can get a handle on this (hint: reduce
the testcase to a few input files)

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

end of thread, other threads:[~2022-07-26  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25 20:16 [Bug libfortran/106438] New: powerpc: ICE when building libgfortran with -lto: in insert_value_copy_on_edge, at tree-outof-ssa.cc:334 msc at linux dot ibm.com
2022-07-25 20:21 ` [Bug libfortran/106438] powerpc: ICE when building libgfortran with -flto: " msc at linux dot ibm.com
2022-07-25 20:22 ` [Bug tree-optimization/106438] " pinskia at gcc dot gnu.org
2022-07-25 20:58 ` msc at linux dot ibm.com
2022-07-26  7:05 ` [Bug target/106438] " rguenth 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).