From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F097385800A; Wed, 13 Jan 2021 04:49:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F097385800A From: "ashimida at linux dot alibaba.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/98654] New: unused code found in function analyze_functions:1194 Date: Wed, 13 Jan 2021 04:49:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: new-ra X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ashimida at linux dot alibaba.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: Wed, 13 Jan 2021 04:49:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98654 Bug ID: 98654 Summary: unused code found in function analyze_functions:1194 Product: gcc Version: new-ra Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: ashimida at linux dot alibaba.com Target Milestone: --- In function "analyze_functions"[1]:1194, the value of "changed" should alwa= ys be "true" and the fprintf will output nothing. codes in line [1194,1195] sh= ould be deleted. 1173 while (changed) 1174 { 1175 changed =3D false; 1176 process_function_and_variable_attributes (first_analyzed, 1177 first_analyzed_var); 1178=20 1179 /* First identify the trivially needed symbols. */ 1180 for (node =3D symtab->first_symbol (); 1181 node !=3D first_analyzed 1182 && node !=3D first_analyzed_var; node =3D node->next) 1183 { 1184 /* Convert COMDAT group designators to IDENTIFIER_NODEs. */ 1185 node->get_comdat_group_id (); 1186 if (node->needed_p ()) 1187 { 1188 enqueue_node (node); 1189 if (!changed && symtab->dump_file) 1190 fprintf (symtab->dump_file, "Trivially needed symbols:= "); 1191 changed =3D true; 1192 if (symtab->dump_file) 1193 fprintf (symtab->dump_file, " %s", node->dump_asm_name ()); 1194 if (!changed && symtab->dump_file) 1195 fprintf (symtab->dump_file, "\n"); 1196 } 1197 if (node =3D=3D first_analyzed 1198 || node =3D=3D first_analyzed_var) 1199 break; 1200 } [1]:https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/cgraphunit.c;h=3D= cf64e56ab951a0a757e507f59c236523b003a6be;hb=3DHEAD=