public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Niels.Nes@cwi.nl
To: gcc-gnats@gcc.gnu.org
Subject: target/7371: code generation bug for mips-64
Date: Mon, 22 Jul 2002 05:26:00 -0000	[thread overview]
Message-ID: <200207221221.OAA89583@medusa.cwi.nl> (raw)


>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:


                 reply	other threads:[~2002-07-22 12:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207221221.OAA89583@medusa.cwi.nl \
    --to=niels.nes@cwi.nl \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).