mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:26:41 +00:00

Pointer components without default initialization pose some difficult (or impossible) problems when they appear as right-hand side targets in pointer assignment statements; they may contain garbage or stale data that looks enough like a valid descriptor to cause a crash. Solve the problem by avoiding it -- ensure that pointers' descriptors are at least minimally established. Differential Revision: https://reviews.llvm.org/D149979
13 lines
253 B
Fortran
13 lines
253 B
Fortran
! RUN: %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
|
|
! CHECK: end do
|
|
|
|
SUBROUTINE sub00(a,b,n,m)
|
|
INTEGER n,m
|
|
REAL a(n,m), b(n,m)
|
|
|
|
DO 10 j = 1,m
|
|
DO 10 i = 1,n
|
|
g = a(i,j) - b(i,j)
|
|
10 PRINT *, g
|
|
END SUBROUTINE sub00
|