Varargs function breaks type patterns
/**********************************************************************
*
* SAC bug report: varargs.sacbugreport
*
**********************************************************************
*
* Automatically generated on wo 18 feb 2026 11:14:36 CET
*
* using sac2c 2.1.0-PuurGeluk-211-gdb91
* built 2026-02-18T11:02:40.
* by user qc on host pop-os.
*
* The compiler was called by
* /home/qc/sac2c/src/cmake-build-debug/sac2c_d varargs.sac -check p
*
* The compiler crashed in
* phase: pretp (Preprocessing type patterns)
* sub phase: rtpe (Turning type patterns of externals into code)
*
* What follows is the contents of varargs.sac.
*
**********************************************************************/
external int dots(int[*] unused, ...);
int main() {
b = dots([1], [2]);
return 0;
}
I got the following error message.
** 1: Loading SAC program ...
** 2: Preprocessing type patterns ...
/home/qc/sac2c/src/libsac2c/typepattern/type_pattern_resolve.c:1386:17: runtime error: member access within null pointer of type 'struct node'
I think the problem is that the external function has no pragma at all.