http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49126
Summary: timevar_stack faild because define_label
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
when source code like this,I think there is a bug:
int f()
{
goto cleanup:
}
then compiler will go along this path:
|tree poplevel (int keep, int reverse, int functionbody)
-->timevar_start (TV_NAME_LOOKUP);xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-->....
--> pop_labels (block);
|static void pop_labels (tree block)
----> htab_traverse (named_labels, pop_labels_1, block);
|static int pop_labels_1 (void **slot, void *data)
------>pop_label (ent->label_decl, NULL_TREE);
|static void pop_label (tree label, tree old_value)
--------> define_label (location, DECL_NAME (label));
|tree define_label (location_t location, tree name)
----------> timevar_start (TV_NAME_LOOKUP);xxxxxxxxxxxxxxxxxxxxx
so at last in:
|void timevar_start (timevar_id_t timevar)
--------------> gcc_assert (!tv->standalone);
failed!