From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52E713858C30; Fri, 1 Dec 2023 08:08:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52E713858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701418134; bh=57Gs0lbXO+QglqrwtDfomXj/a6QVDV1KiWFiMHnSDQ0=; h=From:To:Subject:Date:From; b=bAQ6i27XwiCDp2D4KIXlidINCZRGRaCQZvZ2Xxs3QsE1ljp4ogkJ/BtEsOmrTA1fU USoUGz9erja4/Qy7v26peNr2jhqH7WJWuZ1IeRRZB6HN6oxIQn5DNbkFmOXbOqzvpV g1s8b2/N91hlvnlpOhOwe84Hznyfu7LlrtmmH1oQ= From: "fkastl at suse dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112804] New: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 Date: Fri, 01 Dec 2023 08:08:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: fkastl at suse dot cz 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112804 Bug ID: 112804 Summary: ICE in aarch64 crosscompiler in plus_constant, at explow.cc:102 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, needs-bisection Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: fkastl at suse dot cz Target Milestone: --- Host: x86_64-linux Target: aarch64-gnu-linux Created attachment 56748 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56748&action=3Dedit Log of found plus_constant ICEs While compiling the gcc.dg/tree-ssa/pr111583-2.c testcase from GCC testsuite using the aarch64 cross compiler with the following options: aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tr= ee-ssa/pr111583-2.c -mabi=3Dilp32 -finline-stringops -ftrivial-auto-var-init=3Dzero the following ICE occurs: during RTL pass: expand /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tr= ee-ssa/pr111583-2.c: In function =E2=80=98m=E2=80=99: /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/tr= ee-ssa/pr111583-2.c:18:25: internal compiler error: in plus_constant, at explow.cc:102 18 | const unsigned short *n[65]; | ^ 0x73fa6c plus_constant(machine_mode, rtx_def*, poly_int<2u, long>, bool) =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/explow.cc:102 0x89f52f try_store_by_multiple_pieces(rtx_def*, rtx_def*, unsigned int, unsigned long, unsigned long, rtx_def*, char, unsigned int) =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/builtins.cc:4517 0x9d8870 clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned int, long, unsigned long, unsigned long, unsigned long, unsigned int) /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/expr.cc:= 3888 0x8a619b expand_builtin_memset_args =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/builtins.cc:4674 0xac23f7 expand_DEFERRED_INIT =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/internal-fn.cc:3= 357 0x8c6a37 expand_call_stmt =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:2738 0x8c6a37 expand_gimple_stmt_1 =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:3881 0x8c6a37 expand_gimple_stmt =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:4045 0x8cbac7 expand_gimple_basic_block =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:6101 0x8cd7be execute =20=20=20=20=20=20=20 /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/gcc/cfgexpand.cc:6836 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. The same bug (the same stacktrace) occurs on these testcases: aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.targe= t/aarch64/mops_4.c -mabi=3Dilp32 -finline-stringops aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/pr= 34457-1.c -mabi=3Dilp32 -finline-stringops aarch64-linux-gnu-gfortran /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gfortran.= dg/pr49308.f90 -finline-stringops -mabi=3Dilp32 aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.dg/ub= san/bounds-4b.c -finline-stringops -mabi=3Dilp32 -Os aarch64-linux-gnu-gfortran /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gfortran.= dg/analyzer/deferred_character_25.f90 -mabi=3Dilp32 -finline-stringops ICE in plus_constant (similar, but different stacktrace) also occurs here: aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.targe= t/aarch64/test_frame_5.c -mabi=3Dilp32 -ftrivial-auto-var-init=3Dpattern -finline-stringops aarch64-linux-gnu-gcc /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/gcc.targe= t/aarch64/stack-check-prologue-15.c -ftrivial-auto-var-init=3Dpattern -mabi=3Dilp32 -finline-stringops aarch64-linux-gnu-g++ /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/g++.dg/ve= ct/pr84362.cc -ftrivial-auto-var-init=3Dpattern -mabi=3Dilp32 -finline-stringops There are many more testcases that currently produce an ICE in plus_constan= t. I'm attaching a full log of the ICEs. Configuration of the compiler: Using built-in specs. COLLECT_GCC=3D/home/worker/cross/bin/aarch64-linux-gnu-gcc COLLECT_LTO_WRAPPER=3D/home/worker/cross/libexec/gcc/aarch64-linux-gnu/14.0= .0/lto-wrapper Target: aarch64-linux-gnu Configured with: /home/worker/buildworker/tiber-gcc-trunk-aarch64/build/configure --enable-languages=3Dc,c++,fortran,rust,m2 --disable-bootstrap --disable-libsanitizer --disable-multilib --enable-checking=3Drelease --prefix=3D/home/worker/cross --target=3Daarch64-linux-gnu --with-as=3D/usr/bin/aarch64-suse-linux-as Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231130 (experimental) 725c68c54c265fe7f6fc7babff7139f3161bdfa6 (GCC)=