From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Orth To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: target/2273: [Alpha/Tru64 UNIX V5.1] SEGV in long double code Date: Tue, 03 Apr 2001 10:16:00 -0000 Message-id: <20010403171605.32299.qmail@sourceware.cygnus.com> X-SW-Source: 2001-04/msg00054.html List-Id: The following reply was made to PR target/2273; it has been noted by GNATS. From: Rainer Orth To: gcc-gnats@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org, Richard Henderson Subject: Re: target/2273: [Alpha/Tru64 UNIX V5.1] SEGV in long double code Date: Tue, 3 Apr 2001 19:09:23 +0200 (MEST) I've single-stepped the test program and found the exact location where it SEGVs: int main (void) { long double ld = 1.0; } Here's an excerpt from the resulting assembler code: .rdata .quad 0 .align 4 $LC0: .quad 0x000000000,0x3fff000000000000 and here's the relevant code for the assignment to ld, just after the function prologue: lda $1,$LC0 ; load address of ld into $1 ldq $1,0($1) ; store high quad of ld into $1, overwriting &ld! ldq $2,8($1) ; the first quad of 1.0 happens to be 0, so 8($1) ; dereferences a NULL pointer and SEGVs Unfortunately, I cannot yet read the RTL dumps to understand why this is happening. Rainer ----------------------------------------------------------------------------- Rainer Orth, Faculty of Technology, Bielefeld University Email: ro@TechFak.Uni-Bielefeld.DE