re PR rtl-optimization/18084 (setfill coupled with inline function: incorrect results on Linux x86)
PR rtl-optimization/18084 * g++.dg/opt/pr18084-1.C: New testcase. From-SVN: r89900
This commit is contained in:
parent
de2d7877ba
commit
1db4252cea
2 changed files with 37 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-10-30 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR rtl-optimization/18084
|
||||
* g++.dg/opt/pr18084-1.C: New testcase.
|
||||
|
||||
2004-10-30 Matt Austern <austern@apple.com>
|
||||
|
||||
PR c++/17542
|
||||
|
|
32
gcc/testsuite/g++.dg/opt/pr18084-1.C
Normal file
32
gcc/testsuite/g++.dg/opt/pr18084-1.C
Normal file
|
@ -0,0 +1,32 @@
|
|||
// { dg-do run }
|
||||
// { dg-options "-O3" }
|
||||
|
||||
extern "C" void abort (void);
|
||||
|
||||
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 ();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue