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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |anlauf at gmx dot de,
                   |                            |tkoenig at netcologne dot de
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2026-07-02

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
Good spot!

Why I didn't complete this, I don't know. What I had been meaning to do, was
something like:

    case EXEC_SELECT_RANK:
      d = c->block;
      fputc ('\n', dumpfile);
      code_indent (level, 0);
      if (c->op == EXEC_SELECT_RANK)
        fputs ("SELECT RANK ", dumpfile);
      else if (c->op == EXEC_SELECT_TYPE)
        fputs ("TYPE SELECTOR ", dumpfile);
      else
        fputs ("SELECT CASE ", dumpfile);
      show_expr (c->expr1);

      for (; d; d = d->block)
        {
          fputc ('\n', dumpfile);
          code_indent (level, 0);
          if (c->op == EXEC_SELECT_TYPE)
            fputs ("TYPE/CLASS IS ", dumpfile);
          else
            fputs ("CASE ", dumpfile);

This gives, for example:
  SELECT TYPE 
    symtree: '__tmp_type_t1_cp'|| symbol: '__tmp_type_t1_cp' 
      type spec : (DERIVED t1)
      attributes: (VARIABLE  POINTER TARGET SELECT-TYPE-TEMPORARY ASSOCIATE-VAR
REFERENCED)
    symtree: '__tmp_type_t2_cp'|| symbol: '__tmp_type_t2_cp' 
      type spec : (DERIVED t2)
      attributes: (VARIABLE  POINTER TARGET SELECT-TYPE-TEMPORARY ASSOCIATE-VAR
REFERENCED)
    symtree: 'block@3'     || symbol: 'block@3'      
      type spec : (UNKNOWN 0)
      attributes: (LABEL )

    TYPE SELECTOR _loc[((MAIN__:cp % _vptr))]
    TYPE/CLASS IS (_loc[((MAIN__:__vtab_MAIN___T1))] 90353340) 

    ASSOCIATE   = MAIN__:cp % _data
      symtree: 'block@10'    || symbol: 'block@10'     
        type spec : (UNKNOWN 0)
        attributes: (LABEL )
      ASSIGN MAIN__:i 1
    END ASSOCIATE 

    TYPE/CLASS IS (_loc[((MAIN__:__vtab_MAIN___T2))] 41707972) 

    ASSOCIATE   = MAIN__:cp % _data
      symtree: 'block@11'    || symbol: 'block@11'     
        type spec : (UNKNOWN 0)
        attributes: (LABEL )
      ASSIGN MAIN__:i 2
    END ASSOCIATE 

    TYPE/CLASS IS (() ()) 
    ASSIGN MAIN__:i 3
    END SELECT
  END SELECT TYPE 

I have added Harald and Thomas to see if they prefer this cosmetic change to
deleting the line.

Thanks

Paul

Reply via email to