Prohibit scanning UNSPEC insns.
@@ -5218,6 +5218,8 @@ void MIR_scan_string (MIR_context_t ctx, const char *str) {
if (!HTAB_DO (insn_name_t, insn_name_tab, in, HTAB_FIND, el))
scan_error (ctx, "Unknown insn %s", name);
insn_code = el.code;
+ if (insn_code == MIR_UNSPEC)
+ scan_error (ctx, "UNSPEC is not portable and can not be scanned", name);
for (n = 0; n < VARR_LENGTH (label_name_t, label_names); n++) {
label = create_label_desc (ctx, VARR_GET (label_name_t, label_names, n));
if (func != NULL) MIR_append_insn (ctx, func, label);
