From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DFEE3858012; Sat, 14 Aug 2021 21:15:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DFEE3858012 From: "giulio.benetti at benettiengineering dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/101915] New: Microblaze ICE: in extract_insn, at recog.c:2770 Date: Sat, 14 Aug 2021 21:15:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: giulio.benetti at benettiengineering dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2021 21:15:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101915 Bug ID: 101915 Summary: Microblaze ICE: in extract_insn, at recog.c:2770 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: giulio.benetti at benettiengineering dot com Target Milestone: --- When building package lmbench on buildroot we get this error: ''' /home/giuliobenetti/git/upstream/output-microblaze-lmbench-gcc11/host/bin/m= icroblazeel-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -g0= =20 -I/home/giuliobenetti/git/upstream/output-microblaze-lmbench-gcc11/host/bin= /../microblazeel-buildroot-linux-uclibc/sysroot/usr/include/tirpc -fno-tree-loop-distribute-patterns -DHAVE_off64_t -DHAVE_lseek64 -DRUSAGE -DHAVE_uint=3D1 -DHAVE_int64_t=3D1 -DHAVE_pmap_clnt_h -DHAVE_socklen_t -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=3D1 -o ../bin/microblazeel/stream stream.c ../bin/microblazeel/lmbench.a -L/home/giuliobenetti/git/upstream/output-microblaze-lmbench-gcc11/host/bin= /../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -ltirpc=20 -L/home/giuliobenetti/git/upstream/output-microblaze-lmbench-gcc11/host/bin= /../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -ltirpc -lm par_ops.c: In function =E2=80=98int64_bit_2=E2=80=99: par_ops.c:94:1: error: unrecognizable insn: 94 | } | ^ par_ops.c:99:9: note: in expansion of macro =E2=80=98BENCHMARK=E2=80=99 99 | BENCHMARK(benchmark, 2, REPEAT_2)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~~~~~~ par_ops.c:215:1: note: in expansion of macro =E2=80=98PARALLEL_BENCHMARKS= =E2=80=99 215 | PARALLEL_BENCHMARKS(int64_bit) | ^~~~~~~~~~~~~~~~~~~ (insn 353 354 352 3 (set (reg/v:DI 24 r24 [orig:74 i0 ] [74]) (plus:DI (reg:DI 26 r26 [orig:48 _9 ] [48]) (const_int -1 [0xffffffffffffffff]))) -1 (nil)) during RTL pass: cprop_hardreg par_ops.c:94:1: internal compiler error: in extract_insn, at recog.c:2770 94 | } | ^ par_ops.c:99:9: note: in expansion of macro =E2=80=98BENCHMARK=E2=80=99 99 | BENCHMARK(benchmark, 2, REPEAT_2)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~~~~~~ par_ops.c:215:1: note: in expansion of macro =E2=80=98PARALLEL_BENCHMARKS= =E2=80=99 215 | PARALLEL_BENCHMARKS(int64_bit) | ^~~~~~~~~~~~~~~~~~~ 0x122170e diagnostic_impl(rich_location*, diagnostic_metadata const*, int, = char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x12225ce internal_error(char const*, ...) ???:0 0x57a818 fancy_abort(char const*, int, char const*) ???:0 0x55c92f _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ???:0 0x55c951 _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ???:0 0x55bc9e extract_insn(rtx_insn*) [clone .cold] ???:0 0xa24fec extract_constrain_insn(rtx_insn*) ???:0 0xa292c7 copyprop_hardreg_forward_1(basic_block_def*, value_data*) [clone .isra.0] ???:0 0xa29fbd (anonymous namespace)::pass_cprop_hardreg::execute(function*) ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. make[3]: *** [Makefile:453: ../bin/microblazeel/par_ops] Error 1 make[2]: *** [Makefile:114: lmbench] Error 2 make[1]: *** [package/pkg-generic.mk:270: /home/giuliobenetti/git/upstream/output-microblaze-lmbench-gcc11/build/lmbe= nch-3.0-a9/.stamp_built] Error 2 make: *** [Makefile:23: _all] Error 2 ''' To reproduce the bug: ''' # git clone git://git.busybox.net/buildroot # wget https://git.busybox.net/buildroot-test/tree/utils/br-reproduce-build - modify BASE_GIT=3D... with your buildroot path in br-reproduce-build then: # chmod a+x br-reproduce-build # ./br-reproduce-build c6849f0f45b32e1f484fa5442b9d313fff4b2e8c ''' I've found that it can be worked around disabling the optimization passing = -O0 to CFLAGS.=