re PR c++/19666 (Trouble with prt-to-members: rejects-valid/ICE in fold_convert)

PR c++/19666
	2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
	* fold-const.c (fold_convert): Treat OFFSET_TYPE like
	POINTER_TYPE and INTEGER_TYPE.

	* gcc/testsuite/g++.dg/other/ptrmem6.C: New test.

[[Split portion of a mixed commit.]]

From-SVN: r94893.2
This commit is contained in:
Jakub Jelinek 2005-02-11 22:12:48 +01:00 committed by Jakub Jelinek
parent 97e9692bfb
commit 36b23fd76a
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2005-02-11 Jakub Jelinek <jakub@redhat.com>
PR c++/19666
* gcc/testsuite/g++.dg/other/ptrmem6.C: New test.
PR middle-end/19858
* gcc.c-torture/compile/20050210-1.c: New test.

View File

@ -0,0 +1,10 @@
// PR c++/19666
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
// { dg-do compile }
struct A { int i; };
int foo (A *p)
{
return &p->i - &(p->*&A::i);
}