This website requires JavaScript.
Explore
Help
Sign In
squiid
/
llvm
Watch
1
Star
0
Fork
You've already forked llvm
0
Code
Issues
Pull requests
Activity
2c06be3fb8
llvm
/
flang
/
test
/
semantics
/
resolve01.f90
5 lines
77 B
Fortran
Raw
Normal View
History
Unescape
Escape
[flang] Continue work on name resolution. In Symbol and Scope, use SourceName (== parser::CharBlock) in place of Name (== std::string) so that names in the symtab have provenance. We may ultimately have multiple source locations associated with a symbol. ImplicitRules: Add isImplicitNoneType and isImplicitNoneExternal flags. MessageHandler: Add methods to emit messages associated with source locations. Detect conflicting declarations of symbols (e.g. as subprogram and variable). Handle attribute statements like ASYNCHRONOUS statement: make sure the symbol is present and set the attribute on it. Check that these all have a type declared by the end of the specification part if IMPLICIT NONE. Find variables named in Variable and Expr nodes and check they have types declared if IMPLICIT NONE. Otherwise, make sure they are in the symtab and apply the implicit type rules at the end of the scope. Push a scope for MainProgram nodes and add a symbol for the name if it has one. Rename Scope::map_type to Scope::mapType Add tests for errors currently being detected. There is no framework for running them yet, just source files with the expected errors in comments. Original-commit: flang-compiler/f18@39e6fa4169644b2c2b94ee611949fbc0766599a2 Reviewed-on: https://github.com/flang-compiler/f18/pull/49 Tree-same-pre-rewrite: false
2018-04-11 22:11:42 +02:00
integer
::
x
[flang] Resolve array specifications of entities. Add ArraySpecVisitor to recognize the various forms of array specifications. They are tracked in arraySpec_ and attrArraySpec_. Both are needed because a declaration like `integer, dimension(4) :: x(2,2), y` has two different array-specs. The method DeclareEntity was extracted out to handle the common part for EntityDecl, ObjectDecl, and DimensionStmt. AllocatableStmt and TargetStmt are now handled through their contained ObjectDecl. The test resolve07 checks the interactions between these kinds of declarations. Rename ComponentArraySpec to ArraySpec as it doesn't just occur in components. Fix some 'begin' and 'end' methods to start with upper-case letters. Original-commit: flang-compiler/f18@3d4d7430b559a135a3eddf8291449106195406a0 Reviewed-on: https://github.com/flang-compiler/f18/pull/53
2018-04-12 21:59:42 +02:00
!ERROR: The type of 'x' has already been declared
[flang] Continue work on name resolution. In Symbol and Scope, use SourceName (== parser::CharBlock) in place of Name (== std::string) so that names in the symtab have provenance. We may ultimately have multiple source locations associated with a symbol. ImplicitRules: Add isImplicitNoneType and isImplicitNoneExternal flags. MessageHandler: Add methods to emit messages associated with source locations. Detect conflicting declarations of symbols (e.g. as subprogram and variable). Handle attribute statements like ASYNCHRONOUS statement: make sure the symbol is present and set the attribute on it. Check that these all have a type declared by the end of the specification part if IMPLICIT NONE. Find variables named in Variable and Expr nodes and check they have types declared if IMPLICIT NONE. Otherwise, make sure they are in the symtab and apply the implicit type rules at the end of the scope. Push a scope for MainProgram nodes and add a symbol for the name if it has one. Rename Scope::map_type to Scope::mapType Add tests for errors currently being detected. There is no framework for running them yet, just source files with the expected errors in comments. Original-commit: flang-compiler/f18@39e6fa4169644b2c2b94ee611949fbc0766599a2 Reviewed-on: https://github.com/flang-compiler/f18/pull/49 Tree-same-pre-rewrite: false
2018-04-11 22:11:42 +02:00
real
::
x
end
Reference in a new issue
Copy permalink