* [patch, fortran] Two associate fixes in dump-parse-tree.c
@ 2016-02-14 19:27 Thomas Koenig
2016-02-28 11:42 ` *ping* " Thomas Koenig
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Koenig @ 2016-02-14 19:27 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
Hello world,
the two fixes in the patch
- show ASSOCIATE lists if present, to complete the AST dump
- fix an ICE where an EXEC_END_BLOCK survived. This can only
happen if the END ASSOCIATE or END BLOCK statement had a
statement label.
If the preference is to use some other format for the ASSOCIATE
lists, for example by putting each statement on its own list,
I am open to suggestions.
Regression-tested (but we don't really test for this). No test
case because we don't have the infrastructure for it.
No user impact expected (nobody but us developers uses
-fdump-fortran-original, I think).
OK for trunk?
Regards
Thomas
2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (show_code_node): Print association
list of a block if present. Handle EXEC_END_BLOCK.
[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 1050 bytes --]
Index: dump-parse-tree.c
===================================================================
--- dump-parse-tree.c (Revision 233410)
+++ dump-parse-tree.c (Arbeitskopie)
@@ -1773,6 +1773,7 @@ show_code_node (int level, gfc_code *c)
{
const char* blocktype;
gfc_namespace *saved_ns;
+ gfc_association_list *alist;
if (c->ext.block.assoc)
blocktype = "ASSOCIATE";
@@ -1780,6 +1781,12 @@ show_code_node (int level, gfc_code *c)
blocktype = "BLOCK";
show_indent ();
fprintf (dumpfile, "%s ", blocktype);
+ for (alist = c->ext.block.assoc; alist; alist = alist->next)
+ {
+ fprintf (dumpfile, " %s = ", alist->name);
+ show_expr (alist->target);
+ }
+
++show_level;
ns = c->ext.block.ns;
saved_ns = gfc_current_ns;
@@ -1793,6 +1800,11 @@ show_code_node (int level, gfc_code *c)
break;
}
+ case EXEC_END_BLOCK:
+ /* Only come here when there is a label on an
+ END ASSOCIATE construct. */
+ break;
+
case EXEC_SELECT:
d = c->block;
fputs ("SELECT CASE ", dumpfile);
^ permalink raw reply [flat|nested] 3+ messages in thread
* *ping* [patch, fortran] Two associate fixes in dump-parse-tree.c
2016-02-14 19:27 [patch, fortran] Two associate fixes in dump-parse-tree.c Thomas Koenig
@ 2016-02-28 11:42 ` Thomas Koenig
2016-02-28 18:40 ` Jerry DeLisle
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Koenig @ 2016-02-28 11:42 UTC (permalink / raw)
To: fortran, gcc-patches
I wrote:
Patch at
https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00941.html
> OK for trunk?
>
> Regards
>
> Thomas
>
> 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
>
> * dump-parse-tree.c (show_code_node): Print association
> list of a block if present. Handle EXEC_END_BLOCK.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: *ping* [patch, fortran] Two associate fixes in dump-parse-tree.c
2016-02-28 11:42 ` *ping* " Thomas Koenig
@ 2016-02-28 18:40 ` Jerry DeLisle
0 siblings, 0 replies; 3+ messages in thread
From: Jerry DeLisle @ 2016-02-28 18:40 UTC (permalink / raw)
To: Thomas Koenig, fortran, gcc-patches
On 02/28/2016 03:42 AM, Thomas Koenig wrote:
> I wrote:
>
> Patch at
>
> https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00941.html
>
>> OK for trunk?
>>
>> Regards
>>
>> Thomas
>>
>> 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
>>
>> * dump-parse-tree.c (show_code_node): Print association
>> list of a block if present. Handle EXEC_END_BLOCK.
>
>
Yes, OK
Jerry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-28 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-14 19:27 [patch, fortran] Two associate fixes in dump-parse-tree.c Thomas Koenig
2016-02-28 11:42 ` *ping* " Thomas Koenig
2016-02-28 18:40 ` Jerry DeLisle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).