It has been broken on the mainline since end of December.  The attached 
patchlet is copy-and-pasted from the same function in the c-family dir.

Tested on x86/Windows and x86-64/Linux, applied on the mainline.


2018-03-06  Eric Botcazou  <ebotca...@adacore.com>

        * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.

-- 
Eric Botcazou
Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 258231)
+++ gcc-interface/utils.c	(working copy)
@@ -6443,6 +6443,9 @@ def_builtin_1 (enum built_in_function fn
   if (builtin_decl_explicit (fncode))
     return;
 
+  if (fntype == error_mark_node)
+    return;
+
   gcc_assert ((!both_p && !fallback_p)
 	      || !strncmp (name, "__builtin_",
 			   strlen ("__builtin_")));

Reply via email to