public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7473: gcc-3.1.1: Internal compiler error in find_function_data
@ 2002-08-02  9:56 marco.walther
  0 siblings, 0 replies; only message in thread
From: marco.walther @ 2002-08-02  9:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7473
>Category:       c++
>Synopsis:       Internal compiler error in find_function_data
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 02 09:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Marco Walther
>Release:        3.1.1
>Organization:
Sun Microsystems, Inc.
>Environment:
System: SunOS janus4 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-250
Architecture: sun4
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../gcc-3.1.1/configure --prefix=/set/gnu/local --enable-shared --with-gnu-as
>Description:
The following little test case results in an internal error.
---------------------------------------------------------------------------
struct C
{
  int i;
  static struct C **c;
};


extern int sig_max();

C ** C::c = new C *[sig_max() + 1];

void foo()
{
   C::c[2]->i = 6;
}
---------------------------------------------------------------------------
marcow@janus4:/set/gnu/src/gcc-3.1.1/sparc-S7/gcc>./xgcc -B./ /tmp/gcc.C -c -o /tmp/gcc.o
/tmp/gcc.C: In function `void __static_initialization_and_destruction_0(int,
   int)':
/tmp/gcc.C:10: Internal compiler error in find_function_data, at function.c:329
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
---------------------------------------------------------------------------
We found this problem with gcc-3.1 and it happens on all system we tested
(Solaris SPARC/Intel & Linux). It's still there in 3.1.1

>How-To-Repeat:
Just try to compile the above test case.

>Fix:
Workaround: create another static int variable to hold the result of sig_max()
and use that for the array dimension.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

only message in thread, other threads:[~2002-08-02 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-02  9:56 c++/7473: gcc-3.1.1: Internal compiler error in find_function_data marco.walther

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