Open bmcdonald3 opened 2 years ago
Interesting note: If I add --ignore-errors
to the chpl
command-line, I get all the way through to the C compilation step. Given the nature of the assertion ("Is this thing still in the AST?"), I was not expecting this.
Some other interesting observations:
next
from c_ptr(GHook)
to c_ptr(_GHook)
, I get no errors and make it to C compilationextern
labels, I get a GHook used before defined
error on the declaration of the next
fieldGHook
is extern
, but _GHook
is not, I get the assertion error_GHook
is extern
, but GHook
is not, I get the "used before defined" error again@bmcdonald3 : Based on this, I'd try using the workaround in the first bullet for your 20,000 line file and see if that gets you through compilation as a workaround. We should still understand/fix this issue (internal errors are bad), but if that gets you unblocked, I'd run with it.
[edit: I renamed the issue to be a bit more precise as a result of these observations]
@bradcray Great, thanks for digging into this, glad to have the Arrow headers (hopefully) working fully now!
edit: there are quite a few instances of this in the generated code, so while I was eventually able to sort through all of them, there are a bunch of these in the arrow code.
Summary of Problem
While working to get the Apache Arrow header files working with c2chapel, I was hitting an internal error with the below snippet of code. I explored the error a bit with @bradcray, and we observed that it seemed to be happening due to a AST node being replaced, but we were unable to figure out if that should be happening/what was causing the error.
Steps to Reproduce
Source Code:
Compiling this program (using
CHPL_LLVM=none
) withchpl ghook.chpl
ghook.chpl:8: internal error: assertion error [resolution/postFold.cpp:105]`[edit: to someone compiling in non-developer mode, this error shows up as:
internal error: RES-POS-OLD-0105 chpl version 1.25.0 pre-release (3df047aa28)
Commenting out line 5 resolves the error.
Configuration Information
Output of
$CHPL_HOME/util/printchplenv --anonymize
:Back-end compiler and version, e.g.
gcc --version
orclang --version
: