This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/45694] [MinGW64] fortran host associated variables+optimization==failure?



------- Comment #7 from jpr at csc dot fi  2010-09-20 11:46 -------
Hi,
yes the stack size is relevant here, because otherwise gcc does not
call ___chkstk(), which seems to be the trouble here. 4K stack usage
is not very big IMHO.
-Juha

(In reply to comment #6)
> (In reply to comment #3)
> > Even simpler testcase, now in C.
> > 
> > 
> > #include <stdio.h>
> > #include <stdlib.h>
> > 
> > void a()
> > {
> >   char s[2];
> > 
> >   void b() {
> >     char p[4096];
> You deliberately use a very large storage for a very little data.
> And it fails on m64 and not m32 which is rather weird and odd.
> So I went to the bottom of this number which appears to be 3920.
> 3920 = ok
> Any number beyond 3920 fails on m64 wtf?
> I have no idea what is going on.
> It just seems to me interesting to test out your case...
> Yes O0 fails also... who knows...
> > 
> >     if ( strcmp(s,"s")!=0 ) abort();
> >     strcpy( p,"p");
> >   }
> > 
> >   strcpy( s,"s" );
> >   b();
> > }
> > 
> > main()
> > {
> >   a();
> > }
> > 
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45694


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]