Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions flang/include/flang/Parser/dump-parse-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,10 @@ class ParseTreeDumper {
} else if constexpr (HasSource<T>::value) {
return x.source.ToString();
#endif
} else if constexpr (std::is_same_v<T, std::string>) {
return x;
} else if constexpr (std::is_same_v<T, int>) {
return std::to_string(x);
} else if constexpr (std::is_same_v<T, bool>) {
return x ? "true" : "false";
} else {
return "";
}
Expand Down
13 changes: 13 additions & 0 deletions flang/test/Parser/OpenMP/allocate-tree.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ program allocate_tree
allocate(w, xarray(4), zarray(t, z))
end program allocate_tree

!CHECK: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
!CHECK-NEXT: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
!CHECK-NEXT: | | | AttrSpec -> Allocatable
!CHECK-NEXT: | | | EntityDecl
!CHECK-NEXT: | | | | Name = 'w'
!CHECK-NEXT: | | | EntityDecl
!CHECK-NEXT: | | | | Name = 'xarray'
!CHECK-NEXT: | | | | ArraySpec -> DeferredShapeSpecList -> int = '1'
!CHECK-NEXT: | | | EntityDecl
!CHECK-NEXT: | | | | Name = 'zarray'
!CHECK-NEXT: | | | | ArraySpec -> DeferredShapeSpecList -> int = '2'


!CHECK: | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPExecutableAllocate
!CHECK-NEXT: | | | Verbatim
!CHECK-NEXT: | | | OmpClauseList ->
Expand Down
Loading