From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A7AC388F025; Tue, 11 May 2021 16:10:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A7AC388F025 From: "cnsun at uwaterloo dot ca" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzEwMDUzMl0gSUNFOiB0cmVlIGNoZWNrOiBleHBlY3Rl?= =?UTF-8?B?ZCBjbGFzcyDigJh0eXBl4oCZLCBoYXZlIOKAmGV4Y2VwdGlvbmFs4oCZIChl?= =?UTF-8?B?cnJvcl9tYXJrKSBpbiB1c2VsZXNzX3R5cGVfY29udmVyc2lvbl9wLCBhdCBn?= =?UTF-8?B?aW1wbGUtZXhwci5jOjI1OQ==?= Date: Tue, 11 May 2021 16:10:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: Message-ID: In-Reply-To: References: 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, 11 May 2021 16:10:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100532 --- Comment #1 from Chengnian Sun --- Another duplicate. $ cat mutant.c void *memcpy(void[], const void *, __SIZE_TYPE__); f(x) { if (f) memcpy(x, x, x); } $ gcc-trunk mutant.c mutant.c:1:18: error: declaration of type name as array of voids 1 | void *memcpy(void[], const void *, __SIZE_TYPE__); | ^ mutant.c:2:1: warning: return type defaults to =E2=80=98int=E2=80=99 [-Wimp= licit-int] 2 | f(x) { | ^ mutant.c: In function =E2=80=98f=E2=80=99: mutant.c:2:1: warning: type of =E2=80=98x=E2=80=99 defaults to =E2=80=98int= =E2=80=99 [-Wimplicit-int] mutant.c:4:12: error: type of formal parameter 1 is incomplete 4 | memcpy(x, x, x); | ^ mutant.c:4:15: warning: passing argument 2 of =E2=80=98memcpy=E2=80=99 make= s pointer from integer without a cast [-Wint-conversion] 4 | memcpy(x, x, x); | ^ | | | int mutant.c:1:22: note: expected =E2=80=98const void *=E2=80=99 but argument i= s of type =E2=80=98int=E2=80=99 1 | void *memcpy(void[], const void *, __SIZE_TYPE__); | ^~~~~~~~~~~~ mutant.c:4:5: internal compiler error: tree check: expected class =E2=80=98= type=E2=80=99, have =E2=80=98exceptional=E2=80=99 (error_mark) in useless_type_conversion_p, at= gimple-expr.c:259 4 | memcpy(x, x, x); | ^~~~~~ 0x7bce07 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree.c:8724 0x6cb4a3 tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree.h:3479 0x6cb4a3 useless_type_conversion_p(tree_node*, tree_node*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.c:259 0xc2fc77 types_compatible_p /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.h:67 0xc2fc77 gimplify_addr_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6246 0xc25d93 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14130 0xc34d59 gimplify_call_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:3446 0xc25d73 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14055 0xc28f6a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6877 0xc2d4cb gimplify_cond_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:4264 0xc25a77 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14040 0xc28f6a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6877 0xc2979e gimplify_bind_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:1421 0xc259d3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14284 0xc28f6a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6877 0xc2a563 gimplify_body(tree_node*, bool) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15328 0xc2a9b1 gimplify_function_tree(tree_node*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15482 0xa7e707 cgraph_node::analyze() /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:670 0xa81611 analyze_functions /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:1234 0xa820e1 symbol_table::finalize_compilation_unit() /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:2508 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=