cgraphunit.c (analyze_functions): Save input_location, set it to UNKNOWN_LOCATION and restore it at the end.

2013-09-10  Jan Hubicka  <jh@suse.cz>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* cgraphunit.c (analyze_functions): Save input_location, set it
	to UNKNOWN_LOCATION and restore it at the end.

/cp
2013-09-10  Jan Hubicka  <jh@suse.cz>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* error.c (print_instantiation_partial_context_line): If
	loc == UNKNOWN_LOCATION return immediately.

/testsuite
2013-09-10  Jan Hubicka  <jh@suse.cz>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/template/cond2.C: Tweak, do not expect a "required from".

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r202445
This commit is contained in:
Jan Hubicka 2013-09-10 15:04:36 +02:00 committed by Paolo Carlini
parent 39e87bafc6
commit 4f90d3e08c
6 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2013-09-10 Jan Hubicka <jh@suse.cz>
Paolo Carlini <paolo.carlini@oracle.com>
* cgraphunit.c (analyze_functions): Save input_location, set it
to UNKNOWN_LOCATION and restore it at the end.
2013-09-10 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (propagate_constants_topo): Do not ignore SCC

View File

@ -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

View File

@ -1,3 +1,9 @@
2013-09-10 Jan Hubicka <jh@suse.cz>
Paolo Carlini <paolo.carlini@oracle.com>
* error.c (print_instantiation_partial_context_line): If
loc == UNKNOWN_LOCATION return immediately.
2013-09-09 Jakub Jelinek <jakub@redhat.com>
PR c++/58325

View File

@ -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 "),

View File

@ -1,3 +1,8 @@
2013-09-10 Jan Hubicka <jh@suse.cz>
Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/template/cond2.C: Tweak, do not expect a "required from".
2013-09-10 Jeff Law <law@redhat.com>
* gcc.c-torture/compile/pr58343.c: New test.

View File

@ -6,5 +6,5 @@ template<int X> class c;
template<int X, int Y> int test(c<X ? : Y>&); // { dg-error "omitted" }
void test(c<2>*c2) {
test<0, 2>(*c2); // { dg-message "required" }
test<0, 2>(*c2);
}