llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.

I have written a new pass, it compiles ok but crashes when i run it
with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid
&& "pid cannot be 0"' failed.).

The pass is :

using namespace llvm;
namespace
{
  struct Dfl : public FunctionPass {
    static char ID;
    Dfl() : FunctionPass(ID) { }
    virtual bool runOnFunction(Function &F) {
      bool modified=false;
      errs() << "In Dfl for Function : " << F.getName();
      if (F.empty()) errs() << " is empty." << "\n";
      else errs() << "\n";
      return modified;
    };
    // pass interface to other passes
    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
       AU.addRequired<DominatorTree>();
    }
  }; // end struc Dfl
  // Identifier variable for the pass
  char Dfl::ID = 0;
  // Register the pass
  static RegisterPass<Dfl> X("dfl","emit cfg in dfl format"
                             , false, false);
}

llvm/include/llvm/Pass.h:93: llvm::Pass::Pass(llvm::PassKind,
intptr_t): Assertion `pid && "pid cannot be 0"' failed.

Got the solution, &ID and not ID should be passed to Dfl() :
FunctionPass(&ID) { }