19984, "rmzs0711", "Different behaviour between main pre-release version and 1.26.0 release version", "2022-06-13T20:13:33Z"
Summary of Problem
I found different behaviour between the main branch version and the 1.26.0 release. I am not really sure, which of them is correct, but it seems like the main version is a bit confusing.
Steps to Reproduce
hello2-module.chpl:
module B {
proc b() {
}
}
module A {
proc main() {
public use B;
B.b();
}
}
chapel 1.26.0 compiles it and works fine
main version has a compilation error:
hello2-module.chpl:6: In function 'main':
hello2-module.chpl:8: error: 'B' undeclared (first use this function)
Also, imports and private use work fine in both cases.
Compile command:
chpl hello2-module.chpl
Execution command:
./hello2-module
Configuration Information
- Output of main
chpl --version
:
chpl version 1.27.0 pre-release (9f2e40b945)
built with LLVM version 12.0.0
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
- Output of 1.26.0
chpl --version
:
chpl version 1.26.0
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
- Output of main and 1.26.0
$CHPL_HOME/util/printchplenv --anonymize
are the same:
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: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: system
CHPL_AUX_FILESYS: none
- Back-end compiler and version, e.g.
gcc --version
orclang --version
:
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin