Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/pr65002.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR tree-optimization/65002 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ namespace fastmath { template <typename T> float floor(const T &) __attribute__((const)); template <typename T> float floor(const T &p1) { return p1; } } using fastmath::floor; class A { public: A(int, int); virtual void m_fn1(float) const; }; class B : A { public: B(int, int p2) : A(entity, p2) {} void m_fn1(float p1) const { long b(floor(p1)); } int entity; }; int a; void Convert() { if (int *c = 0) B(*c, a); }