public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/7371: code generation bug for mips-64
@ 2002-07-22 5:26 Niels.Nes
0 siblings, 0 replies; only message in thread
From: Niels.Nes @ 2002-07-22 5:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 7371
>Category: target
>Synopsis: Negative offsets const arrays result in Sig BUS
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Mon Jul 22 05:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Niels Nes
>Release: 3.1
>Organization:
CWI
>Environment:
System: IRIX64 medusa 6.5 10100655 IP27
host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: ../configure --prefix=/soft/gcc-3.1
>Description:
The following small example gives a SIG BUS when compiled with
-mabi=64. Only happens with const arrays and a const offset.
In the assembly code a line .dword a-16 combining
the two can be found (possibly a problem on a mips (I'm not sure)).
#include <stdio.h>
static const int a [] = {
0, 1, 4, 6,
};
main(){
int i = 0;
for(i=4;i<8;i++){
printf( "%d %d\n", i, a [i - 4] );
}
}
>How-To-Repeat:
>Fix:
Work around: remove the keyword const.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-22 12:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-22 5:26 target/7371: code generation bug for mips-64 Niels.Nes
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).