public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/6920: gcc-arm-elf v3.1 Wrong assembler code with -mthumb -Os (-O2)
@ 2002-09-30  5:11 rearnsha
  0 siblings, 0 replies; 2+ messages in thread
From: rearnsha @ 2002-09-30  5:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, omakarenko, rearnsha

Synopsis: gcc-arm-elf v3.1 Wrong assembler code with -mthumb -Os (-O2)

Responsible-Changed-From-To: unassigned->rearnsha
Responsible-Changed-By: rearnsha
Responsible-Changed-When: Mon Sep 30 05:11:45 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: open->closed
State-Changed-By: rearnsha
State-Changed-When: Mon Sep 30 05:11:45 2002
State-Changed-Why:
    I've checked in a change that should solve this problem on both the trunk and 3.2 branch.  If you still get this problem with the fixed code then please resubmit.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6920


^ permalink raw reply	[flat|nested] 2+ messages in thread

* target/6920: gcc-arm-elf v3.1 Wrong assembler code with -mthumb -Os (-O2)
@ 2002-06-03  6:26 omakarenko
  0 siblings, 0 replies; 2+ messages in thread
From: omakarenko @ 2002-06-03  6:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6920
>Category:       target
>Synopsis:       gcc-arm-elf v3.1 Wrong assembler code with -mthumb -Os (-O2)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 03 06:26:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     omakarenko@cyberplat.ru
>Release:        unknown-1.0
>Organization:
>Environment:
Host: linux-x86
Target: arm-elf
Version: GCC 3.1 (arm/elf)
compiled by GNU C version 2.96 20000731 (RedHat Linux 7.3 2.96-110)
Configured with: /home/oleg/arm/tools/gcc/configure --target=arm-elf --enable-languages=c,c++
--disable-shared --disable-nls --with-gnu-as --with-gnu-ld --disable-checking
--with-multilibs --with-newlib --disable-newlib-io-float
Thread model:single
>Description:
The following simple file:

/* test.c stupid code to demonstrate the bug only */
void func(int d, char *x)
{
    char *a[32];
    if (a[d++] != (char *) 0)
    {
        x = a[d];
    }
    a[d] = x;
}

when compiled with

arm-elf-gcc -o test.Os.s -S -Os -mthumb test.c

produces code like:
ldr  r3, [r3, sp]

which is wrong for Thumb mode (sp can not be used in thumb mode)

gas then complains with "Error: lo register required"

-O2 and -O3 give the same result.

That is a duplicate report for c/6916. The attached file was somehow missed from the previous report. Sorry for that.
>How-To-Repeat:
compile test.c with -mthumb and -Os (or -O2, -O3) options
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-30 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-30  5:11 target/6920: gcc-arm-elf v3.1 Wrong assembler code with -mthumb -Os (-O2) rearnsha
  -- strict thread matches above, loose matches on Subject: below --
2002-06-03  6:26 omakarenko

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).