You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/11/08 05:30:46 UTC
svn commit: r593007 - in /incubator/stdcxx/branches/4.2.x/tests/support:
18.csetjmp.cpp 18.setjmp.cpp
Author: sebor
Date: Wed Nov 7 20:30:45 2007
New Revision: 593007
URL: http://svn.apache.org/viewvc?rev=593007&view=rev
Log:
2007-11-07 Martin Sebor <se...@roguewave.com>
Merged rev 593006 from trunk.
STDCXX-654
* 18.setjmp.cpp (run_test): Qualified a local variable with volatile
to work around what looks like a gcc optimized bug.
Modified:
incubator/stdcxx/branches/4.2.x/tests/support/18.csetjmp.cpp
incubator/stdcxx/branches/4.2.x/tests/support/18.setjmp.cpp
Modified: incubator/stdcxx/branches/4.2.x/tests/support/18.csetjmp.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/support/18.csetjmp.cpp?rev=593007&r1=593006&r2=593007&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/support/18.csetjmp.cpp (original)
+++ incubator/stdcxx/branches/4.2.x/tests/support/18.csetjmp.cpp Wed Nov 7 20:30:45 2007
@@ -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/branches/4.2.x/tests/support/18.setjmp.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/support/18.setjmp.cpp?rev=593007&r1=593006&r2=593007&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/support/18.setjmp.cpp (original)
+++ incubator/stdcxx/branches/4.2.x/tests/support/18.setjmp.cpp Wed Nov 7 20:30:45 2007
@@ -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);