External Issue: [Bug]: out intent unable(?) to identify when a real array is passed in lieu of a real

28696, "nldias", "[Bug]: out intent unable(?) to identify when a real array is passed in lieu of a real", "2026-04-16T18:58:31Z"

Summary of Problem

Description:

What behavior did you observe when encountering this issue?

The compiler reports an internal error

What behavior did you expect to observe?

The compiler should have catched the type mismatch.

Describe the workarounds you've tried, if any.

It is easy to identify the mismatch manually. The error message refers to the
correct line (11; see code below)

Is this issue currently blocking your progress?

No, because it is easy to spot the problem manually.

Steps to Reproduce

Source Code:

const nC = 5;
var xbar,ybar: [1..nC] real;
for C in 1..nC do {
   // -----------------------------------------------------------------
   // The eigenvalues.
   // -----------------------------------------------------------------
   var lambda1 = 10.0;
   // -----------------------------------------------------------------
   // Find the ellipse for each cluster.
   // -----------------------------------------------------------------
   ErrorTest(lambda1,xbar,ybar);
}
proc ErrorTest(
   const in lambda1: real,
   out xbar: real,
   out ybar: real) {
   xbar = lambda1;
   ybar = lambda1 + 1.0;
}

Compile command:

chpl outerror.chpl

Execution command:
./outerror

Gives the error

outerror.chpl:11: internal error: AST-FOR-LLS-01346 chpl version 2.8.0
Note: This source location is a guess.

Internal errors indicate a bug in the Chapel compiler,
and we're sorry for the hassle.  We would appreciate your reporting this bug --
please see https://chapel-lang.org/bugs.html for instructions.  In the meantime,
the filename + line number above may be useful in working around the issue.

Associated Future Test(s):

Configuration Information

  • Output of chpl --version:

chpl version 2.8.0
built with LLVM version 18.1.3
available LLVM targets: xtensa, m68k, xcore, x86-64, x86, wasm64, wasm32, ve, systemz, sparcel, sparcv9, sparc, riscv64, riscv32, ppc64le, ppc64, ppc32le, ppc32, nvptx64, nvptx, msp430, mips64el, mips64, mipsel, mips, loongarch64, loongarch32, lanai, hexagon, bpfeb, bpfel, bpf, avr, thumbeb, thumb, armeb, arm, amdgcn, r600, aarch64_32, aarch64_be, aarch64, arm64_32, arm64
Copyright 2020-2026 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)

  • Output of $CHPL_HOME/util/printchplenv --anonymize:

CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: bundled
CHPL_TARGET_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: system *
CHPL_AUX_FILESYS: none