public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment
@ 2021-01-14 9:16 dcb314 at hotmail dot com
2021-01-14 10:29 ` [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment crazylht at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2021-01-14 9:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
Bug ID: 98671
Summary: gcc/config/i386/i386-options.c:787:redundantAssignment
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
trunk.git/gcc/config/i386/i386-options.c:787:28: style: Variable
'opts->x_ix86_branch_cost' is reassigned a value before the old one has been
used. [redundantAssignment]
Source code is
opts->x_ix86_branch_cost = ptr->branch_cost;
...
opts->x_ix86_branch_cost = ptr->x_ix86_branch_cost;
Suggest delete first assignment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
@ 2021-01-14 10:29 ` crazylht at gmail dot com
2021-01-14 10:39 ` ubizjak at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-01-14 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Seems so.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
2021-01-14 10:29 ` [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment crazylht at gmail dot com
@ 2021-01-14 10:39 ` ubizjak at gmail dot com
2021-01-14 11:21 ` dcb314 at hotmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2021-01-14 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2021-01-14
Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com
Target Milestone|--- |11.0
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Let me fix this.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
2021-01-14 10:29 ` [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment crazylht at gmail dot com
2021-01-14 10:39 ` ubizjak at gmail dot com
@ 2021-01-14 11:21 ` dcb314 at hotmail dot com
2021-01-14 15:34 ` ubizjak at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2021-01-14 11:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
For the same source code file, cppcheck finds these other very minor problems:
1.
trunk.git/gcc/config/i386/i386-options.c:1520:11: warning:inconclusive: Width
10 given in format string (no. 3) is smaller than destination buffer
'align[16]'. [invalidScanfFormatWidth_smaller]
The buffer size could probably be reduced. It won't make much difference,
since there are much larger variables nearby.
2.
trunk.git/gcc/config/i386/i386-options.c:1092:12: style: Local variable 'ret'
shadows outer variable [shadowVariable]
trunk.git/gcc/config/i386/i386-options.c:918:8: note: Shadowed declaration
trunk.git/gcc/config/i386/i386-options.c:1092:12: note: Shadow variable
3.
trunk.git/gcc/config/i386/i386-options.c:2856:26: style: Local variable 'i'
shadows outer variable [shadowVariable]
trunk.git/gcc/config/i386/i386-options.c:1786:7: note: Shadowed declaration
trunk.git/gcc/config/i386/i386-options.c:2856:26: note: Shadow variable
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
` (2 preceding siblings ...)
2021-01-14 11:21 ` dcb314 at hotmail dot com
@ 2021-01-14 15:34 ` ubizjak at gmail dot com
2021-01-14 17:06 ` dcb314 at hotmail dot com
2021-01-14 20:25 ` ubizjak at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2021-01-14 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed all but:
> trunk.git/gcc/config/i386/i386-options.c:1520:11: warning:inconclusive: Width 10
> given in format string (no. 3) is smaller than destination buffer 'align[16]'.
> [invalidScanfFormatWidth_smaller]
I'm not sure if solving this would bring us anything.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
` (3 preceding siblings ...)
2021-01-14 15:34 ` ubizjak at gmail dot com
@ 2021-01-14 17:06 ` dcb314 at hotmail dot com
2021-01-14 20:25 ` ubizjak at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2021-01-14 17:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
--- Comment #5 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Uroš Bizjak from comment #4)
> I'm not sure if solving this would bring us anything.
For clarity, at very most a 4% reduction in the size of the stack frame
for function ix86_parse_stringop_strategy_string.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
` (4 preceding siblings ...)
2021-01-14 17:06 ` dcb314 at hotmail dot com
@ 2021-01-14 20:25 ` ubizjak at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2021-01-14 20:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98671
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to David Binderman from comment #5)
> (In reply to Uroš Bizjak from comment #4)
> > I'm not sure if solving this would bring us anything.
>
> For clarity, at very most a 4% reduction in the size of the stack frame
> for function ix86_parse_stringop_strategy_string.
Unfortunately, patched and unpatched compiler results in the same frame size:
00000000011dc690 <_ZL35ix86_parse_stringop_strategy_stringPcb>:
11dc690: 41 57 push %r15
11dc692: 41 56 push %r14
11dc694: 41 55 push %r13
11dc696: 41 54 push %r12
11dc698: 55 push %rbp
11dc699: 53 push %rbx
11dc69a: 48 89 fb mov %rdi,%rbx
11dc69d: 48 81 ec 08 01 00 00 sub $0x108,%rsp
...
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-14 20:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 9:16 [Bug target/98671] New: gcc/config/i386/i386-options.c:787:redundantAssignment dcb314 at hotmail dot com
2021-01-14 10:29 ` [Bug target/98671] gcc/config/i386/i386-options.c:787:redundantAssignment crazylht at gmail dot com
2021-01-14 10:39 ` ubizjak at gmail dot com
2021-01-14 11:21 ` dcb314 at hotmail dot com
2021-01-14 15:34 ` ubizjak at gmail dot com
2021-01-14 17:06 ` dcb314 at hotmail dot com
2021-01-14 20:25 ` ubizjak at gmail dot 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).