public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/104868] New: powerpc: Compiling libgfortran with -flto failing with GCC 12
@ 2022-03-10 18:11 msc at linux dot ibm.com
  2022-03-10 18:23 ` [Bug lto/104868] " segher at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: msc at linux dot ibm.com @ 2022-03-10 18:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104868
           Summary: powerpc: Compiling libgfortran with -flto failing with
                    GCC 12
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msc at linux dot ibm.com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Compiling libgfortran with -flto (see patch [1]) on ppc64le used to work for a
good while until GCC commit r12-7501-g1301d7f647c7ac . Now it fails with:

/home/tcbot/bot-worker/at/src/at16.0-0-alpha.redhat-8_ppc64le_ppc64le/sources/gcc/libgfortran/generated/maxloc0_16_i1.c:
In function 'mmaxloc0_16_i1':
/home/tcbot/bot-worker/at/src/at16.0-0-alpha.redhat-8_ppc64le_ppc64le/sources/gcc/libgfortran/generated/maxloc0_16_i1.c:362:1:
error: insn does not satisfy its constraints:
  362 | }
      | ^
(insn 4106 126 4107 236 (set (reg:V2DI 65 1)
        (vec_duplicate:V2DI (reg:DI 0 0 [1496])))
"/home/tcbot/bot-worker/at/src/at16.0-0-alpha.redhat-8_ppc64le_ppc64le/sources/gcc/libgfortran/generated/maxloc0_16_i1.c":315:36
1477 {vsx_splat_v2di_reg}
     (expr_list:REG_DEAD (reg:DI 0 0 [1496])
        (nil)))
during RTL pass: cprop_hardreg
/home/tcbot/bot-worker/at/src/at16.0-0-alpha.redhat-8_ppc64le_ppc64le/sources/gcc/libgfortran/generated/maxloc0_16_i1.c:362:1:
internal compiler error: in extract_constrain_insn, at recog.cc:2670
0x7fff8cce171b __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7fff8cce18f7 generic_start_main
        ../csu/libc-start.c:392
0x7fff8cce18f7 __libc_start_main_impl
        ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:98
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error:
/home/tcbot/bot-worker/at/src/at16.0-0-alpha.redhat-8_ppc64le_ppc64le/builds/gcc_power10.tuned/./gcc/xgcc
returned 1 exit status
compilation terminated.
/home/tcbot/bot-worker/at_opt/at-next-16.0-0-alpha/powerpc64le-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Steps to reproduce on a Power10:

cd gcc
wget
https://raw.githubusercontent.com/powertechpreview/powertechpreview/0be24b142a81e44ac4abadb3fde4eb0010b79f70/GCC%20PowerPC%20Backport/9/gcc-9-lto.patch
patch -p1 < gcc-9-lto.patch

cd build/gcc
CFLAGS=-O2 CXXFLAGS=-O2 CFLAGS_FOR_TARGET=-O3 CXXFLAGS_FOR_TARGET=-O3
~/src/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=c,c++,fortran,go
--enable-__cxa_atexit --enable-shared --enable-checking=release
--enable-gnu-indirect-function --enable-lto --enable-linker-build-id
--disable-bootstrap --without-ppl --without-cloog --without-libelf
--with-system-zlib --with-cpu=power10 --with-tune=power10 && make -j60 &>
_make; echo $?


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

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

end of thread, other threads:[~2022-03-28 13:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 18:11 [Bug lto/104868] New: powerpc: Compiling libgfortran with -flto failing with GCC 12 msc at linux dot ibm.com
2022-03-10 18:23 ` [Bug lto/104868] " segher at gcc dot gnu.org
2022-03-10 18:34 ` segher at gcc dot gnu.org
2022-03-10 19:13 ` segher at gcc dot gnu.org
2022-03-10 19:53 ` meissner at gcc dot gnu.org
2022-03-10 21:48 ` [Bug target/104868] [12 Regression] " pinskia at gcc dot gnu.org
2022-03-10 22:50 ` segher at gcc dot gnu.org
2022-03-11 14:44 ` msc at linux dot ibm.com
2022-03-11 16:11 ` meissner at gcc dot gnu.org
2022-03-11 16:12 ` meissner at gcc dot gnu.org
2022-03-11 16:44 ` msc at linux dot ibm.com
2022-03-12  0:47 ` cvs-commit at gcc dot gnu.org
2022-03-28 13:18 ` jakub 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).