Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!rutgers!labrea!mcnc!rti!xyzzy!LOGNAME From: LOGNAME@xyzzy.UUCP (Michael Meissner) Newsgroups: gnu.gcc.bug Subject: Re: gcc 1.31 gets a fatal signal when __builtin_memcpy is used. Message-ID: <2189@xyzzy.UUCP> Date: 7 Dec 88 14:35:37 GMT References: <88Nov30.030843est.12697@bay.csri.toronto.edu> Reply-To: LOGNAME@xyzzy.UUCP (Michael Meissner) Distribution: gnu Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 68 At present, GCC does not know about that many builtins, and it does the usual call to abort if it gets a call to a builtin that it has parsed, but does not have patterns for. The following patch to 1.31 (linenumbers may be different for 1.30) will change the default to just call the library routine with the same name as the builtin (ie, __builtin_memcpy in this case). *** ../.orig/expr.c Wed Dec 7 08:54:10 1988 --- expr.c Wed Dec 7 09:02:41 1988 *************** *** 2303,2307 **** && (DECL_FUNCTION_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) != NOT_BUILT_IN)) ! return expand_builtin (exp, target, subtarget, tmode); /* If this call was expanded already by preexpand_calls, just return the result we got. */ --- 2303,2307 ---- && (DECL_FUNCTION_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) != NOT_BUILT_IN)) ! return expand_builtin (exp, target, subtarget, tmode, ignore); /* If this call was expanded already by preexpand_calls, just return the result we got. */ *************** *** 3027,3031 **** static rtx ! expand_builtin (exp, target, subtarget, mode) tree exp; rtx target; --- 3027,3031 ---- static rtx ! expand_builtin (exp, target, subtarget, mode, ignore) tree exp; rtx target; *************** *** 3032,3035 **** --- 3032,3036 ---- rtx subtarget; enum machine_mode mode; + int ignore; { tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); *************** *** 3120,3125 **** return target; ! default: ! abort (); } } --- 3121,3126 ---- return target; ! default: /* just do library call, if unknown builtin */ ! return expand_call (exp, target, ignore); } } -- Michael Meissner, Data General. Uucp: ...!mcnc!rti!xyzzy!meissner Arpa: meissner@dg-rtp.DG.COM (or) meissner%dg-rtp.DG.COM@relay.cs.net -- Michael Meissner, Data General. Uucp: ...!mcnc!rti!xyzzy!meissner Arpa: meissner@dg-rtp.DG.COM (or) meissner%dg-rtp.DG.COM@relay.cs.net