Path: utzoo!telly!ddsw1!mcdchg!rutgers!ucsd!sdcsvax!beowulf!dlong From: dlong@beowulf.ucsd.edu (Dean Long) Newsgroups: gnu.gcc.bug Subject: Re: Bugs in gcc (I'm trying to get g++ working): Message-ID: <5336@sdcsvax.UCSD.EDU> Date: 29 Sep 88 00:53:16 GMT References: <8809272301.AA01392@mouse.> <5335@sdcsvax.UCSD.EDU> Sender: nobody@sdcsvax.UCSD.EDU Reply-To: dlong@beowulf.UCSD.EDU (Dean Long) Distribution: gnu Organization: EE/CS Dept. U.C. San Diego Lines: 41 >No fix, but the problem is returning a structure. This simple program >won't work for me: > >#include > >FILE foo() >{ > FILE a; > > return a; >} > >Dean Long >dlong@beowulf Ok, I've found part (maybe all) of the problem. This is for Gcc 1.28 on Sun4 sparcs. The problem is with block moves of more than 16 bytes. In output_block_move(), xoperands[] should be initialized before comparing elements to 0. Since it is an automatic variable by default, strange things show up. -----BUG----FIX---CUT-------(CAREFULLY)-----HERE-------- *** output-sparc.c.orig Wed Sep 28 17:39:41 1988 --- output-sparc.c Wed Sep 28 17:40:57 1988 *************** *** 688,693 **** --- 688,694 ---- bzero (reg_conflicts, sizeof (reg_conflicts)); bzero (op_conflicts, sizeof (op_conflicts)); + bzero (xoperands, sizeof (xoperands)); /* Get past the MEMs. */ operands[0] = XEXP (operands[0], 0); Dean Long University of California, San Diego dlong@beowulf.ucsd.edu