===================================================================
@@ -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
===================================================================
@@ -3200,9 +3200,11 @@ print_instantiation_partial_context_line (diagnost
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 "),
"locus", xloc.file, xloc.line, xloc.column);
===================================================================
@@ -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);
}