------- 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

Reply via email to