HI,
as far as I can see this regression, where we ICE inside timevar_start,
is very easy to fix: just use timevar_cond_start instead (as in many
other places for TV_NAME_LOOKUP).
Tested x86_64-linux. Seems suited for 4_8-branch too.
Thanks,
Paolo.
////////////////////////
/cp
2014-01-24 Paolo Carlini <paolo.carl...@oracle.com>
PR c++/57524
* name-lookup.c (push_using_directive): Use timevar_cond_start.
/testsuite
2014-01-24 Paolo Carlini <paolo.carl...@oracle.com>
PR c++/57524
* g++.dg/ext/timevar2.C: New.
Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c (revision 207026)
+++ cp/name-lookup.c (working copy)
@@ -5683,9 +5683,9 @@ static tree
push_using_directive (tree used)
{
tree ret;
- timevar_start (TV_NAME_LOOKUP);
+ bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
ret = push_using_directive_1 (used);
- timevar_stop (TV_NAME_LOOKUP);
+ timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return ret;
}
Index: testsuite/g++.dg/ext/timevar2.C
===================================================================
--- testsuite/g++.dg/ext/timevar2.C (revision 0)
+++ testsuite/g++.dg/ext/timevar2.C (working copy)
@@ -0,0 +1,14 @@
+// PR c++/57524
+// { dg-options "-ftime-report" }
+// { dg-prune-output "wall" }
+// { dg-prune-output "times" }
+// { dg-prune-output "TOTAL" }
+// { dg-prune-output "checks" }
+
+namespace detail {
+namespace indirect_traits {}
+using namespace indirect_traits;
+void fn1() {
+using namespace detail;
+}
+}