From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,b247b827ff505c65,start X-Google-Attributes: gid111c93,public From: Philippe Le Foll Subject: strange behavioI under GCC Date: 1998/01/06 Message-ID: <34B26BF3.7349CAD7@fridu.com>#1/1 X-Deja-AN: 313523573 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Wanadoo - (Client of French Internet Provider) Newsgroups: comp.os.linux.alpha,phillf@fridu.sene.bzh I try porting a software from Linux 32bit to Linux Alpha, I am currentelly lock on following probleme. I have a pointer to a valid structure, I copy the adress value to an other pointer and even with both pointers having the same value, when printing contend they differ: Here after a small trace: - cmd is the original pointer - staticCmd is a copy They both point on 0x12012a160 adress and have the same type (gdb) print cmd ->$4 = (BenchCommand *) 0x12012a160 (gdb) print staticQuit ->$5 = (BenchCommand *) 0x12012a160 Looking inside give a different value execpt for 3 first values !!! (gdb) print *staticCmd $2 = {inFileId = -1, outFileId = 14, nbUnderflow = 0, nbOverflow = 2748779069440, maxMissed = 16384, blockNum = 0, blockSize = 0, hertz = 0, ticMs = 0, bufferSize = 0, bufferSum = 0, bufferTicSize = 0, bufferTicIdx = -4616189618054758400, ticPerBlock = 13830554455654793216, askedSpeed = 4817, askedTimer = 1, lowLevel = 4832904016, hop = 0, rtc = 0, realtime = 0, cpu = 0, user = 4.9406564584124654e-324} (gdb) print *cmd $3 = {inFileId = -1, outFileId = 14, nbUnderflow = 0, nbOverflow = 0, maxMissed = 0, blockNum = 640, blockSize = 16384, hertz = 0, ticMs = 0, bufferSize = 0, bufferSum = 0, bufferTicSize = 0, bufferTicIdx = 0, ticPerBlock = 0, askedSpeed = 0, askedTimer = 1000, lowLevel = 0, hop = 0, rtc = 0, realtime = 0, cpu = -1, user = -1} Note: 1:Originally pointer was passed as an argument, I change for static and public values but it does not change any thing. 2: I compile with no optimisation and add -no-defert-retrurn-pop bit it as no influence 3: The only original thing with my procedure is that it takes one parameters but is call from a generic entry point with 10 parameters, nevertheless it should not be a probleme and furthermore works even on Linux-alpha in all other procedure, only this on create trouble. It is also the first structure a pas with this method Any idea ???? Thank for your help Philippe