public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* The output of gcc_jit_context_dump_to_file() is missing parenthesis in expressions involving casts
@ 2015-01-01  0:00 Dibyendu Majumdar
  2015-01-01  0:00 ` David Malcolm
  0 siblings, 1 reply; 5+ messages in thread
From: Dibyendu Majumdar @ 2015-01-01  0:00 UTC (permalink / raw)
  To: jit

It seems that in some cases the output is not showing parenthesis
where it should.

For instance:

 if ((struct ravi_LClosure *)L->ci->func->p->sizep > (int)0)


The cast is to be applied to L->ci->func - so this expression should
be in parenthesis.

  gcc_jit_rvalue *rvalue__struct_ravi_LClosure___L__ci__func_0xae4e10 =
    gcc_jit_context_new_cast (ctxt_0xae4350,
                              NULL, /* gcc_jit_location *loc */
                              gcc_jit_lvalue_as_rvalue
(lvalue_L__ci__func_0xae4b90), /* gcc_jit_rvalue *rvalue */

  gcc_jit_lvalue *lvalue__struct_ravi_LClosure___L__ci__func__p_0xae4fd0=
    gcc_jit_rvalue_dereference_field
(rvalue__struct_ravi_LClosure___L__ci__func_0xae4e10, /*
gcc_jit_rvalue *ptr */
                                      NULL, /* gcc_jit_location *loc */
                                      field_p_0xacf1d0); /*
gcc_jit_field *field */

  gcc_jit_lvalue *lvalue__struct_ravi_LClosure___L__ci__func__p__k_0xae5020=
    gcc_jit_rvalue_dereference_field (gcc_jit_lvalue_as_rvalue
(lvalue__struct_ravi_LClosure___L__ci__func__p_0xae4fd0), /*
gcc_jit_rvalue *ptr */
                                      NULL, /* gcc_jit_location *loc */
                                      field_k_0xacdc10); /*
gcc_jit_field *field */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-16 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01  0:00 The output of gcc_jit_context_dump_to_file() is missing parenthesis in expressions involving casts Dibyendu Majumdar
2015-01-01  0:00 ` David Malcolm
2015-01-01  0:00   ` David Malcolm
2015-01-01  0:00     ` David Malcolm
2015-01-01  0:00   ` [PATCH, committed] PR jit/66539: Add parentheses as needed to gcc_jit_object_get_debug_string David Malcolm

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