From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3880F3943408; Tue, 1 Jun 2021 04:04:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3880F3943408 From: "cnsun at uwaterloo dot ca" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/100843] New: ICE with -O1: in try_store_by_multiple_pieces, at builtins.c:6739 Date: Tue, 01 Jun 2021 04:04:16 +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: tree-ssa X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cnsun at uwaterloo dot ca 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: Tue, 01 Jun 2021 04:04:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100843 Bug ID: 100843 Summary: ICE with -O1: in try_store_by_multiple_pieces, at builtins.c:6739 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-lin= ux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/configure --enable-languages=3Dc,c++,lto --enable-checking-yes --enable-multiarch --prefix=3D/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210601 (experimental) [master revision :54832e2f6:28daadc98094501175c9dfe4a985871fa6aa4f94] (GCC) $ cat mutant.c char c; void *memset(); test_integer_conversion_memset(void *d) { memset(d, '\0', c); } $ gcc-trunk -O1 mutant.c mutant.c:3:1: warning: return type defaults to =E2=80=98int=E2=80=99 [-Wimp= licit-int] 3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mutant.c: In function =E2=80=98test_integer_conversion_memset=E2=80=99: mutant.c:3:59: warning: =E2=80=98memset=E2=80=99 argument 3 promotes to =E2= =80=98int=E2=80=99 where =E2=80=98long unsigned int=E2=80=99 is expected in a call to built-in function declared w= ithout prototype [-Wbuiltin-declaration-mismatch] 3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); } | ^ mutant.c:2:7: note: built-in =E2=80=98memset=E2=80=99 declared here 2 | void *memset(); | ^~~~~~ during RTL pass: expand mutant.c:3:43: internal compiler error: in try_store_by_multiple_pieces, at builtins.c:6739 3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); } | ^~~~~~~~~~~~~~~~~~ 0x681394 try_store_by_multiple_pieces(rtx_def*, rtx_def*, unsigned int, unsigned long, unsigned long, rtx_def*, char, unsigned int) /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6739 0xb720bd clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned int, long, unsigned long, unsigned long, unsigned long, unsigned int) /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.c:3201 0xa099a2 expand_builtin_memset_args /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6969 0xa1bbfe expand_builtin_memset /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6685 0xa1bbfe expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:10187 0xb6be8c expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.c:11429 0xa45f49 expand_expr /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.h:301 0xa45f49 expand_call_stmt /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:2846 0xa45f49 expand_gimple_stmt_1 /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:3850 0xa45f49 expand_gimple_stmt /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:4014 0xa4b8a9 expand_gimple_basic_block /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:6056 0xa4d77f execute /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:6782 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=