From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11534 invoked by alias); 25 Oct 2004 14:24:57 -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 11392 invoked by uid 48); 25 Oct 2004 14:24:55 -0000 Date: Mon, 25 Oct 2004 14:24:00 -0000 Message-ID: <20041025142455.11391.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041020163657.18084.knutejunk@austin.rr.com> References: <20041020163657.18084.knutejunk@austin.rr.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/18084] [3.4 only]setfill coupled with inline function: incorrect results on Linux x86 X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg03069.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-10-25 14:24 ------- Here is a short testcase: ---------------------- struct X { bool init; void foo() { if (!init) init = true; } void bar() { foo(); } }; typedef unsigned long long int uint64_t; uint64_t mask1, mask2; uint64_t calc() { return mask1 & mask2; } int main() { mask1 = 0x00000000FFFFFFFFull; mask2 = 0x000000000000FFFFull; uint64_t value = calc(); X().bar(); if(value != calc()) abort (); } ------------------------------ g/x> /home/bangerth/bin/gcc-3.4.3-pre/bin/c++ y.cc && ./a.out g/x> /home/bangerth/bin/gcc-3.4.3-pre/bin/c++ -O3 y.cc && ./a.out Aborted g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -O3 y.cc && ./a.out g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -O3 y.cc && ./a.out Thus, the problem is confined to the 3.4 branch (which does not mean, of course, that the bug isn't latent on mainline as well). W. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-10-25 14:24:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18084