Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/lto/20080908-1_0.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-lto-do run } */ extern "C" { extern void *memcpy (void *, const void *, __SIZE_TYPE__); } inline int bci (const float &source) { int dest; memcpy (&dest, &source, sizeof (dest)); return dest; } inline float bcf (const int &source) { float dest; memcpy (&dest, &source, sizeof (dest)); return dest; } float Foo () { const int foo = bci (0.0f); int bar = foo; const int baz = foo & 1; if (!baz && (foo & 2)) bar = 0; return bcf (bar); } int main () { if (Foo () != 0.0) return 1; return 0; }