You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That message is only a note, so the program compiles. It crashes when run:
foo.chpl:4: error: attempt to dereference nil
Compiled with developer mode, the line given is in buildArray(),
$CHPL_HOME/modules/internal/ChapelArray.chpl:1404: error: attempt to dereference nil
var x = _value.dsiBuildArray(eltType);
default_runtime_temp is created in functionResolution.cpp, createGenericRecordVarDefaultInitCall(), with this comment,
if (field->isParameter()) {
appendExpr = new SymExpr(e->value);
} else if (field->hasFlag(FLAG_TYPE_VARIABLE)) {
if (e->value->getValType()->symbol->hasFlag(FLAG_HAS_RUNTIME_TYPE)) {
// 2018-11-02: This technically generates code that would
// crash at runtime because aggregate types don't contain the runtime
// type information for their fields, so this temporary will go
// uninitialized. At the moment we fortunately do not access such
// fields for default-initialized records, and avoid crashing.
VarSymbol* tmp = newTemp("default_runtime_temp");
tmp->addFlag(FLAG_TYPE_VARIABLE);
CallExpr* query = new CallExpr(PRIM_QUERY_TYPE_FIELD, at->symbol, new_CStringSymbol(e->key->name));
CallExpr* move = new CallExpr(PRIM_MOVE, tmp, query);
Summary of Problem
I want to have a list of arrays of certain size, I want the list to be created on run-time. So I try to create the list with the type deduction.
Steps to Reproduce
Source Code:
Error:
Compile command:
chpl foo.chpl
Execution command:
Associated Future Test(s):
Configuration Information
The text was updated successfully, but these errors were encountered: