aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-02-17 03:36:53 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-02-17 03:36:53 -0500
commite9339a68d32b2cbc6bc67a529cef40a4f2eca022 (patch)
tree7ce31409c7b08b79ed27c74405e4103696db8c7f /gcc
parent6acc8d53a91f4c3630fc85274ea75e8224fcdf37 (diff)
downloadgcc-e9339a68d32b2cbc6bc67a529cef40a4f2eca022.zip
gcc-e9339a68d32b2cbc6bc67a529cef40a4f2eca022.tar.gz
gcc-e9339a68d32b2cbc6bc67a529cef40a4f2eca022.tar.bz2
re PR c++/52248 (timevar ICE)
PR c++/52248 * decl.c (define_label): Use timevar_cond_start/stop. From-SVN: r184329
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/ext/timevar1.C12
4 files changed, 24 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c6bf817..faa8593 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/52248
+ * decl.c (define_label): Use timevar_cond_start/stop.
+
2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
PR c++/52126
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 90746a5..2a6a516 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2947,9 +2947,9 @@ tree
define_label (location_t location, tree name)
{
tree ret;
- timevar_start (TV_NAME_LOOKUP);
+ bool running = timevar_cond_start (TV_NAME_LOOKUP);
ret = define_label_1 (location, name);
- timevar_stop (TV_NAME_LOOKUP);
+ timevar_cond_stop (TV_NAME_LOOKUP, running);
return ret;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 72f9f74..2f5544b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/52248
+ * g++.dg/ext/timevar1.C: New.
+
2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
PR c++/52126
diff --git a/gcc/testsuite/g++.dg/ext/timevar1.C b/gcc/testsuite/g++.dg/ext/timevar1.C
new file mode 100644
index 0000000..0d2d3f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/timevar1.C
@@ -0,0 +1,12 @@
+// PR c++/52248
+// { dg-options "-ftime-report" }
+// { dg-prune-output "wall" }
+// { dg-prune-output "times" }
+// { dg-prune-output "TOTAL" }
+// { dg-prune-output "checks" }
+
+void
+foo ()
+{
+ goto lab; // { dg-error "not defined" }
+}