From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16129 invoked by alias); 7 Dec 2001 16:35:58 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16080 invoked from network); 7 Dec 2001 16:35:56 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 7 Dec 2001 16:35:56 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 08A9F1E616 for ; Fri, 7 Dec 2001 17:35:55 +0100 (MET) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: gcc@gcc.gnu.org Subject: ICE in dwarf2out_finish due to -freorder-blocks X-Yow: ... Blame it on the BOSSA NOVA!!! From: Andreas Schwab Date: Fri, 07 Dec 2001 09:39:00 -0000 Message-ID: User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.1.30 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2001-12/txt/msg00367.txt.bz2 Here is a test case where the current snapshot crashes when compiling with -O -freorder-blocks -g on ia64-linux: typedef long unsigned int size_t; typedef int int32_t __attribute__ ((__mode__ (__SI__))); struct obstack { char *next_free; char *chunk_limit; }; typedef unsigned int uint32_t; struct charmap_t { }; enum { __LC_COLLATE =3D 3, }; enum { _NL_NUM_LC_COLLATE, }; struct iovec { void *iov_base; size_t iov_len; }; struct localedef_t { union { struct locale_collate_t *collate; } categories[13]; }; static inline void obstack_int32_grow (struct obstack *obstack, int32_t data) { if (sizeof (int32_t) =3D=3D sizeof (int)) __extension__ ({ struct obstack *__o =3D (obstack); if (__o->next_free = + sizeof (int) > __o->chunk_limit) _obstack_newchunk (__o, sizeof (int)); *= ((int *)__o->next_free)++ =3D (data); (void) 0; }); else __extension__ ({ struct obstack *__o =3D (obstack); int __len =3D (size= of (int32_t)); if (__o->next_free + __len > __o->chunk_limit) _obstack_newc= hunk (__o, __len); memcpy ((__o->next_free), ((&data)), (__len)); __o->next= _free +=3D __len; (void) 0; }); } struct element_t { size_t nwcs; struct element_t *wcnext; }; struct wchead_table { }; void wchead_table_iterate (struct wchead_table *t, void (*fn) (uint32_t wc, struct element_t * value)); struct collidx_table { unsigned int p; unsigned int q; size_t result_size; char *result; }; void collidx_table_init (struct collidx_table *t); void collidx_table_add (struct collidx_table *t, uint32_t wc, int32_t value= ); struct locale_collate_t { struct wchead_table wcheads; }; int32_t output_weightwc (struct obstack *pool, struct locale_collate_t *collate, struct element_t *elem); void collate_output (struct localedef_t *locale, struct charmap_t *charmap, const char *output_path) { struct locale_collate_t *collate =3D locale->categories[__LC_COLLATE].col= late; const size_t nelems =3D ((int) (_NL_NUM_LC_COLLATE) & 0xffff); struct iovec iov[2 + nelems]; uint32_t idx[nelems]; size_t cnt =3D 0; struct obstack weightpool; struct obstack extrapool; struct collidx_table tablewc; obstack_int32_grow (&extrapool, 0); { auto void add_to_tablewc (uint32_t ch, struct element_t *runp); void add_to_tablewc (uint32_t ch, struct element_t *runp) { if (runp->wcnext =3D=3D ((void *)0) && runp->nwcs =3D=3D 1) { int32_t weigthidx =3D output_weightwc (&weightpool, collate, ru= np); collidx_table_add (&tablewc, ch, weigthidx); } } tablewc.p =3D 6; tablewc.q =3D 10; collidx_table_init (&tablewc); wchead_table_iterate (&collate->wcheads, add_to_tablewc); } iov[2 + cnt].iov_base =3D tablewc.result; iov[2 + cnt].iov_len =3D tablewc.result_size; idx[1 + cnt] =3D idx[cnt] + iov[2 + cnt].iov_len; } Andreas. --=20 Andreas Schwab "And now for something Andreas.Schwab@suse.de completely different." SuSE Labs, SuSE GmbH, Schanz=E4ckerstr. 10, D-90443 N=FCrnberg Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5