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]

Re: PATCH for c++/15764 (adds new pre-lowering EH optimization pass)


On 10/10/07, Richard Guenther <richard.guenther@gmail.com> wrote:

> where you can see that what previously was 'finally' now became
> 'catch' (and thus,
> doesn't call the dtor as required and checked).

To help reproducing this, the following is the complete check_mpq structure
before EH optimization:

;; Function void check_mpq() (_Z9check_mpqv)

void check_mpq() ()
{
  struct mpq_classD.27978 bD.43337;
  struct mpq_classD.27978 aD.43334;
  boolD.1589 D.43379;
  boolD.1589 retval.179D.43378;
  struct __gmp_exprD.26074 * D.43375;
  const struct mpz_classD.27067 D.43335;
  struct __gmp_exprD.26074 * D.43374;
  const struct mpz_classD.27067 D.43336;

  __comp_ctor  (&D.43336, 2);
  try
    {
      __comp_ctor  (&D.43335, 1);
      try
        {
          __comp_ctor  (&aD.43334, &D.43335, &D.43336);
        }
      finally
        {
          try
            {
              D.43375 = (struct __gmp_exprD.26074 *) &D.43335;
              __comp_dtor  (D.43375);
            }
          catch
            {
              __comp_dtor  (&aD.43334);
            }
        }
    }
  finally
    {
      try
        {
          D.43374 = (struct __gmp_exprD.26074 *) &D.43336;
          __comp_dtor  (D.43374);
        }
      catch
        {
          __comp_dtor  (&aD.43334);
        }
    }
  try
    {
      __comp_ctor  (&bD.43337);
      try
        {
          operator= (&bD.43337, &aD.43334);
          D.43379 = operator== (&bD.43337, 5.0e-1);
          retval.179D.43378 = !D.43379;
          if (retval.179D.43378) goto <D.44940>; else goto <D.44941>;
          <D.44940>:;
          __gmp_assert_fail (&"t-assign.cc"[0], 40, &"b == 0.5"[0]);
          <D.44941>:;
        }
      finally
        {
          __comp_dtor  (&bD.43337);
        }
    }
  finally
    {
      __comp_dtor  (&aD.43334);
    }
  return;
}


Richard.


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