This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Handle OBJ_TYPE_REF in the type verifier


Looks like nothing in the testsuite or libstdc++ had this, so I added
a testcase as well.

Applied as obvious.

Richard.

2007-10-05  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (verify_gimple_expr): Accept OBJ_TYPE_REF.

	* g++.dg/tree-ssa/obj-type-ref.C: New testcase.

Index: tree-cfg.c
===================================================================
*** tree-cfg.c	(revision 129032)
--- tree-cfg.c	(working copy)
*************** verify_gimple_expr (tree expr)
*** 3850,3855 ****
--- 3850,3859 ----
  	 didn't see a function declaration before the call.  */
        return false;
  
+     case OBJ_TYPE_REF:
+       /* FIXME.  */
+       return false;
+ 
      default:;
      }
  
Index: testsuite/g++.dg/tree-ssa/obj-type-ref.C
===================================================================
*** testsuite/g++.dg/tree-ssa/obj-type-ref.C	(revision 0)
--- testsuite/g++.dg/tree-ssa/obj-type-ref.C	(revision 0)
***************
*** 0 ****
--- 1,19 ----
+ /* { dg-do compile } */
+ 
+ /* This used to fail with type-checking enabled because we didn't
+    expect OBJ_TYPE_REF expressions.  */
+ 
+ class QObject {};
+ class Pile : public QObject {
+ public:
+     virtual void setVisible(void);
+ };
+ class Spider {
+     void dealRow();
+     Pile *redeals[5];
+     int m_redeal;
+ };
+ void Spider::dealRow()
+ {
+     redeals[m_redeal++]->setVisible();
+ }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]