[Committed] S/390: Improve debug output for builtin matching

Message ID 1553508666-2260-1-git-send-email-krebbel@linux.ibm.com
State New
Headers show
Series
  • [Committed] S/390: Improve debug output for builtin matching
Related show

Commit Message

Andreas Krebbel March 25, 2019, 10:11 a.m.
gcc/ChangeLog:

2019-03-25  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390-c.c (s390_fn_types_compatible): Print the
	expected and found types with -mdebug during builtin matching.
---
 gcc/config/s390/s390-c.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.7.4

Patch

diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c
index aafe346e..fc9ad67 100644
--- a/gcc/config/s390/s390-c.c
+++ b/gcc/config/s390/s390-c.c
@@ -810,7 +810,13 @@  s390_fn_types_compatible (enum s390_builtin_ov_type_index typeindex,
 
     mismatch:
       if (TARGET_DEBUG_ARG)
-	fprintf (stderr, " mismatch in operand: %d\n", i + 1);
+	{
+	  fprintf (stderr, " mismatch in operand: %d incoming: ", i + 1);
+	  print_generic_expr (stderr, in_type, TDF_VOPS|TDF_MEMSYMS);
+	  fprintf (stderr, " expected: ");
+	  print_generic_expr (stderr, b_arg_type, TDF_VOPS|TDF_MEMSYMS);
+	  fprintf (stderr, "\n");
+	}
       return INT_MAX;
     }