An iterator was assigned end() and then it was used to access
its corresponding element.
Change-Id: I87246cf56cbc694dd6b4e2cabbe84a08429d2ac3
Reviewed-on: https://gem5-review.googlesource.com/c/14361
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
pfq.emplace_back(dpp);
} else {
iterator it = pfq.end();
- while (it != pfq.begin() && dpp > *it)
+ do {
--it;
+ } while (it != pfq.begin() && dpp > *it);
/* If we reach the head, we have to see if the new element is new head
* or not */
if (it == pfq.begin() && dpp <= *it)