public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/110307] New: ICE in move_insn, at haifa-sched.cc:5473 on alpha with -fPIC -fpeephole2 -fschedule-insns2
@ 2023-06-19  7:08 matoro_gcc_bugzilla at matoro dot tk
  2023-06-19 11:13 ` [Bug rtl-optimization/110307] " amonakov at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: matoro_gcc_bugzilla at matoro dot tk @ 2023-06-19  7:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110307
           Summary: ICE in move_insn, at haifa-sched.cc:5473 on alpha with
                    -fPIC -fpeephole2 -fschedule-insns2
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matoro_gcc_bugzilla at matoro dot tk
  Target Milestone: ---

Minimized reproducer:

$ cat test.c
_Thread_local struct rb_execution_context_struct ruby_current_ec;
struct rb_execution_context_struct {
  int fiber_ptr
} rb_fiber_start() {
  __builtin_setjmp(0);
  if (ruby_current_ec.fiber_ptr)
    root_fiber_alloc();
}

$ alpha-unknown-linux-gnu-gcc -O1 -fpeephole2 -fschedule-insns2 -fPIC test.c -o
test.o -c
test.c:4:1: warning: no semicolon at end of struct or union
    4 | } rb_fiber_start() {
      | ^
test.c: In function ‘rb_fiber_start’:
test.c:7:5: warning: implicit declaration of function ‘root_fiber_alloc’
[-Wimplicit-function-declaration]
    7 |     root_fiber_alloc();
      |     ^~~~~~~~~~~~~~~~
during RTL pass: sched2
test.c:8:1: internal compiler error: in move_insn, at haifa-sched.cc:5473
    8 | }
      | ^


-fPIC is required to reproduce, as well as both -fpeephole2 and
-fschedule-insns2 optimizers (or simply -O2 which includes them).  Removing any
of those three flags no longer reproduces.  If required I can also work on
getting a complete stack trace.  If somebody would like to take a look at this
without the appropriate hardware, mine is publicly available for use.


$ alpha-unknown-linux-gnu-gcc --version --verbose
Using built-in specs.
COLLECT_AS_OPTIONS='--version'
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/alpha-unknown-linux-gnu/13/lto-wrapper
gcc (Gentoo 13.1.1_p20230527 p3) 13.1.1 20230527
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Target: alpha-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-13.1.1_p20230527/work/gcc-13-20230527/configure
--host=alpha-unknown-linux-gnu --build=alpha-unknown-linux-gnu --prefix=/usr
--bindir=/usr/alpha-unknown-linux-gnu/gcc-bin/13
--includedir=/usr/lib/gcc/alpha-unknown-linux-gnu/13/include
--datadir=/usr/share/gcc-data/alpha-unknown-linux-gnu/13
--mandir=/usr/share/gcc-data/alpha-unknown-linux-gnu/13/man
--infodir=/usr/share/gcc-data/alpha-unknown-linux-gnu/13/info
--with-gxx-include-dir=/usr/lib/gcc/alpha-unknown-linux-gnu/13/include/g++-v13
--with-python-dir=/share/gcc-data/alpha-unknown-linux-gnu/13/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
13.1.1_p20230527 p3' --with-gcc-major-version-only --disable-esp
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-libgomp --disable-libssp
--disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --without-isl --disable-libsanitizer --enable-default-pie
--disable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.1.1 20230527 (Gentoo 13.1.1_p20230527 p3) 
COLLECT_GCC_OPTIONS='--version' '-v' '-dumpdir' 'a-'
 /usr/libexec/gcc/alpha-unknown-linux-gnu/13/cc1 -quiet -v help-dummy -quiet
-dumpdir a- -dumpbase help-dummy -version --version -o /tmp/ccNd1lqC.s
GNU C17 (Gentoo 13.1.1_p20230527 p3) version 13.1.1 20230527
(alpha-unknown-linux-gnu)
        compiled by GNU C version 13.1.1 20230527, GMP version 6.2.1, MPFR
version 4.2.0-p9, MPC version 1.3.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='--version' '-v' '-dumpdir' 'a-'

/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/bin/as
-v --version -o /tmp/ccq4Tbtn.o /tmp/ccNd1lqC.s
GNU assembler version 2.40.0 (alpha-unknown-linux-gnu) using BFD version
(Gentoo 2.40 p5) 2.40.0
GNU assembler (Gentoo 2.40 p5) 2.40.0
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `alpha-unknown-linux-gnu'.
COMPILER_PATH=/usr/libexec/gcc/alpha-unknown-linux-gnu/13/:/usr/libexec/gcc/alpha-unknown-linux-gnu/13/:/usr/libexec/gcc/alpha-unknown-linux-gnu/:/usr/lib/gcc/alpha-unknown-linux-gnu/13/:/usr/lib/gcc/alpha-unknown-linux-gnu/:/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/alpha-unknown-linux-gnu/13/:/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/lib/:/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='--version' '-v' '-dumpdir' 'a.'
 /usr/libexec/gcc/alpha-unknown-linux-gnu/13/collect2 -plugin
