Avoid inserting an empty scopeless BlockStmt during normalize_returns



normalize_returns was inserting scopeless BlockStmts near the entry
point to functions that returned a value.  This change removes this
insertion.


The change is just below line 506 of normalize.cpp

The original code is

      else
      {
        CallExpr* initExpr =
          new CallExpr(PRIM_INIT, retExprType->body.tail->remove());
        fn->insertAtHead(new CallExpr(PRIM_MOVE, retval, initExpr));
        fn->insertAtHead(retExprType);
      }

It was clear to me that there were cases in which retExprType contained
just one statment at the start of the block and hence was empty when it
was inserted in the function.  A little more consideration lead me to
conclude that retExprType always contained a single statement.

The code I tested was

      else
      {
        CallExpr* initExpr =
          new CallExpr(PRIM_INIT, retExprType->body.tail->remove());
          fn->insertAtHead(new CallExpr(PRIM_MOVE, retval, initExpr));
          INT_ASSERT(retExprType->length() == 0);
      }

I ran this on paratest and verified the assert does not trigger.  The
code I am submitting is

      else
      {
        CallExpr* initExpr =
          new CallExpr(PRIM_INIT, retExprType->body.tail->remove());
          fn->insertAtHead(new CallExpr(PRIM_MOVE, retval, initExpr));
      }


Compiled: STD clang/gcc
Tested:   paratest
Review:   Tom



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23822 3a8e244f-b0f2-452b-bcba-4c88e055c3ca