comp.lang.ada
 help / color / mirror / Atom feed
* GNAT/GCC and -fstack-check
@ 2010-10-25 20:15 Yannick Duchêne (Hibou57)
  2010-10-26  5:11 ` Yannick Duchêne (Hibou57)
  2010-10-26 15:38 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 13+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2010-10-25 20:15 UTC (permalink / raw)


Hi happy people out there,

I would like to know if some ones had the same I get.

First a few words about the context. I wanted to get ride of having two  
compilers, GNAT from AdaCore and GNAT from MinGW, to keep only one, which  
I choose to be MinGW for multiple reasons. When I wanted to build some  
applications which was built before with GNAT from AdaCore with now the  
GNAT from MinGW, I get a surprising behavior.

I was using -fstack-check in the GPR file. At compile time, I get these  
king of messages :

    xxxxx.adb: In function 'XXX.YYY'
    xxxxx.adb:1:22: warning: frame size too large for reliable stack  
checking
    xxxxx.adb:1:22: warning: try reducing the number of local variables


Where XXX.YYY is actually not a function but a package (do not know why  
the message says it is a function). Moreover, there was not so much local  
variables… just a few.

None of the compiled applications could launch and were all crashing right  
at stat-up. After some time (I check the package raising these warnings  
was the ones whose initialization was crashing) I decided to remove the  
-fstack-check option from the GPR file. There were then no more warnings  
and compiled applications could run properly.

I wonder if this is GCC related or GNAT related. The MinGW is the last one  
(decided to update it in the while), it seems to use GCC 4.5 and GNAT  
2009. I suppose it is based on GNAT 2009, as “gnat make -v” does not know  
about the “-gnat12” option.

Any body experienced something similar with GNAT and -fstack-check ? Or is  
are there some reasons to suppose this is more GCC related than GNAT  
related ?



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-10-27 14:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-25 20:15 GNAT/GCC and -fstack-check Yannick Duchêne (Hibou57)
2010-10-26  5:11 ` Yannick Duchêne (Hibou57)
2010-10-26  5:23   ` Yannick Duchêne (Hibou57)
2010-10-26  8:04     ` Ludovic Brenta
2010-10-26  8:16       ` Yannick Duchêne (Hibou57)
2010-10-26 15:11         ` Ludovic Brenta
2010-10-26 16:33           ` Georg Bauhaus
2010-10-26 15:38 ` Yannick Duchêne (Hibou57)
2010-10-26 15:38   ` Yannick Duchêne (Hibou57)
2010-10-26 18:19   ` Ludovic Brenta
2010-10-26 18:55     ` Yannick Duchêne (Hibou57)
2010-10-27  7:35       ` Ludovic Brenta
2010-10-27 14:58         ` Yannick Duchêne (Hibou57)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox