public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-coroutines] dump CTORs properly wrapped with _Literal with -gimple
@ 2020-01-30 21:08 Iain D Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2020-01-30 21:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bba18325a1021ef8690334e349c242cde23ce92a

commit bba18325a1021ef8690334e349c242cde23ce92a
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jan 30 15:43:09 2020 +0100

    dump CTORs properly wrapped with _Literal with -gimple
    
    This wraps { ... } in _Literal (type) for consumption by the GIMPLE FE.
    
    2020-01-30  Richard Biener  <rguenther@suse.de>
    
    	* tree-pretty-print.c (dump_generic_node): Wrap VECTOR_CST
    	and CONSTRUCTOR in _Literal (type) with TDF_GIMPLE.

Diff:
---
 gcc/ChangeLog           |  5 +++++
 gcc/tree-pretty-print.c | 12 ++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 00d200e..ab1161b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-30  Richard Biener  <rguenther@suse.de>
+
+	* tree-pretty-print.c (dump_generic_node): Wrap VECTOR_CST
+	and CONSTRUCTOR in _Literal (type) with TDF_GIMPLE.
+
 2020-01-30  John David Anglin  <danglin@gcc.gnu.org>
 
 	* config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index fe2e62b3..7de8c7b 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -2078,6 +2078,12 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
     case VECTOR_CST:
       {
 	unsigned i;
+	if (flags & TDF_GIMPLE)
+	  {
+	    pp_string (pp, "_Literal (");
+	    dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);
+	    pp_string (pp, ") ");
+	  }
 	pp_string (pp, "{ ");
 	unsigned HOST_WIDE_INT nunits;
 	if (!VECTOR_CST_NELTS (node).is_constant (&nunits))
@@ -2315,6 +2321,12 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
 	bool is_struct_init = false;
 	bool is_array_init = false;
 	widest_int curidx;
+	if (flags & TDF_GIMPLE)
+	  {
+	    pp_string (pp, "_Literal (");
+	    dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);
+	    pp_string (pp, ") ");
+	  }
 	pp_left_brace (pp);
 	if (TREE_CLOBBER_P (node))
 	  pp_string (pp, "CLOBBER");


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-30 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 21:08 [gcc/devel/c++-coroutines] dump CTORs properly wrapped with _Literal with -gimple Iain D Sandoe

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).