https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115205
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Mahesh Madhav from comment #7) > I built the current mainline and added the patch, but we still have an ICE. > Maybe it gets further? > > Using the artifacts in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116248 Oh it is another missing call to initialize_sanitizer_builtins. Full patch which I will test: ``` diff --git a/gcc/asan.cc b/gcc/asan.cc index 9e0f51b1477..5f262d54a3a 100644 --- a/gcc/asan.cc +++ b/gcc/asan.cc @@ -4276,6 +4276,7 @@ asan_instrument (void) { if (hwasan_sanitize_p ()) { + initialize_sanitizer_builtins (); transform_statements (); return 0; } @@ -4694,6 +4695,8 @@ hwasan_finish_file (void) if (flag_sanitize & SANITIZE_KERNEL_HWADDRESS) return; + initialize_sanitizer_builtins (); + /* Avoid instrumenting code in the hwasan constructors/destructors. */ flag_sanitize &= ~SANITIZE_HWADDRESS; int priority = MAX_RESERVED_INIT_PRIORITY - 1; ```