This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53336] invalid types in nop conversion
- From: "zeratul976 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 May 2012 08:50:53 +0000
- Subject: [Bug c++/53336] invalid types in nop conversion
- Auto-submitted: auto-generated
- References: <bug-53336-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53336
Nathan Ridge <zeratul976 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zeratul976 at hotmail dot
| |com
--- Comment #1 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-05-14 08:50:53 UTC ---
Reduced testcase:
bool foo();
struct C
{
C()
{
if (foo())
foo();
}
};
struct S
{
struct dummy
{
int i_;
};
typedef int dummy::*bool_type;
operator bool_type() const
{
return foo() ? &dummy::i_ : 0;
}
};
int x;
struct adaptor
{
C c;
virtual void bar()
{
if (S())
x = 0;
}
};
int main()
{
adaptor a;
}
Compile with -O2. Errors:
test.cpp: In member function 'virtual void adaptor::bar()':
test.cpp:32:18: error: invalid types in nop conversion
virtual void bar()
^
<<< Unknown tree: offset_type >>>
bool
D.2314_1 = (<<< Unknown tree: offset_type >>>) D.2313_9;
test.cpp:32:18: internal compiler error: verify_gimple failed