/usr/libexec/gcc/alpha-unknown-linux-gnu/13/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/alpha-unknown-linux-gnu/13/lto-wrapper
-plugin-opt=-fresolution=/tmp/cckUzA7Z.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--eh-frame-hdr -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -pie
--version /usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crt1.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crti.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/crtbegin.o
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/lib
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../.. /tmp/ccq4Tbtn.o -lgcc
--push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed
-lgcc_s --pop-state /usr/lib/gcc/alpha-unknown-linux-gnu/13/crtend.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crtn.o
collect2 version 13.1.1 20230527
/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/bin/ld
-plugin /usr/libexec/gcc/alpha-unknown-linux-gnu/13/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/alpha-unknown-linux-gnu/13/lto-wrapper
-plugin-opt=-fresolution=/tmp/cckUzA7Z.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--eh-frame-hdr -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -pie
--version /usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crt1.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crti.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/crtbegin.o
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../../alpha-unknown-linux-gnu/lib
-L/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../.. /tmp/ccq4Tbtn.o -lgcc
--push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed
-lgcc_s --pop-state /usr/lib/gcc/alpha-unknown-linux-gnu/13/crtend.o
/usr/lib/gcc/alpha-unknown-linux-gnu/13/../../../crtn.o
GNU ld (Gentoo 2.40 p5) 2.40.0
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
COLLECT_GCC_OPTIONS='--version' '-v' '-dumpdir' 'a.'

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

end of thread, other threads:[~2023-11-11  9:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19  7:08 [Bug rtl-optimization/110307] New: ICE in move_insn, at haifa-sched.cc:5473 on alpha with -fPIC -fpeephole2 -fschedule-insns2 matoro_gcc_bugzilla at matoro dot tk
2023-06-19 11:13 ` [Bug rtl-optimization/110307] " amonakov at gcc dot gnu.org
2023-06-19 20:28 ` [Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2) matoro_gcc_bugzilla at matoro dot tk
2023-06-19 22:07 ` amonakov at gcc dot gnu.org
2023-06-19 23:02 ` matoro_gcc_bugzilla at matoro dot tk
2023-06-20  9:03 ` amonakov at gcc dot gnu.org
2023-06-20 16:42 ` amonakov at gcc dot gnu.org
2023-06-20 21:45 ` pinskia at gcc dot gnu.org
2023-06-21 11:08 ` amonakov at gcc dot gnu.org
2023-06-22 14:53 ` matoro_gcc_bugzilla at matoro dot tk
2023-06-22 15:55 ` amonakov at gcc dot gnu.org
2023-06-22 16:17 ` matoro_gcc_bugzilla at matoro dot tk
2023-06-25 16:39 ` matoro_gcc_bugzilla at matoro dot tk
2023-06-25 16:46 ` amonakov at gcc dot gnu.org
2023-11-10 21:37 ` sjames at gcc dot gnu.org
2023-11-11  9:01 ` amonakov 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).