This can break inputs that have similarly names functions. --- gcc/brig/brig-lang.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
>From 105277ee937482ee1a55265b1ec45637bc1e7a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20J=C3=A4=C3=A4skel=C3=A4inen?= <pekka.jaaskelai...@parmance.com> Date: Sat, 17 Feb 2018 08:54:43 +0200 Subject: [PATCH 5/8] [BRIGFE] do not allow optimizations based on known C builtins This can break inputs that have similarly names functions. --- gcc/brig/brig-lang.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/gcc/brig/brig-lang.c b/gcc/brig/brig-lang.c index 58b98fd..3c4d4bd 100644 --- a/gcc/brig/brig-lang.c +++ b/gcc/brig/brig-lang.c @@ -136,6 +136,8 @@ brig_langhook_init_options_struct (struct gcc_options *opts) opts->x_flag_signed_zeros = 1; opts->x_optimize = 3; + + flag_no_builtin = 1; } /* Handle Brig specific options. Return 0 if we didn't do anything. */ @@ -635,9 +637,11 @@ builtin_type_for_size (int size, bool unsignedp) static void def_builtin_1 (enum built_in_function fncode, const char *name, - enum built_in_class fnclass, tree fntype, tree libtype, - bool both_p, bool fallback_p, bool nonansi_p, - tree fnattrs, bool implicit_p) + enum built_in_class fnclass ATTRIBUTE_UNUSED, + tree fntype, tree libtype ATTRIBUTE_UNUSED, + bool both_p ATTRIBUTE_UNUSED, bool fallback_p, + bool nonansi_p ATTRIBUTE_UNUSED, tree fnattrs, + bool implicit_p) { tree decl; const char *libname; @@ -650,12 +654,6 @@ def_builtin_1 (enum built_in_function fncode, const char *name, (fallback_p ? libname : NULL), fnattrs); - if (both_p - && !flag_no_builtin - && !(nonansi_p && flag_no_nonansi_builtin)) - add_builtin_function (libname, libtype, fncode, fnclass, - NULL, fnattrs); - set_builtin_decl (fncode, decl, implicit_p); } -- 2.7.4