This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/45694] [MinGW64] fortran host associated variables+optimization==failure?
- From: "jpr at csc dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2010 11:46:36 -0000
- Subject: [Bug target/45694] [MinGW64] fortran host associated variables+optimization==failure?
- References: <bug-45694-11807@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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