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: 3 additions & 3 deletions flang/lib/Semantics/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ const Symbol &BypassGeneric(const Symbol &symbol) {

const Symbol &GetCrayPointer(const Symbol &crayPointee) {
const Symbol *found{nullptr};
for (const auto &[pointee, pointer] :
crayPointee.GetUltimate().owner().crayPointers()) {
if (pointee == crayPointee.name()) {
const Symbol &ultimate{crayPointee.GetUltimate()};
for (const auto &[pointee, pointer] : ultimate.owner().crayPointers()) {
if (pointee == ultimate.name()) {
found = &pointer.get();
break;
}
Expand Down
12 changes: 12 additions & 0 deletions flang/test/Semantics/bug148559.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
!RUN: %flang_fc1 -fsyntax-only %s
!Regression test for crash in semantics on Cray pointers

module m
pointer(ptr,pp)
end module m

program main
use m, only:renamea=>pp
use m, only:pp
print *, renamea
end
Loading