summaryrefslogtreecommitdiff
path: root/flang/test/Parser/OpenMP
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2025-09-10 10:07:04 -0500
committerGitHub <noreply@github.com>2025-09-10 10:07:04 -0500
commitfc9fe0f7b7bbd6c980cdb775ae0b2eed794ef8dc (patch)
tree39925af52bb03524934bb7586cf6bf08907c8c8b /flang/test/Parser/OpenMP
parentfa0bb6a20e97ee23587f583e1a15212d6735467e (diff)
[flang][OpenMP] Fix crash on DECLARE REDUCTION in unparse-with-symbols (#157871)
Diffstat (limited to 'flang/test/Parser/OpenMP')
-rw-r--r--flang/test/Parser/OpenMP/declare-reduction-unparse-with-symbols.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/flang/test/Parser/OpenMP/declare-reduction-unparse-with-symbols.f90 b/flang/test/Parser/OpenMP/declare-reduction-unparse-with-symbols.f90
new file mode 100644
index 000000000000..fbcd5b62821a
--- /dev/null
+++ b/flang/test/Parser/OpenMP/declare-reduction-unparse-with-symbols.f90
@@ -0,0 +1,13 @@
+!RUN: %flang_fc1 -fdebug-unparse-with-symbols -fopenmp %s | FileCheck %s
+
+! This used to crash.
+
+subroutine f00
+ !$omp declare reduction(fred : integer, real : omp_out = omp_in + omp_out)
+end
+
+!CHECK: !DEF: /f00 (Subroutine) Subprogram
+!CHECK: subroutine f00
+!CHECK: !$omp declare reduction (fred:integer,real:omp_out = omp_in+omp_out)
+!CHECK: end subroutine
+