stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r593006 - in /incubator/stdcxx/trunk/tests/support: 18.csetjmp.cpp 18.setjmp.cpp
Date Thu, 08 Nov 2007 04:29:18 GMT
Author: sebor
Date: Wed Nov  7 20:29:17 2007
New Revision: 593006

URL: http://svn.apache.org/viewvc?rev=593006&view=rev
Log:
2007-11-07  Martin Sebor  <sebor@roguewave.com>

	STDCXX-654
	* 18.setjmp.cpp (run_test): Qualified a local variable with volatile
	to work around what looks like a gcc optimizer bug.
	* 18.csetjmp.cpp (run_test): Ditto.

Modified:
    incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp
    incubator/stdcxx/trunk/tests/support/18.setjmp.cpp

Modified: incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp?rev=593006&r1=593005&r2=593006&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp (original)
+++ incubator/stdcxx/trunk/tests/support/18.csetjmp.cpp Wed Nov  7 20:29:17 2007
@@ -2,7 +2,7 @@
  *
  * 18.csetjmp.cpp - test exercising [support.runtime], header <csetjmp>
  *
- * $Id:$
+ * $Id$
  *
  ***************************************************************************
  *
@@ -68,7 +68,9 @@
 #endif   // setjmp
 
     // verify that setjmp works
-    int arg = 1;
+    // using volatile to work around a gcc optimizer bug:
+    //   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34024
+    volatile int arg = 1;
     int result;
 
     result = setjmp (env);

Modified: incubator/stdcxx/trunk/tests/support/18.setjmp.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/support/18.setjmp.cpp?rev=593006&r1=593005&r2=593006&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.setjmp.cpp (original)
+++ incubator/stdcxx/trunk/tests/support/18.setjmp.cpp Wed Nov  7 20:29:17 2007
@@ -2,7 +2,7 @@
  *
  * 18.setjmp.cpp - test exercising [support.runtime], header <setjmp.h>
  *
- * $Id:$
+ * $Id$
  *
  ***************************************************************************
  *
@@ -68,7 +68,11 @@
 #endif   // setjmp
 
     // verify that setjmp works
-    int arg = 1;
+
+    // using volatile to work around a gcc optimizer bug:
+    //   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34024
+    volatile int arg = 1;
+
     int result;
 
     result = setjmp (env);



Mime
View raw message