Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/pr65002.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
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); }