On 11/30/2016 12:01 PM, Jakub Jelinek wrote:
Hi!

This patch fixes some minor nits I've raised in the PR, more severe issues
left unresolved there.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Thank you.  One comment below.

@@ -1059,7 +1048,12 @@ format_integer (const conversion_spec &s
                }

              if (code == NOP_EXPR)
-               argtype = TREE_TYPE (gimple_assign_rhs1 (def));
+               {
+                 tree type = TREE_TYPE (gimple_assign_rhs1 (def));
+                 if (TREE_CODE (type) == INTEGER_TYPE
+                     || TREE_CODE (type) == POINTER_TYPE)
+                   argtype = type;

As I replied in my comment #6 on the bug, I'm not sure I see what
is wrong with the original code, and I haven't been able to come
up with a test case that demonstrates a problem because of it with
any of the types you mentioned (bool, enum, or floating).

I trust you when you say the change is necessary but I would like
to see a test case.  I can add it myself if you can sketch it out.

Martin

Reply via email to