Skip to content

Commit

Permalink
Fix a clash between CONTIGUOUS and SAVE attribute in flang (issue #673)
Browse files Browse the repository at this point in the history
This simple patch adds CONTIGUOUS attribute to the list of attributes
allowed to use along with the SAVE attribute.

Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>
  • Loading branch information
pawosm-arm committed Feb 5, 2021
1 parent e3dbec7 commit b225fa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions test/llvm_ir_correct/contig.f90
@@ -0,0 +1,5 @@
! RUN: %flang -c %s -fsyntax-only
module contig
implicit none
integer, dimension(:), pointer, contiguous, save :: ptr
end module
2 changes: 1 addition & 1 deletion tools/flang1/flang1exe/semant.c
Expand Up @@ -292,7 +292,7 @@ static struct {
ET_B(ET_VALUE) | ET_B(ET_VOLATILE) | ET_B(ET_SHARED) |
ET_B(ET_ASYNCHRONOUS) | ET_B(ET_PROTECTED) | ET_B(ET_PINNED) |
ET_B(ET_TEXTURE) | ET_B(ET_DEVICE) | ET_B(ET_MANAGED) |
ET_B(ET_IMPL_MANAGED))},
ET_B(ET_CONTIGUOUS) | ET_B(ET_IMPL_MANAGED))},
{"target",
~(ET_B(ET_ACCESS) | ET_B(ET_ALLOCATABLE) | ET_B(ET_DIMENSION) |
ET_B(ET_INTENT) | ET_B(ET_OPTIONAL) | ET_B(ET_SAVE) | ET_B(ET_VALUE) |
Expand Down

0 comments on commit b225fa6

Please sign in to comment.