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 #8 from t66667 at gmail dot com  2010-09-20 11:59 -------
(In reply to comment #7)
> 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.
I went deeper... and found out with gcc-4.5-branch the number is different...
3952 = ok
Any number greater then 3952 fails on gcc-4.5...
And again this only applies to m64 not m32...

And very weird it seems that 3952 - 3920 = 32 ...

> -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]