aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-09-10 15:04:36 +0200
committerPaolo Carlini <paolo@gcc.gnu.org>2013-09-10 13:04:36 +0000
commit4f90d3e08cd1b7696fc29a88056e14388d78fdf6 (patch)
tree1ba16c2374c0a1fd2be1a0ca9f6816084b6f05ac
parent39e87bafc6df5d2405e7d2bedbe44018a5cd0269 (diff)
downloadgcc-4f90d3e08cd1b7696fc29a88056e14388d78fdf6.zip
gcc-4f90d3e08cd1b7696fc29a88056e14388d78fdf6.tar.gz
gcc-4f90d3e08cd1b7696fc29a88056e14388d78fdf6.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cgraphunit.c4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/error.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/cond2.C2
6 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a2bd31..b07980a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 9681df5..092c74a 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 cca0229..6d32109 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 02ec6c7..62e39d3 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 1e5f483..8d58e2d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/g++.dg/template/cond2.C b/gcc/testsuite/g++.dg/template/cond2.C
index fad86be..e6bd19d 100644
--- a/gcc/testsuite/g++.dg/template/cond2.C
+++ b/gcc/testsuite/g++.dg/template/cond2.C
@@ -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);
}