aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-04-16 17:43:36 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-05-03 14:48:55 -0700
commit04f24e44fb14a22516444f70503719f3fda15d6c (patch)
tree3f70bbe5ebcf81ceae64afcbf73e2507ead83464 /gcc/testsuite/gfortran.dg
parent8f3afb83c879f1bfa722a963a07c06aaf174ef72 (diff)
downloadgcc-04f24e44fb14a22516444f70503719f3fda15d6c.zip
gcc-04f24e44fb14a22516444f70503719f3fda15d6c.tar.gz
gcc-04f24e44fb14a22516444f70503719f3fda15d6c.tar.bz2
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>
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-21.f904
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
index febcdbb..3509929 100644
--- a/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
@@ -56,7 +56,7 @@ subroutine foobar()
endif
! TARGET_EXPR <D.4244, 0> = #pragma omp atomic capture acq_rel
-! TARGET_EXPR <D.4242, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.4243, 0> = *TARGET_EXPR <D.4242, &nn> == oo> ? pp : *TARGET_EXPR <D.4242, &nn>;, if (TARGET_EXPR <D.4243, 0>)
+! TARGET_EXPR <D.4242, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.4243, 0> = *TARGET_EXPR <D.4242, &nn> == oo> ? pp : *TARGET_EXPR <D.4242, &nn>, if (TARGET_EXPR <D.4243, 0>)
! {
! <<< Unknown tree: void_cst >>>
! }
@@ -66,7 +66,7 @@ subroutine foobar()
! };
!
! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, 0> = #pragma omp atomic capture acq_rel" 1 "original" } }
-! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.\[0-9\]+, 0> = \\*TARGET_EXPR <D.\[0-9\]+, &nn> == oo> \\? pp : \\*TARGET_EXPR <D.\[0-9\]+, &nn>;, if \\(TARGET_EXPR <D.\[0-9\]+, 0>\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.\[0-9\]+, 0> = \\*TARGET_EXPR <D.\[0-9\]+, &nn> == oo> \\? pp : \\*TARGET_EXPR <D.\[0-9\]+, &nn>, if \\(TARGET_EXPR <D.\[0-9\]+, 0>\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "<<< Unknown tree: void_cst >>>" 1 "original" } }
! { dg-final { scan-tree-dump-times "qq = TARGET_EXPR <D.\[0-9\]+, 0>;" 1 "original" } }