-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
find_def_in_most_recent_scope() set the private bit to 0 when it found an alias. This was most likely unintended and could cause issues when resolving multiple definitions of the same symbol at a later stage (if a private symbol appeared to be publicly available). Tests for private flag overwrite added, based on flang github issue #890.
- Loading branch information
1 parent
b39412c
commit aec36b8
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# | ||
|
||
########## Make rule for test use00 ######## | ||
|
||
build: | ||
@echo ------------------------------------ building test $(TEST) | ||
-$(CC) -c $(CFLAGS) $(SRC)/check.c -o check.$(OBJX) | ||
-$(FC) -c $(FFLAGS) $(LDFLAGS) $(SRC)/$(TEST).f90 -o $(TEST).$(OBJX) | ||
-$(FC) $(FFLAGS) $(LDFLAGS) $(TEST).$(OBJX) check.$(OBJX) $(LIBS) -o $(TEST).$(EXESUFFIX) | ||
|
||
run: | ||
@echo ------------------------------------ executing test $(TEST) | ||
./$(TEST).$(EXESUFFIX) | ||
|
||
verify: ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Shared lit script for each tests. Run bash commands that run tests with make. | ||
|
||
# RUN: KEEP_FILES=%keep FLAGS=%flags TEST_SRC=%s MAKE_FILE_DIR=%S/.. bash %S/runmake | tee %t | ||
# RUN: cat %t | FileCheck %S/runmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module f_precisions | ||
integer, parameter, public :: f_double = selected_real_kind(15, 307) | ||
end module f_precisions | ||
|
||
module box | ||
use f_precisions, gp=>f_double | ||
private | ||
public :: get_gp | ||
contains | ||
subroutine get_gp(out_val) | ||
integer, intent(out) :: out_val | ||
out_val = gp | ||
end subroutine get_gp | ||
end module box | ||
|
||
module Poisson_Solver | ||
use f_precisions | ||
integer, parameter, public :: gp=f_double | ||
end module Poisson_Solver | ||
|
||
module module_defs | ||
use f_precisions | ||
integer, parameter, public :: gp=f_double | ||
end module module_defs | ||
|
||
subroutine PSolver(eh) | ||
use module_defs ! This has a public gp | ||
use box ! This has a private gp | ||
use Poisson_Solver, except_gp => gp ! This has a public gp | ||
real(gp), intent(out) :: eh ! Should be able to use gp from module_base | ||
end subroutine PSolver | ||
|
||
program main | ||
use box | ||
use Poisson_Solver | ||
integer :: box_gp | ||
call get_gp(box_gp) | ||
call check(box_gp, gp, 1) ! box's gp and Solver's gp alias the same variable | ||
end program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aec36b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, this commit introduced regression in cp2k!
and
cp2k github master SHA f07f6186bf33635422e740a738a9e1b48731449e
aec36b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch also broke AMD's fix for cp2k issues. I didn't know that and now we have broken git master.
aec36b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reverted my commit with test cases for AMD's fix until this situation is sorted.
aec36b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was kindly asked to open new issue for this, it's: #995