public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20972] New: Compiler-generated code produces an assembler warning
@ 2005-04-12 16:51 jconner at apple dot com
2005-04-12 16:53 ` [Bug target/20972] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: jconner at apple dot com @ 2005-04-12 16:51 UTC (permalink / raw)
To: gcc-bugs
Test gcc.c-torture/compile/930210-1.c, when compiled with:
-O2 -c
produces the warning:
/var/tmp//ccSVOi5X.s: Assembler messages:
/var/tmp//ccSVOi5X.s:23: Warning: source register same as write-back base
Because of the following instruction generated in the assembly:
strb r2, [r2], #1
The assembler warning is produced because the instruction is unpredictable when the source register
and the base destination register are the same and post-increment addressing is used.
Note that while this test doesn't fail for the arm-none-elf target, a similar test case does demonstrate
the same issue:
void f(void)
{
char c1, c2;
char *p1, *p2;
c1 = c2 = *p1++;
while (c1--)
*p2++ = *p1++;
}
This behavior is present in gcc-4.1.0-20050405, and gcc-4.0.0-20050410 (RC1).
Configuration options: --target=arm-unknown-elf --program-prefix=arm-elf- --disable-nls --
enable-languages=c,c++ --with-newlib --enable-multilib --disable-shared
--
Summary: Compiler-generated code produces an assembler warning
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jconner at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: powerpc-apple-darwin7.8.0
GCC target triplet: arm-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/20972] Compiler-generated code produces an assembler warning
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
@ 2005-04-12 16:53 ` pinskia at gcc dot gnu dot org
2005-04-12 17:08 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-12 16:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/20972] Compiler-generated code produces an assembler warning
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
2005-04-12 16:53 ` [Bug target/20972] " pinskia at gcc dot gnu dot org
@ 2005-04-12 17:08 ` pinskia at gcc dot gnu dot org
2005-04-12 17:24 ` jconner at apple dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-12 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-12 17:08 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01291.html>.
Do you know if this is a regression from say 3.4.x?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2005-04-12 17:08:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/20972] Compiler-generated code produces an assembler warning
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
2005-04-12 16:53 ` [Bug target/20972] " pinskia at gcc dot gnu dot org
2005-04-12 17:08 ` pinskia at gcc dot gnu dot org
@ 2005-04-12 17:24 ` jconner at apple dot com
2005-04-12 17:26 ` [Bug target/20972] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: jconner at apple dot com @ 2005-04-12 17:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jconner at apple dot com 2005-04-12 17:24 -------
Subject: Re: Compiler-generated code produces an assembler warning
I don't see this same behavior on 3.4.3.
- Josh
On Apr 12, 2005, at 10:08 AM, pinskia at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org
> 2005-04-12 17:08 -------
> Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01291.html>.
>
> Do you know if this is a regression from say 3.4.x?
>
> --
> What |Removed |Added
> -----------------------------------------------------------------------
> -----
> CC| |pinskia at gcc dot
> gnu dot
> | |org
> Status|UNCONFIRMED |NEW
> Ever Confirmed| |1
> Keywords| |patch
> Last reconfirmed|0000-00-00 00:00:00 |2005-04-12 17:08:16
> date| |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/20972] [4.0/4.1 Regression] Compiler-generated code produces an assembler warning
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
` (2 preceding siblings ...)
2005-04-12 17:24 ` jconner at apple dot com
@ 2005-04-12 17:26 ` pinskia at gcc dot gnu dot org
2005-05-12 11:36 ` [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc rearnsha at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-12 17:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Compiler-generated code |[4.0/4.1 Regression]
|produces an assembler |Compiler-generated code
|warning |produces an assembler
| |warning
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
` (3 preceding siblings ...)
2005-04-12 17:26 ` [Bug target/20972] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-12 11:36 ` rearnsha at gcc dot gnu dot org
2005-07-06 16:54 ` mmitchel at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-05-12 11:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-05-12 11:36 -------
The ARM ARM says that
STR Rd, [Rn], #4
and
STR Rd, [Rn, #4]!
are unpredictable if Rd == Rn. That is, the auto-inc side effect is permitted
to take place before Rd is read.
There's currently no way for a back-end to describe that an auto-inc operation
might be an early-clobber. The obvious '&<>' in the constraint doesn't work,
causing an abort in find_reloads().
This bug isn't really a regression (the limitation has always been there), but
the vagaries of register allocation means that it is only recently that it's
started doing this (either that, or the assembler has only recently started
whining about it :-).
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rearnsha at gcc dot gnu dot
| |org
Component|target |rtl-optimization
Last reconfirmed|2005-04-12 17:08:16 |2005-05-12 11:36:06
date| |
Summary|[4.0/4.1 Regression] |[4.0/4.1 Regression] Can't
|Compiler-generated code |describe an early-clobber by
|produces an assembler |an auto-inc
|warning |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
` (4 preceding siblings ...)
2005-05-12 11:36 ` [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc rearnsha at gcc dot gnu dot org
@ 2005-07-06 16:54 ` mmitchel at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-06 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-07-06 16:53 -------
Postponed until 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
` (5 preceding siblings ...)
2005-07-06 16:54 ` mmitchel at gcc dot gnu dot org
@ 2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc
[not found] <bug-20972-10413@http.gcc.gnu.org/bugzilla/>
@ 2005-10-13 16:01 ` bonzini at gcc dot gnu dot org
0 siblings, 0 replies; 9+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-10-13 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bonzini at gcc dot gnu dot org 2005-10-13 16:01 -------
Maybe you could add a reload_completed split to not use autoincrements if Rd ==
Rn?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20972
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-10-13 16:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-12 16:51 [Bug c/20972] New: Compiler-generated code produces an assembler warning jconner at apple dot com
2005-04-12 16:53 ` [Bug target/20972] " pinskia at gcc dot gnu dot org
2005-04-12 17:08 ` pinskia at gcc dot gnu dot org
2005-04-12 17:24 ` jconner at apple dot com
2005-04-12 17:26 ` [Bug target/20972] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-12 11:36 ` [Bug rtl-optimization/20972] [4.0/4.1 Regression] Can't describe an early-clobber by an auto-inc rearnsha at gcc dot gnu dot org
2005-07-06 16:54 ` mmitchel at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
[not found] <bug-20972-10413@http.gcc.gnu.org/bugzilla/>
2005-10-13 16:01 ` bonzini at gcc dot gnu dot org
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).