This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fix final piece of PR66448 (Bootstrap fail on Darwin, after 224161).
- From: Iain Sandoe <iain at codesourcery dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Date: Fri, 12 Jun 2015 16:21:38 +0100
- Subject: [PATCH] fix final piece of PR66448 (Bootstrap fail on Darwin, after 224161).
- Authentication-results: sourceware.org; auth=none
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);
}