[PATCH] fix final piece of PR66448 (Bootstrap fail on Darwin, after 224161).

Iain Sandoe iain@codesourcery.com
Fri Jun 12 16:11:00 GMT 2015


Hi,

Since debug is not initialised at the time built-ins are initialised, whilst the latter may make forward declarations, those should not be considered for early debug,

bootstrapped / tested on x86_64-darwin12 and x86_64-linux-gnu.

OK?
Iain

gcc:
	PR bootstrap/66448
	* passes.c (rest_of_decl_compilation): Do not register globals for
	early debug if they are declared in built-ins.

diff --git a/gcc/passes.c b/gcc/passes.c
index d3ffe33..1bc8a36 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -332,7 +332,7 @@ rest_of_decl_compilation (tree decl,
       */
       && !decl_function_context (decl)
       && !current_function_decl
-
+      && DECL_SOURCE_LOCATION (decl) != BUILTINS_LOCATION
       && !decl_type_context (decl))
     (*debug_hooks->early_global_decl) (decl);
 }



More information about the Gcc-patches mailing list