chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

Internal error for a class/record with a tuple of fields #10340

Open cassella opened 6 years ago

cassella commented 6 years ago

Summary of Problem

record R {
    var (one,two,three) = (3,2,1);
}
var r = new R();
fortytwo@magrathea:~/src/chapel (master)$ chpl tupled-member-definition.chpl 
tupled-member-definition.chpl:2: internal error: unexpected case [AggregateType.cpp:424]

The same error happens if it's in a class instead of a record.

I believe this is a correct program.

Associated Future Test(s):

test/types/records/tupleFields/detupleFieldDecl.chpl #10024

Configuration Information

fortytwo@magrathea:~/src/chapel (master)$ chpl --version
chpl version 1.18.0 pre-release (1ba398c)
Copyright (c) 2004-2018, Cray Inc.  (See LICENSE file for more details)

fortytwo@magrathea:~/src/chapel (master)$ printchplenv --anonymize
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: native *
CHPL_LOCALE_MODEL: flat
CHPL_COMM: gasnet *
  CHPL_COMM_SUBSTRATE: udp
  CHPL_GASNET_SEGMENT: everything
CHPL_TASKS: qthreads
CHPL_LAUNCHER: amudprun
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: intrinsics
  CHPL_NETWORK_ATOMICS: none
CHPL_GMP: gmp
CHPL_HWLOC: hwloc
CHPL_REGEXP: re2
CHPL_AUX_FILESYS: none

fortytwo@magrathea:~/src/chapel (master)$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
cassella commented 6 years ago

Oh, I didn't find #9987 when I searched issues. (It doesn't contain the word "tuple" in a context where github search will find it.)

bradcray commented 6 years ago

I think it's fine / good to have this as a separate issue. I'm just a little surprised I didn't open one when I filed #10024.