Commit 52e16f28 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

proc_cloning: Fix specialising a function at the same parameter position more than once.

The same name was used multiple times, because the counter was not increased anymore.
This was broken more than 6 years ago in 9d564d61.
This fixes opt/proc_cloning003.c.
parent d0747618
......@@ -429,7 +429,7 @@ static ir_entity *clone_method(const quadruple_t *q)
static size_t nr = 0;
/* We get a new ident for our clone method.*/
ident *const clone_ident = get_clone_ident(get_entity_ident(q->ent), q->pos, nr);
ident *const clone_ident = get_clone_ident(get_entity_ident(q->ent), q->pos, nr++);
/* We get our entity for the clone method. */
ir_type *const owner = get_entity_owner(q->ent);
ir_entity *const new_entity = clone_entity(q->ent, clone_ident, owner);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment