18596, "rj-jesus", "Compiler bug using an alias to 'nothing' as a parameter type", "2021-10-19T14:45:46Z"
Summary of Problem
This is not a major issue, but if I define a type alias to nothing
and use it as the type of a function parameter, I get a compiler error. If I use nothing
as the parameter type directly, it works.
Steps to Reproduce
Source Code:
type t = nothing;
proc foo(a: t = none) { return a; } // fails with compiler bug
//proc foo(a: nothing = none) { return a; } // works
foo();
Compile command:
$ chpl -o foo foo.chpl
internal error: UTI-MIS-0921 chpl version 1.25.0
Internal errors indicate a bug in the Chapel compiler ("It's us, not you"),
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.
Configuration Information
- Output of
chpl --version
:
$ chpl --version
chpl version 1.25.0
Copyright 2020-2021 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
- Output of
$CHPL_HOME/util/printchplenv --anonymize
:
$ $CHPL_HOME/util/printchplenv --anonymize
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native +
CHPL_LOCALE_MODEL: flat
CHPL_COMM: gasnet +
CHPL_COMM_SUBSTRATE: smp +
CHPL_GASNET_SEGMENT: fast
CHPL_TASKS: fifo +
CHPL_LAUNCHER: smp
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_NETWORK_ATOMICS: none
CHPL_GMP: system +
CHPL_HWLOC: none
CHPL_RE2: bundled
CHPL_LLVM: none +
CHPL_AUX_FILESYS: none
- Back-end compiler and version, e.g.
gcc --version
orclang --version
:
$ gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 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.