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 to c-semantics.c for c++/12519


The conversion I added in the patch cited in the PR causes an inlined
CLEANUP_STMT to sometimes have a CLEANUP_DECL that looks like

 *(const T*)&decl

rather than just

 decl

Ignoring such things shouldn't cause any problems.

Tested athlon-pc-linux-gnu, applied to trunk.  Test in g++.dg/opt/inline5.C.

2003-10-07  Jason Merrill  <jason@redhat.com>

	PR c++/12519
	* c-semantics.c (genrtl_cleanup_stmt): Ignore the CLEANUP_DECL if
	it isn't a decl.

*** c-semantics.c.~1~	2003-09-08 17:21:20.000000000 -0400
--- c-semantics.c	2003-10-07 17:22:33.000000000 -0400
*************** void
*** 758,764 ****
  genrtl_cleanup_stmt (tree t)
  {
    tree decl = CLEANUP_DECL (t);
!   if (!decl || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
      expand_decl_cleanup_eh (decl, CLEANUP_EXPR (t), CLEANUP_EH_ONLY (t));
  }
  
--- 758,765 ----
  genrtl_cleanup_stmt (tree t)
  {
    tree decl = CLEANUP_DECL (t);
!   if (!decl || !DECL_P (decl)
!       || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
      expand_decl_cleanup_eh (decl, CLEANUP_EXPR (t), CLEANUP_EH_ONLY (t));
  }
  

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