[flang-commits] [flang] [flang] Update printing values in dump-parse-tree (PR #112709)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Thu Oct 17 08:47:23 PDT 2024


kparzysz wrote:

Source:
```
subroutine foo()
  real, allocatable :: z(:)
end
```

Tree before:
```
Program -> ProgramUnit -> SubroutineSubprogram
| SubroutineStmt
| | Name = 'foo'
| SpecificationPart
| | ImplicitPart ->
| | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
| | | DeclarationTypeSpec -> IntrinsicTypeSpec -> Real
| | | AttrSpec -> Allocatable
| | | EntityDecl
| | | | Name = 'z'
| | | | ArraySpec -> DeferredShapeSpecList -> int
| ExecutionPart -> Block
| EndSubroutineStmt ->
```

Tree after (compare the 3rd line from the bottom):
```
Program -> ProgramUnit -> SubroutineSubprogram
| SubroutineStmt
| | Name = 'foo'
| SpecificationPart
| | ImplicitPart ->
| | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
| | | DeclarationTypeSpec -> IntrinsicTypeSpec -> Real
| | | AttrSpec -> Allocatable
| | | EntityDecl
| | | | Name = 'z'
| | | | ArraySpec -> DeferredShapeSpecList -> int = '1'
| ExecutionPart -> Block
| EndSubroutineStmt ->
```

https://github.com/llvm/llvm-project/pull/112709


More information about the flang-commits mailing list