]> gcc.gnu.org Git - gcc.git/commit
Fix printing COMPOUND_EXPR in .original [PR23872]
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 17 Apr 2024 00:43:36 +0000 (17:43 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 3 May 2024 21:48:55 +0000 (14:48 -0700)
commit04f24e44fb14a22516444f70503719f3fda15d6c
tree3f70bbe5ebcf81ceae64afcbf73e2507ead83464
parent8f3afb83c879f1bfa722a963a07c06aaf174ef72
Fix printing COMPOUND_EXPR in .original [PR23872]

Starting with the merge of the openmp branch into the trunk
(r0-73077-g953ff28998b59b), COMPOUND_EXPR started to be printed
as `expr; , expr` which is wrong. This was due to the wrong
conversion of dumping_stmts into `!(flags & TDF_SLIM)`. That is wrong
as we are not dumping stmts at this point (`!(flags & TDF_SLIM)` was always
true for this case as TDF_SLIM case was handled before hand). So switch it
to be always false.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR middle-end/23872
* tree-pretty-print.cc (dump_generic_node <case COMPOUND_EXPR>): Fix
calls to dump_generic_node and also remove unreachable code that is testing
`flags & TDF_SLIM`.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/atomic-21.f90: Update testcase for the removal of `;`.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
gcc/tree-pretty-print.cc
This page took 0.057929 seconds and 5 git commands to generate.