Created attachment 1656894 [details] Compressed preprocessed source Description of problem: During the mass rebuild, tlx failed to build on s390x only, due to an internal compiler error in g++. I removed compiler flags until it went away, so I can report that the ICE does not happen with -O0, but does with all higher optimization levels. With only some preprocessor options and -O as arguments, this is the output: /builddir/build/BUILD/tlx-0.5.20191212/tests/math_test.cpp: In function 'void test_popcount()': /builddir/build/BUILD/tlx-0.5.20191212/tests/math_test.cpp:220:1: error: unrecognizable insn: 220 | } | ^ (insn 138 137 139 27 (set (reg:SI 190) (ashift:SI (reg:HI 95 [ _105 ]) (const_int 8 [0x8]))) -1 (nil)) during RTL pass: vregs /builddir/build/BUILD/tlx-0.5.20191212/tests/math_test.cpp:220:1: internal compiler error: in extract_insn, at recog.c:2294 Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccS4ewtK.out file, please attach this to your bugreport. The preprocessed source is attached. Version-Release number of selected component (if applicable): gcc-c++-10.0.1-0.6.fc32.s390x How reproducible: Always Steps to Reproduce: 1. Run g++ -O on the attached preprocessed source 2. 3. Actual results: Internal compiler error Expected results: An object file Additional info:
Simplified testcase with -O -march=zEC12: unsigned short a; unsigned foo (void) { a = a - (a >> 1 & 21845); a = (a & 13107) + (a >> 2 & 13107); return (unsigned short) ((a + (a >> 4) & 3855) * 257) >> 8; } Started with https://gcc.gnu.org/r276721 when the above started to be recognized as 16-bit popcount.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.