From: paolo Date: Tue, 10 Sep 2013 13:04:36 +0000 (+0000) Subject: 2013-09-10 Jan Hubicka X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd9fde78ed04ae882e09cde5d81b503eceff0da5;p=thirdparty%2Fgcc.git 2013-09-10 Jan Hubicka Paolo Carlini * cgraphunit.c (analyze_functions): Save input_location, set it to UNKNOWN_LOCATION and restore it at the end. /cp 2013-09-10 Jan Hubicka Paolo Carlini * error.c (print_instantiation_partial_context_line): If loc == UNKNOWN_LOCATION return immediately. /testsuite 2013-09-10 Jan Hubicka Paolo Carlini * g++.dg/template/cond2.C: Tweak, do not expect a "required from". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202445 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a2bd31a8cb6..b07980abe02a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-09-10 Jan Hubicka + Paolo Carlini + + * cgraphunit.c (analyze_functions): Save input_location, set it + to UNKNOWN_LOCATION and restore it at the end. + 2013-09-10 Martin Jambor * ipa-cp.c (propagate_constants_topo): Do not ignore SCC diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 9681df518cda..092c74a71848 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -916,9 +916,11 @@ analyze_functions (void) int i; struct ipa_ref *ref; bool changed = true; + location_t saved_loc = input_location; bitmap_obstack_initialize (NULL); cgraph_state = CGRAPH_STATE_CONSTRUCTION; + input_location = UNKNOWN_LOCATION; /* Ugly, but the fixup can not happen at a time same body alias is created; C++ FE is confused about the COMDAT groups being right. */ @@ -1099,6 +1101,8 @@ analyze_functions (void) used by it. */ if (!seen_error ()) symtab_initialize_asm_name_hash (); + + input_location = saved_loc; } /* Translate the ugly representation of aliases as alias pairs into nice diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cca0229dc0a1..6d32109fff51 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-09-10 Jan Hubicka + Paolo Carlini + + * error.c (print_instantiation_partial_context_line): If + loc == UNKNOWN_LOCATION return immediately. + 2013-09-09 Jakub Jelinek PR c++/58325 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 02ec6c7608f7..62e39d3bcbf4 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -3200,8 +3200,10 @@ print_instantiation_partial_context_line (diagnostic_context *context, const struct tinst_level *t, location_t loc, bool recursive_p) { - expanded_location xloc; - xloc = expand_location (loc); + if (loc == UNKNOWN_LOCATION) + return; + + expanded_location xloc = expand_location (loc); if (context->show_column) pp_verbatim (context->printer, _("%r%s:%d:%d:%R "), diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1e5f483d20ad..8d58e2d83f43 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-09-10 Jan Hubicka + Paolo Carlini + + * g++.dg/template/cond2.C: Tweak, do not expect a "required from". + 2013-09-10 Jeff Law * gcc.c-torture/compile/pr58343.c: New test. diff --git a/gcc/testsuite/g++.dg/template/cond2.C b/gcc/testsuite/g++.dg/template/cond2.C index fad86bebe510..e6bd19d40fa8 100644 --- a/gcc/testsuite/g++.dg/template/cond2.C +++ b/gcc/testsuite/g++.dg/template/cond2.C @@ -6,5 +6,5 @@ template class c; template int test(c&); // { dg-error "omitted" } void test(c<2>*c2) { - test<0, 2>(*c2); // { dg-message "required" } + test<0, 2>(*c2); }