This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53364] [4.7/4.8 Regression] Wrong code generation
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 May 2012 10:28:58 +0000
- Subject: [Bug tree-optimization/53364] [4.7/4.8 Regression] Wrong code generation
- Auto-submitted: auto-generated
- References: <bug-53364-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53364
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-05-16
Component|c++ |tree-optimization
Known to work| |4.6.3
Target Milestone|--- |4.7.1
Ever Confirmed|0 |1
Known to fail| |4.7.1
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-16 10:28:58 UTC ---
Confirmed. Reduced testcase:
extern "C" void abort (void);
template<typename _Tp>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
if (__b < __a)
return __b;
return __a;
}
struct A
{
int m_x;
explicit A(int x) : m_x(x) {}
operator int() const { return m_x; }
};
struct B : public A
{
public:
explicit B(int x) : A(x) {}
};
int data = 1;
int main()
{
B b = B(10);
b = min(b, B(data));
if (b != 1)
abort ();
return 0;
}