Thanks to Zhou Geng for reporting this bug as poc28 in the report here:
https://lists.gnu.org/archive/html/bug-gnu-pspp/2024-03/msg00015.html
struct subcase sc;
subcase_init_empty (&sc);
for (size_t i = 0; i < lcmd->n_vars; i++)
- subcase_add_var (&sc, lcmd->vars[i], SC_ASCEND);
+ subcase_add_var_always (&sc, lcmd->vars[i], SC_ASCEND);
struct casegrouper *grouper;
struct casereader *group;
7 | LIST **.
| ^~"
])
+AT_CLEANUP
+
+dnl Checks for regression against a crash
+AT_SETUP([LIST duplicate variables])
+AT_DATA([list.sps], [dnl
+DATA LIST LIST NOTABLE /v r1 Se oRe o.
+BEGIN DATA.
+2
+END DATA.
+LIST o o.
+])
+AT_CHECK([pspp -O format=csv list.sps], [0], [dnl
+"list.sps:3: warning: Missing value(s) for all variables from r1 onward. These will be filled with the system-missing value or blanks, as appropriate."
+
+Table: Data List
+o,o
+. ,. @&t@
+])
AT_CLEANUP
\ No newline at end of file