public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug jit/66539] New: Missing parentheses in jit dumps
@ 2015-06-15 0:48 dmalcolm at gcc dot gnu.org
2015-06-16 18:14 ` [Bug jit/66539] " dmalcolm at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-15 0:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
Bug ID: 66539
Summary: Missing parentheses in jit dumps
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: jit
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
See:
https://gcc.gnu.org/ml/jit/2015-q2/msg00054.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug jit/66539] Missing parentheses in jit dumps
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
@ 2015-06-16 18:14 ` dmalcolm at gcc dot gnu.org
2015-06-16 18:19 ` dmalcolm at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-16 18:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Jun 16 18:13:44 2015
New Revision: 224531
URL: https://gcc.gnu.org/viewcvs?rev=224531&root=gcc&view=rev
Log:
PR jit/66539: Add parentheses as needed to gcc_jit_object_get_debug_string
gcc/jit/ChangeLog:
PR jit/66539
* jit-recording.c: Within namespace gcc::jit::recording::
(rvalue::get_debug_string_parens): New function.
(binary_op::make_debug_string): Update to mimic C precedence
rules.
(binary_op_precedence): New array.
(binary_op::get_precedence): New function.
(comparison::make_debug_string): Update to mimic C precedence
rules.
(comparison_precedence): New array.
(comparison::get_precedence): New function.
(cast::make_debug_string): Update to mimic C precedence rules.
(call::make_debug_string): Likewise.
(call_through_ptr::make_debug_string): Likewise.
(array_access::make_debug_string): Likewise.
(access_field_of_lvalue::make_debug_string): Likewise.
(access_field_rvalue::make_debug_string): Likewise.
(dereference_field_rvalue::make_debug_string): Likewise.
(dereference_rvalue::make_debug_string): Likewise.
(get_address_of_lvalue::make_debug_string): Likewise.
* jit-recording.h: Within namespace gcc::jit::recording::
(precedence): New enum.
(rvalue::rvalue): Initialize field "m_parenthesized_string".
(rvalue::get_debug_string_parens): New method.
(rvalue::get_precedence): New pure virtual function.
(rvalue::m_parenthesized_string): New field.
(param::get_precedence): New function.
(global::get_precedence): New function.
(memento_of_new_rvalue_from_const::get_precedence): New function.
(memento_of_new_string_literal::get_precedence): New function.
(unary_op::get_precedence): New function.
(binary_op::get_precedence): New function.
(comparison::get_precedence): New function.
(cast::get_precedence): New function.
(call::get_precedence): New function.
(call_through_ptr::get_precedence): New function.
(array_access::get_precedence): New function.
(access_field_of_lvalue::get_precedence): New function.
(access_field_rvalue::get_precedence): New function.
(dereference_field_rvalue::get_precedence): New function.
(dereference_rvalue::get_precedence): New function.
(get_address_of_lvalue::get_precedence): New function.
(local::get_precedence): New function.
gcc/testsuite/ChangeLog:
PR jit/66539
* jit.dg/all-non-failing-tests.h: Add test-debug-strings.c.
* jit.dg/test-debug-strings.c: New test case.
* jit.dg/test-quadratic.c (make_calc_discriminant): Verify that
the discriminant has a sane debug string.
Added:
trunk/gcc/testsuite/jit.dg/test-debug-strings.c
Modified:
trunk/gcc/jit/ChangeLog
trunk/gcc/jit/jit-recording.c
trunk/gcc/jit/jit-recording.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/jit.dg/all-non-failing-tests.h
trunk/gcc/testsuite/jit.dg/test-quadratic.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug jit/66539] Missing parentheses in jit dumps
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
2015-06-16 18:14 ` [Bug jit/66539] " dmalcolm at gcc dot gnu.org
@ 2015-06-16 18:19 ` dmalcolm at gcc dot gnu.org
2015-06-16 19:44 ` dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-16 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-06-16
Ever confirmed|0 |1
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed in trunk for GCC 6 as of r224531.
May be a candidate for applying to the GCC 5 branch, so keeping open for now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug jit/66539] Missing parentheses in jit dumps
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
2015-06-16 18:14 ` [Bug jit/66539] " dmalcolm at gcc dot gnu.org
2015-06-16 18:19 ` dmalcolm at gcc dot gnu.org
@ 2015-06-16 19:44 ` dmalcolm at gcc dot gnu.org
2015-06-29 15:28 ` dmalcolm at gcc dot gnu.org
2015-06-29 15:55 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-16 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Jun 16 19:44:05 2015
New Revision: 224535
URL: https://gcc.gnu.org/viewcvs?rev=224535&root=gcc&view=rev
Log:
PR jit/66539: Properly add testcase
gcc/testsuite/ChangeLog:
PR jit/66539
* jit.dg/all-non-failing-tests.h: Add test-debug-strings.c
to "testcases" array.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/jit.dg/all-non-failing-tests.h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug jit/66539] Missing parentheses in jit dumps
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
` (2 preceding siblings ...)
2015-06-16 19:44 ` dmalcolm at gcc dot gnu.org
@ 2015-06-29 15:28 ` dmalcolm at gcc dot gnu.org
2015-06-29 15:55 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-29 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Mon Jun 29 15:27:39 2015
New Revision: 225125
URL: https://gcc.gnu.org/viewcvs?rev=225125&root=gcc&view=rev
Log:
PR jit/66539: Add parentheses as needed to gcc_jit_object_get_debug_string
Backport of r224531 (8154a3514d5fc8067a6928531d5f61cd768bd62c) and
r224535 (1828cd755cf5e4a34d5638f543a059f3562ad957) from trunk
gcc/jit/ChangeLog:
Backport from mainline r224531
2015-06-16 David Malcolm <dmalcolm@redhat.com>
PR jit/66539
* jit-recording.c: Within namespace gcc::jit::recording::
(rvalue::get_debug_string_parens): New function.
(binary_op::make_debug_string): Update to mimic C precedence
rules.
(binary_op_precedence): New array.
(binary_op::get_precedence): New function.
(comparison::make_debug_string): Update to mimic C precedence
rules.
(comparison_precedence): New array.
(comparison::get_precedence): New function.
(cast::make_debug_string): Update to mimic C precedence rules.
(call::make_debug_string): Likewise.
(call_through_ptr::make_debug_string): Likewise.
(array_access::make_debug_string): Likewise.
(access_field_of_lvalue::make_debug_string): Likewise.
(access_field_rvalue::make_debug_string): Likewise.
(dereference_field_rvalue::make_debug_string): Likewise.
(dereference_rvalue::make_debug_string): Likewise.
(get_address_of_lvalue::make_debug_string): Likewise.
* jit-recording.h: Within namespace gcc::jit::recording::
(precedence): New enum.
(rvalue::rvalue): Initialize field "m_parenthesized_string".
(rvalue::get_debug_string_parens): New method.
(rvalue::get_precedence): New pure virtual function.
(rvalue::m_parenthesized_string): New field.
(param::get_precedence): New function.
(global::get_precedence): New function.
(memento_of_new_rvalue_from_const::get_precedence): New function.
(memento_of_new_string_literal::get_precedence): New function.
(unary_op::get_precedence): New function.
(binary_op::get_precedence): New function.
(comparison::get_precedence): New function.
(cast::get_precedence): New function.
(call::get_precedence): New function.
(call_through_ptr::get_precedence): New function.
(array_access::get_precedence): New function.
(access_field_of_lvalue::get_precedence): New function.
(access_field_rvalue::get_precedence): New function.
(dereference_field_rvalue::get_precedence): New function.
(dereference_rvalue::get_precedence): New function.
(get_address_of_lvalue::get_precedence): New function.
(local::get_precedence): New function.
gcc/testsuite/ChangeLog:
Backport from mainline r224531
2015-06-16 David Malcolm <dmalcolm@redhat.com>
PR jit/66539
* jit.dg/all-non-failing-tests.h: Add test-debug-strings.c.
* jit.dg/test-debug-strings.c: New test case.
* jit.dg/test-quadratic.c (make_calc_discriminant): Verify that
the discriminant has a sane debug string.
Added:
branches/gcc-5-branch/gcc/testsuite/jit.dg/test-debug-strings.c
Modified:
branches/gcc-5-branch/gcc/jit/ChangeLog
branches/gcc-5-branch/gcc/jit/jit-recording.c
branches/gcc-5-branch/gcc/jit/jit-recording.h
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/jit.dg/all-non-failing-tests.h
branches/gcc-5-branch/gcc/testsuite/jit.dg/test-quadratic.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug jit/66539] Missing parentheses in jit dumps
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
` (3 preceding siblings ...)
2015-06-29 15:28 ` dmalcolm at gcc dot gnu.org
@ 2015-06-29 15:55 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-29 15:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> Should be fixed in trunk for GCC 6 as of r224531.
>
> May be a candidate for applying to the GCC 5 branch, so keeping open for now.
Should be fixed in gcc-5-branch (for gcc 5.2) as of r225125; resolving as
fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-29 15:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 0:48 [Bug jit/66539] New: Missing parentheses in jit dumps dmalcolm at gcc dot gnu.org
2015-06-16 18:14 ` [Bug jit/66539] " dmalcolm at gcc dot gnu.org
2015-06-16 18:19 ` dmalcolm at gcc dot gnu.org
2015-06-16 19:44 ` dmalcolm at gcc dot gnu.org
2015-06-29 15:28 ` dmalcolm at gcc dot gnu.org
2015-06-29 15:55 ` dmalcolm at gcc dot gnu.org
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).