public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/3753
@ 2001-08-21 13:06 Peter van Hoof
  0 siblings, 0 replies; only message in thread
From: Peter van Hoof @ 2001-08-21 13:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/3753; it has been noted by GNATS.

From: Peter van Hoof <vanhoof@cita.utoronto.ca>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, vanhoof@cita.utoronto.ca,
        gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c/3753
Date: Tue, 21 Aug 2001 15:58:42 -0400

 This is a multi-part message in MIME format.
 --------------483932510BE5CED01D6C661E
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 I have reduced the code in bevington.c to its bare essentials that
 can still trigger the bug in gcc 3.0.1 20010816 (prerelease). The
 code is attached and is also included here
 
 double sqrt(double);
 void legfit(double[],long);
 
 void legfit(double sigmaa[], long mode)
 {
        long j;
        double varnce;
        double alpha[510];
 
        varnce = ( mode == 0 ) ? 2. : 1.;
        for( j=0; j < 10; j++ )
 	       alpha[j] = sqrt(varnce*sigmaa[j]);
        return;
 }
 
 The core of the problem is that the bug gets triggered if more
 than 4096 bytes need to be allocated on the stack. If the size of the
 array alpha is reduced to 509 or smaller, the internal compiler error in
 change_address, at emit-rtl.c:1635 is NOT triggered, for sizes 510 and
 larger the compiler error IS triggered. Note that gcc 3.0.1 was not fully
 installed. I am confident that this has nothing to do with the bug being
 reported here.
 
 A workaround for the problem would be to declare large arrays static, or
 alternatively to use malloc instead of allocating them on the stack.
 
 I hope this is of some use to you.
 
 Kind regards,
 
 Peter van Hoof.
 
 
 
 Environment:
 System: SunOS oblako 5.8 Generic_108528-09 sun4m sparc SUNW,SPARCstation-20
 Architecture: sun4
 
 host: sparc-sun-solaris2.8
 build: sparc-sun-solaris2.8
 target: sparc-sun-solaris2.8
 configured with: ../gcc-3.0.1-20010816/configure --prefix=/opt/local
 --enable-threads
 
 
 oblako> /opt/local/temp/objdir/gcc/xgcc -B/opt/local/temp/objdir/gcc/ -v
 -save-temps -ansi -c -O2 bevington.c
 Reading specs from /opt/local/temp/objdir/gcc/specs
 Configured with: ../gcc-3.0.1-20010816/configure --prefix=/opt/local
 --enable-threads
 Thread model: posix
 gcc version 3.0.1 20010816 (prerelease)
  /opt/local/temp/objdir/gcc/cpp0 -lang-c -std=c89 -v -iprefix
 /opt/local/temp/objdir/gcc/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/ -isystem
 /opt/local/temp/objdir/gcc/include -D__GNUC__=3 -D__GNUC_MINOR__=0
 -D__GNUC_PATCHLEVEL__=1 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4
 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__OPTIMIZE__
 -D__STDC_HOSTED__=1 -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc
 bevington.c bevington.i
 GNU CPP version 3.0.1 20010816 (prerelease) (cpplib) (sparc)
 ignoring nonexistent directory
 "/opt/local/temp/objdir/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/include"
 ignoring nonexistent directory
 "/opt/local/temp/objdir/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../sparc-sun-solaris2.8/include"
 ignoring nonexistent directory
 "/opt/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/include"
 ignoring nonexistent directory
 "/opt/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../sparc-sun-solaris2.8/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /opt/local/temp/objdir/gcc/include
 
  /usr/local/include
  /usr/include
 End of search list.
  /opt/local/temp/objdir/gcc/cc1 -fpreprocessed bevington.i -quiet -dumpbase
 bevington.c -ansi -O2 -ansi -version -o bevington.s
 GNU CPP version 3.0.1 20010816 (prerelease) (cpplib) (sparc)
 GNU C version 3.0.1 20010816 (prerelease) (sparc-sun-solaris2.8)
         compiled by GNU C version 3.0.1 20010816 (prerelease).
 bevington.c: In function `legfit':
 bevington.c:14: Internal compiler error in change_address, at emit-rtl.c:1635
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
 
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3753&database=gcc
 --------------483932510BE5CED01D6C661E
 Content-Type: text/plain; charset=us-ascii;
  name="bevington.i"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="bevington.i"
 
 # 1 "bevington.c"
 double sqrt(double);
 void legfit(double[],long);
 
 void legfit(double sigmaa[], long mode)
 {
        long j;
        double varnce;
        double alpha[510];
 
        varnce = ( mode == 0 ) ? 2. : 1.;
        for( j=0; j < 10; j++ )
                alpha[j] = sqrt(varnce*sigmaa[j]);
        return;
 }
 
 --------------483932510BE5CED01D6C661E
 Content-Type: text/x-vcard; charset=us-ascii;
  name="vanhoof.vcf"
 Content-Transfer-Encoding: 7bit
 Content-Description: Card for Peter van Hoof
 Content-Disposition: attachment;
  filename="vanhoof.vcf"
 
 begin:vcard 
 n:van Hoof;Peter
 tel;fax:+1-416-978-3921
 tel;home:+1-416-513-1631
 tel;work:+1-416-978-1777
 x-mozilla-html:FALSE
 url: http://www.cita.utoronto.ca/~vanhoof
 org:Canadian Institute for Theoretical Astrophysics;McLennan Labs, University of Toronto
 adr:;;60 St. George Street;Toronto, ON M5S 3H8;;;Canada
 version:2.1
 email;internet:vanhoof@cita.utoronto.ca
 note:Home page: http://www.cita.utoronto.ca/~vanhoof
 x-mozilla-cpt:;-23928
 fn:Peter van Hoof
 end:vcard
 
 --------------483932510BE5CED01D6C661E--
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-21 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 13:06 c/3753 Peter van Hoof

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