Re: Problems with SgStatement::copy()

here is one idea:
do not create a new statement and then copy over it with
the assignment operator.  it is better to do the following

       if (r_st) {
            st = &(r_st->copy());
        } else
                st = 0;

the copy operator will allocate things for you.
However, i am not sure that this will also copy line numbers.
because you are creating a new "copy" of a statement, it is
not really part of the file and may not have copies of the line