public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ashimida at linux dot alibaba.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/98653] New: unused code found in function analyze_functions:1194 Date: Wed, 13 Jan 2021 04:49:04 +0000 [thread overview] Message-ID: <bug-98653-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98653 Bug ID: 98653 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 always be "true" and the fprintf will output nothing. codes in line [1194,1195] should be deleted. 1173 while (changed) 1174 { 1175 changed = false; 1176 process_function_and_variable_attributes (first_analyzed, 1177 first_analyzed_var); 1178 1179 /* First identify the trivially needed symbols. */ 1180 for (node = symtab->first_symbol (); 1181 node != first_analyzed 1182 && node != first_analyzed_var; node = 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 = 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 == first_analyzed 1198 || node == first_analyzed_var) 1199 break; 1200 } [1]:https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/cgraphunit.c;h=cf64e56ab951a0a757e507f59c236523b003a6be;hb=HEAD
next reply other threads:[~2021-01-13 4:49 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-13 4:49 ashimida at linux dot alibaba.com [this message] 2021-01-13 4:52 ` [Bug other/98653] " ashimida at linux dot alibaba.com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98653-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).