From: Wolfgang Bangerth Date: Wed, 4 Feb 2004 16:12:25 +0000 (+0000) Subject: In optimized mode, newer gccs can optimize the burn() function away entirely X-Git-Tag: v8.0.0~15846 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbe9ae2704dd108c185f2a83f0466428465be456;p=dealii.git In optimized mode, newer gccs can optimize the burn() function away entirely if the variable s is a local one. Make it global. git-svn-id: https://svn.dealii.org/trunk@8394 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/timer.cc b/tests/base/timer.cc index 7c957b0346..5a23e3e3f8 100644 --- a/tests/base/timer.cc +++ b/tests/base/timer.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -37,9 +37,9 @@ void compare (double t1, double t2, double ratio) // burn computer time +double s = 0.; void burn (unsigned int n) { - double s = 0.; for (unsigned int i=0 ; i