summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xunix/configure6
-rw-r--r--unix/configure.in6
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 53b15cf..70860fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-30 Reinhard Max <max@suse.de>
+
+ * unix/configure.in: Add a volatile declaration to the test for
+ TCL_STACK_GROWS_UP to prevent gcc 4.6 from producing invalid
+ results due to aggressive optimisation.
+
2011-06-23 Don Porter <dgp@users.sourceforge.net>
*** 8.5.10 TAGGED FOR RELEASE ***
diff --git a/unix/configure b/unix/configure
index ed71de0..aa792a7 100755
--- a/unix/configure
+++ b/unix/configure
@@ -18705,10 +18705,12 @@ cat >>conftest.$ac_ext <<_ACEOF
int StackGrowsUp(int *parent) {
int here;
+ volatile int result;
if (parent)
- return (&here < parent);
+ result = (&here < parent);
else
- return StackGrowsUp(&here);
+ result = StackGrowsUp(&here);
+ return result;
}
int main (int argc, char *argv[]) {
return StackGrowsUp(0);
diff --git a/unix/configure.in b/unix/configure.in
index e30c937..3394369 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -705,10 +705,12 @@ AC_CACHE_CHECK([if the C stack grows upwards in memory], tcl_cv_stack_grows_up,
AC_TRY_RUN([
int StackGrowsUp(int *parent) {
int here;
+ volatile int result;
if (parent)
- return (&here < parent);
+ result = (&here < parent);
else
- return StackGrowsUp(&here);
+ result = StackGrowsUp(&here);
+ return result;
}
int main (int argc, char *argv[]) {
return StackGrowsUp(0);