public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/98654] New: unused code found in function analyze_functions:1194
@ 2021-01-13 4:49 ashimida at linux dot alibaba.com
2021-01-13 4:52 ` [Bug other/98654] " ashimida at linux dot alibaba.com
0 siblings, 1 reply; 2+ messages in thread
From: ashimida at linux dot alibaba.com @ 2021-01-13 4:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98654
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 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-13 4:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 4:49 [Bug other/98654] New: unused code found in function analyze_functions:1194 ashimida at linux dot alibaba.com
2021-01-13 4:52 ` [Bug other/98654] " ashimida at linux dot alibaba.com
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).