--- Comment #4 from jason at gcc dot gnu dot org 2008-11-12 20:52 ---
Subject: Bug 38007
Author: jason
Date: Wed Nov 12 20:50:45 2008
New Revision: 141800
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=141800
Log:
PR c++/38007
--
jason at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org
--- Comment #3 from jakub at gcc dot gnu dot org 2008-11-06 15:15 ---
And for:
struct A
{
template typename T __attribute__((noinline)) operator T ()
{
return (T) 0;
}
};
struct B
{
unsigned int b : 8;
};
int
main ()
{
A u;
unsigned int v = u;
B w;
w.b = u;
}
we
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-11-04 10:39 ---
The following also fails the same way with optimization:
class foo {
public:
template typename T __attribute__((noinline))
operator T () { return (T)0; }
};
struct bar {
unsigned int _bar : 24;
};
int
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-11-03 20:07 ---
Confirmed, a regression from GCC 4.1.1.
Here is a self contained example :):
class foo {
public:
template typename T operator T ();
};
template typename T
inline foo::operator T () {
return