https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64578

--- Comment #10 from paul.richard.thomas at gmail dot com <paul.richard.thomas 
at gmail dot com> ---
This fixes the other part of the problem:

*************** gfc_trans_pointer_assignment (gfc_expr *
*** 6917,6922 ****
--- 7033,7039 ----
          rse.expr = gfc_class_data_get (rse.expr);
            else
          {
+           gfc_add_block_to_block (&block, &rse.pre);
            tmp = gfc_create_var (TREE_TYPE (rse.expr), "ptrtemp");
            gfc_add_modify (&lse.pre, tmp, rse.expr);

*************** gfc_trans_pointer_assignment (gfc_expr *
*** 6988,6993 ****
--- 7105,7111 ----
          }
        else
          {
+           gfc_add_block_to_block (&block, &rse.pre);
            tmp = gfc_create_var (TREE_TYPE (rse.expr), "ptrtemp");
            gfc_add_modify (&lse.pre, tmp, rse.expr);

rse is reinitialized in both blocks just a few lines later so that the rse.pre
information is lost. Therefore, class.11 is never set.

I'll take this on and submit the patch tomorrow.

Paul

Reply via email to