Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/pr50763-4.C @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O2 -ftree-tail-merge" } */ float clamp (const float x) { return x <= 1 ? 1 : x; } template < class T > struct VECTOR { float x; }; template < class TV > class JOINT { virtual void Constrain_Angles (VECTOR < float >&angles) const; }; template < class TV > class ANGLE_JOINT:public JOINT < TV > { virtual ~ ANGLE_JOINT () { } void Constrain_Angles (VECTOR < float >&angles) const { VECTOR < float >v; if (v.x) v.x = clamp (angles.x); else v.x = angles.x; angles.x = v.x; } }; template ANGLE_JOINT < int >::~ANGLE_JOINT ();