From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23006 invoked by alias); 4 Aug 2003 23:37:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22996 invoked by uid 48); 4 Aug 2003 23:37:04 -0000 Date: Mon, 04 Aug 2003 23:37:00 -0000 Message-ID: <20030804233704.22992.qmail@sources.redhat.com> From: "pinskia at physics dot uc dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030801203357.11767.lothar@xcerla.com> References: <20030801203357.11767.lothar@xcerla.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11767] different code behaviour with -fnon-call-exceptions -fprofile-arcs X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg00405.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11767 pinskia at physics dot uc dot edu changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2003-08-04 23:37:03 date| | Summary|different code behaviour |different code behaviour |with -fprofile-arcs -ftest- |with -fnon-call-exceptions - |coverage |fprofile-arcs ------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-04 23:37 ------- Okay the problem is not per say with -fprofile-arcs -ftest-coverage but with -fnon-call- exceptions and -fprofile-arcs. I can confirm this on the mainline (20030804) Here is the reduced source but I could not remove the dependent on string: #include typedef unsigned long ACE_UINT32; extern "C" void abort(); static ACE_UINT32 const msc_maxCurrencyID = 9999; class ResourceBalanceType2 { public: explicit ResourceBalanceType2( ACE_UINT32 resourceBalanceTypeID, ACE_UINT32 isoValue, const std::string& rc_shortName, const std::string& rc_symbol ); public: const ACE_UINT32 mc_resBalTypeID; const ACE_UINT32 mc_isoValue; const std::string mc_shortName; const std::string mc_symbol; }; void f(){} ResourceBalanceType2::ResourceBalanceType2( ACE_UINT32 resourceBalanceTypeID, ACE_UINT32 isoValue, const std::string& rc_shortName, const std::string& rc_symbol ): mc_resBalTypeID(resourceBalanceTypeID), mc_isoValue(isoValue), mc_shortName(rc_shortName), mc_symbol(rc_symbol) { bool isGreater = (mc_isoValue > msc_maxCurrencyID); f(); bool temp = mc_isoValue > msc_maxCurrencyID; if(!isGreater) abort(); if(!temp) abort(); } int main ( int argc, char * argv[] ) { ACE_UINT32 const mc_isoValue = 10000; ResourceBalanceType2 rbResourceBalanceType2(3, mc_isoValue, "ATM", "M"); }