From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16557 invoked by alias); 29 Jul 2004 12:32:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16531 invoked by alias); 29 Jul 2004 12:32:40 -0000 Date: Thu, 29 Jul 2004 12:32:00 -0000 From: "gcc-bugzilla at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040729123210.16819.lindig@cs.uni-sb.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/16819] New: internal error (non-static function call, empty struct as arg) X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg03473.txt.bz2 List-Id: Compilic the code below with -O3 results in an internal compiler error. The error is most likely corellated with empty structs and and non-static functions. If functions are declared static it does not occur, also it only occurs with empty structs passed by value.. The code was generated with my test-code generator Quest: http://www.st.cs.uni-sb.de/~lindig/src/quest/index.html foo.c: In function `main': foo.c:124: error: unable to find a register to spill in class `AREG' foo.c:124: error: this is the insn: (jump_insn:HI 32 170 37 0 (parallel [ (set (pc) (if_then_else (eq (reg:DF 9 st(1) [orig:79 x002vg.x002vd ] [79]) (reg:DF 8 st [orig:80 x002pc ] [80])) (label_ref 46) (pc))) (clobber (reg:CCFP 18 fpsr)) (clobber (reg:CCFP 17 flags)) (clobber (scratch:HI)) ]) 355 {*fp_jcc_5} (insn_list 30 (insn_list 31 (nil))) (expr_list:REG_UNUSED (scratch:HI) (expr_list:REG_UNUSED (reg:CCFP 17 flags) (expr_list:REG_UNUSED (reg:CCFP 18 fpsr) (expr_list:REG_DEAD (reg:DF 9 st(1) [orig:79 x002vg.x002vd ] [79]) (expr_list:REG_DEAD (reg:DF 8 st [orig:80 x002pc ] [80]) (expr_list:REG_UNUSED (scratch:HI) (expr_list:REG_UNUSED (reg:CCFP 17 flags) (expr_list:REG_UNUSED (reg:CCFP 18 fpsr) (expr_list:REG_BR_PROB (const_int 7000 [0x1b58]) (nil))))))))))) foo.c:124: internal compiler error: in spill_failure, at reload1.c:1887 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Environment: System: Linux jacobs 2.4.26-1-686 #1 Sat May 1 18:04:05 EST 2004 i686 GNU/Linux Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-snapshot/configure --enable-languages=c --prefix=/tmp/lindig/gcc How-To-Repeat: gcc -O3 foo.c # 1 "foo.c" # 1 "" # 1 "" # 1 "foo.c" extern int printf (char *, ...); static int errors = 0; static void failed( int line ) { printf ("failed in %s: %d\n", "foo.c", line); errors++; } static struct x002tf { } x002vj = { }; static struct x002te { } x002ve = { }; static unsigned int *x002vf = (unsigned int *) 936956372U; static union x002td { double x002vd[1]; } x002vg = { { 88192.222629 } }; static struct x002tc { double (**x002vc)[1]; union x002tb { } x002vb; struct x002ta { } *x002va; } x002vh = { (double (**)[1]) 221053595U, { }, (struct x002ta *) 215342829U }; static unsigned short int *x002vi = (unsigned short int *) 1191863793U; struct x002tf x002fa( struct x002te x002pa, unsigned int *x002pb, union x002td x002pc, struct x002tc x002pd, unsigned short int *x002pe ) { if (x002vf != x002pb) failed (43); if (x002vg.x002vd[0] != x002pc.x002vd[0]) failed (44); if (x002vh.x002vc != x002pd.x002vc) failed (45); if (x002vh.x002va != x002pd.x002va) failed (46); if (x002vi != x002pe) failed (47); return x002vj; } static void x002fb( ) { struct x002tf x002vk; x002vk = x002fa (x002ve, x002vf, x002vg, x002vh, x002vi); } static struct x001th { } **x001vr = (struct x001th **) 282125612U; static union x001tg { unsigned char x001vm; struct x001tf { char x001vk; float x001vj; } *x001vl; union x001te { unsigned char x001vh; struct x001td { } x001vg; } *x001vi; } x001vn = { '\x77' }; static struct x001tc { unsigned char x001vf; char **x001ve; unsigned int x001vd[2]; } x001vo[2] = { { '\x4f', (char **) 447267482U, { 17134777U, 449880647U } }, { '\x3', (char **) 1576399922U, { 1846818777U, 928825020U } } }; static struct x001tb { unsigned int *x001vc; unsigned char x001vb; double x001va[2][1]; } x001vp = { (unsigned int *) 2102563535U, '\x8', { { 36299.571769 }, { 62135.529636 } } }; static union x001ta { } x001vq = { }; struct x001th ** x001fa( union x001tg x001pa, struct x001tc x001pb[2], struct x001tb x001pc, union x001ta x001pd ) { if (x001vn.x001vm != x001pa.x001vm) failed (101); if (x001vo[1].x001vf != x001pb[1].x001vf) failed (102); if (x001vo[0].x001vf != x001pb[0].x001vf) failed (103); if (x001vo[1].x001ve != x001pb[1].x001ve) failed (104); if (x001vo[0].x001ve != x001pb[0].x001ve) failed (105); if (x001vo[1].x001vd[1] != x001pb[1].x001vd[1]) failed (106); if (x001vo[1].x001vd[0] != x001pb[1].x001vd[0]) failed (107); if (x001vo[0].x001vd[1] != x001pb[0].x001vd[1]) failed (108); if (x001vo[0].x001vd[0] != x001pb[0].x001vd[0]) failed (109); if (x001vp.x001vc != x001pc.x001vc) failed (110); if (x001vp.x001vb != x001pc.x001vb) failed (111); if (x001vp.x001va[1][0] != x001pc.x001va[1][0]) failed (112); if (x001vp.x001va[0][0] != x001pc.x001va[0][0]) failed (113); return x001vr; } static void x001fb( ) { struct x001th **x001vs; x001vs = x001fa (x001vn, x001vo, x001vp, x001vq); if (x001vr != x001vs) failed (121); } int main( int argc, char **argv ) { x002fb (); x001fb (); return errors; } -- Summary: internal error (non-static function call, empty struct as arg) Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lindig at cs dot uni-sb dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16819