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

            Bug ID: 80367
           Summary: internal compiler error: in print_reg, at
                    config/i386/i386.c:16549
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jwjagersma at gmail dot com
  Target Milestone: ---

I got this ICE yesterday and I haven't been able to figure out what caused it,
or how to reduce the code to a small test case.
The only information I can provide right now is the full program:

https://github.com/jwt27/jwdpmi_test.git
checkout commit 88431be254cb414fb6499cefe0caf584a6c316f4 (should be the last
one, as of now)

I believe this error occured after I changed function pixel::max()
(include/jw/video/pixel.h:202) to return std::int32_t (previously
std::int16_t). This would make the vector functions in the pixel class use a
vector type of 4*int. But I don't see how that is directly related, since it
looks like the ICE originates from the inline asm in src/vbe.cpp. I also tried
changing the return type back to std::int16_t but the error is still there.
Also it only happens with some -march= options. pentium2 and earlier compiles
fine, core2 and later work too, anything inbetween (pentium3 to prescott)
fails.

$ make
make -C lib/libjwdpmi/
make[1]: Entering directory '/home/JW/projects/jwdpmi_test/lib/libjwdpmi'
g++  -pipe -masm=intel -MD -MP -O3 -flto=24 -flto-odr-type-merging -mmmx -msse
-march=pentium3 -ffast-math -mfpmath=both -std=gnu++17 -Wall -Wextra
-Wno-attributes -Wsuggest-override -Wattributes -ggdb -fnon-call-exceptions
-fasynchronous-unwind-tables -mcld -mpreferred-stack-boundary=4 -mstackrealign
-DNDEBUG -save-temps -masm=intel -std=gnu++17 -Wall -Wextra
-fasynchronous-unwind-tables -fnon-call-exceptions -mcld
-mpreferred-stack-boundary=4 -MD -MP -MF obj/vbe.d -o obj/vbe.o -Iinclude -c
src/vbe.cpp
g++.exe: warning: -pipe ignored because -save-temps specified
src/vbe.cpp: In member function
'jw::video::vbe2::set_palette(jw::video::pixel<jw::video::bgra_8888> const*,
jw::video::pixel<jw::video::bgra_8888> const*, unsigned long, bool)':
src/vbe.cpp:647:9: internal compiler error: in print_reg, at
config/i386/i386.c:16549
         }
         ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [makefile:39: obj/vbe.o] Error 1
make[1]: Leaving directory '/home/JW/projects/jwdpmi_test/lib/libjwdpmi'
make: *** [makefile:65: libjwdpmi] Error 2

$ g++ -v
Using built-in specs.
COLLECT_GCC=D:\msys64\usr\local\djgpp\i586-pc-msdosdjgpp\bin\g++.exe
COLLECT_LTO_WRAPPER=D:/msys64/usr/local/djgpp/lib/gcc/../../libexec/gcc/i586-pc-msdosdjgpp/6.1.0/lto-wrapper.exe
Target: i586-pc-msdosdjgpp
Configured with: ../gnu/gcc-6.10/configure --build=x86_64-w64-mingw32
--target=i586-pc-msdosdjgpp --program-prefix=i586-pc-msdosdjgpp-
--prefix=/usr/local/djgpp --disable-nls --disable-plugin --enable-lto
--enable-libquadmath-support
--with-gmp=/home/JW/build-djgpp/build/djcross-gcc-6.1.0/tmpinst
--with-mpfr=/home/JW/build-djgpp/build/djcross-gcc-6.1.0/tmpinst
--with-mpc=/home/JW/build-djgpp/build/djcross-gcc-6.1.0/tmpinst
--enable-version-specific-runtime-libs --enable-languages=c,c++
Thread model: single
gcc version 6.1.0 (GCC)

Reply via email to