https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126033
--- Comment #3 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #2)
> 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);
"TYPE SELECTOR " looks odd to me. Any reason not to use "SELECT TYPE "?
> 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)
Like this here:
> 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.
I am not opposed, but rather scratching my head.