I just compiled it with gcc 2.95 and it compiled and ran fine.. very strange....
xucaen --- Mark Phillips <[EMAIL PROTECTED]> wrote: > Hi, > > I thought I'd found a gcc compiler error (and > still may have). The > following program crashes with a segmentation > fault. > > #define N 209677 > > int main(int argv, char **argc) { > int > i; > double > a[N], > b[N], > c[N], > d[N], > e[N]; > > c[0]=0.0; > i=1; > c[i]=c[i-1]; > } > > If I make N slightly less, or reduce the number > of arrays defined, it > runs fine. If I write instead "c[1]=c[0]" it > runs fine. Basically, I > simplified the original program as much as I > could in ways which still > caused the Seg Fault to happen. > > So I thought this must be a compiler error. > The program was called > "thick4.c". I used emacs to paste the file > into a new buffer called > "test.c". But this one worked fine when I > compiled!!!! The two files > "thick4.c" and "test.c" are identical, as both > diff and cmp prove. > > The executables "thick4" and "test" differ very > slightly however. > > -rwxrwxr-x 1 mark mark 4731 Mar > 7 02:53 test* > -rw-rw-r-- 1 mark mark 162 Mar > 7 02:53 test.c > -rwxrwxr-x 1 mark mark 4733 Mar > 7 02:53 thick4* > -rw-r--r-- 1 mark mark 162 Mar > 7 02:51 thick4.c > > and > > $ cmp thick4 test > thick4 test differ: char 3061, line 2 > > Why would identical files compile to slightly > different executables? > I have included gzipped versions of these > executables with this email. > > Has anyone got any idea what might be going on? > Or suggestions about > what I could investigate next! > > Also, can anyone else replicate the error I got > (using thick4.c as > your file name). > > Thanks, > > Mark. > > -- > _/~~~~~~~~\___/~~~~~~\____________________________________________________ > ____/~~\_____/~~\__/~~\__________________________Mark_Phillips____________ > ____/~~\_____/[EMAIL PROTECTED] > ____/~~\HE___/~~\__/~~\APTAIN_____________________________________________ > ____/~~\______/~~~~~~\____________________________________________________ > __________________________________________________________________________ > "They told me I was gullible ... and I > believed them!" > > > ATTACHMENT part 2 application/octet-stream > < í ¥: > > ´ ?ÛÃF%-D m?Z?^-Ú¤\¤+Á@<lwO»kv÷lvÏêâ% ¶ H©éC> S LÔhÄ l¢?>TJDã%Äh0* > &~?^?D ?!®ß?3gÏìº$¾øä4³3ßüß?ÿÌ æYK û¶isÆÜäc~FèÒ ½¶å[óE{ °y¬?e«P F y uÊ5È:² ù:eÈ(/C}??i2ó å P&}V/ä¼m 2ä e ó¤Ü?b > ò)È(Y >)åºÌµè¤ö°^K9?è½?x*-7²¶Ñ*ÚëåØzv<.}á%¿ì¿FÖuE¦Up+S?ò)øó ?w > ¯Fþ øm?;?¿Å³?*1 3á¤eÆSf63{w, ?§Ì\ÖS,F*R? ?§ÐRM§¯·³Ël5s?7èO|??ûª^?©> _Lò¸Ä/ã>Ìf£N ? ?q*á > *á¼Ç?ÿ\¸º¼ ?¸û ÏÒ?çò¨ÏýA?ÏBcßg³¨ ï ?FqÝ1ü ·¸?z?QõÊ¥"Ò:ê9F²+ç9& 1 Ö* @"¶üúäñY > -oì > í?µÃ§1 ?~lOlº ×Î} ÒõññSñ¤ -¬ 8:ãøSç1~ñRâÜÚÂ- ?)÷ð/?¯EQ Û¥ _A*QV<Ï[ > >Yîò ô*ÑÉâÂÙë± Zçzañ\)?#ѱèï³YQ~pJ(4 ÎÞ^µOb¸\Ë rîá«wýy^õY;:³ñ=>ÏsGϺµàMê{4xóø?1ý[j >$Úèö>½ck¿ä cÔpQ_tqmýè«ßÕ Ý9J_|~¦9l¡ß¢S7ê/?/ÌÞ,<TÌ]ßç?U-?ß6Ãñãs?üU,,ãçëDDÅóòûño(¿<[N)²Ó~ü Sf#¢M?k¬ ?> k-qÑ?¸¦X?FIq B¹ %ÁERo?ì-Æ2 ;4 ú¬Ëy\1v;Å ú¥z %Å ^&KÌÄnC;?jÓX~CÙtÄ /ëéêz0Ð?íb} Õxà~£5ÐÚ?ÔÚÚ hê¶ âáT }´Ï¬ÿ?Ñ] ?×s[?æ éÑÿº? ÙfI'<?ÒÉ^2æÖâ)ìnif¤lÇ2::{ïuÂCÌ^?³1fD ¦ (J'Ã?¡TÎxÚÊdãvª ~?e¬?1d;¢?N8Ôs ¿¼êXyü ¢ r; vÂè?ÿZ1±³2#âØ?,sEÁ»,Ýp2 Áp ²hã? ;?´R? 0û·i óÎ#~þÊõì&÷,¹ y¾äñsR?g<LîùF^?<S¹&ðîQäî?º??¸# Åb ¼ RWcÞùú ñH<SÝi ³UÆ×Ãø as»^¹&YØ \»>× qJuSÕ6Y~?j-R y?« ^È'V?μ»> á?£½a¿Oì º?YËËÉþiï¡½É o] ÿ=§ð¦À> ok ?ò°Â£»×%ðö+ ¿{Ö¾¨ðh/l?òÚ*vO0o ì o¯îE?Ê>?<ú&ü¾¥ ?Wò^Qxt&%ôò;?[ ]áÑé?¾?Ýw ^ ¼ü-x§ íáÃUæKù}é âñ{¡.î?5 > ?úYaÞ ? Øö V-\- "ù~?·²Êø>Wt( oµÒàV¿a"ÞÜ´ fÍW±Û > mºé+ð¾¯Â«¼sÖÖÑuZÄÿ&æÅÛ,Sþ?¡ñ÷*ã«-hÿ`\_°hY XXn*aa!TÂÂ;Ó%,?ì??~q?çñ*°ðL¨?ÅJØ_ 8vJx!ÇS%¼^ãK%,V0Å?À<9Þ[ÂK8>0á⥠'JXD[º? 8Î-p#ÇÃ%,vØ© ^.ìOºxE ¾ÌÏ~~ QñÊ > ¼ª ¯®ÀkÄ^Wpï&u| .ö *äw+ú:»V䧨"§7Ht½?-e *ùk~ 7Ê~"ߥè?½AÅYôZ8HþRä#Ò +¹ü6ö ÊcS?ö>S > ~£¬¿¥ì=æ} ß§Ú|êG¼ù|¬`êï JGÑ'{m#·¶w?y÷XsÿµSùñýD±W¬2?iÅ¿ó4o½4`½,ÕÊß^Ís«+âx?æÿF¬ÿ-Zù ò?æÿzô?¤yë ö³s°¿?ë×±¼Vþæ?Ô¼x `¾'5o>?^Y7+ú{WóÖ Öÿ,pH? ª*¿a/(ý×??*?'@?C?H«?;O:?°¢ <? å*Ëú,~µSd?¬? 4",mÜ?gkwhçn³¯·??w0i'À< mô ¶Í¡?= N~ü¦e?sy´ 5·íîØ 4;f=½; Dw53sK& 2{à)+â --L¼?E+ÝîduÐÎD,Ó±M~¥3Í.Ÿj0¢ ä?à?nNéV? [EMAIL PROTECTED]'³û? Û{»ª¿Ç·nõ äæ`Ú?=ÃL~÷¼Å³¿?/Ühs¸[ʺ|[EMAIL PROTECTED];;;úÌ?Û¶õ Cf¨£³/^ Y©è?ÿÓ öQþo<¿ ?>^·{ __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/